Keyword

My Feature Requests (Wish List) for K2 v3

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 8 months ago #146916 by Joe Campbell
Replied by Joe Campbell on topic My Feature Requests (Wish List) for K2 v3
What if you want to serve up your own banners (announcements), banners you sell and third-party banners?

In that case, could/should you use something like DFP?



Is this what you mean by hardcoding the modules...


<?php
// no direct access
defined('_JEXEC') or die;
$view = JRequest::getVar("view", "item");
?>

<?php if($view == 'itemlist') : ?>

<!--Category List Banner Code Here-->

<?php else : ?>

<?php foreach ($items as $key=>$item): ?>

<!--Item Banner Code Here-->

<?php endforeach; ?>
<?php endif; ?>

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #146919 by Kumar Sara
Replied by Kumar Sara on topic My Feature Requests (Wish List) for K2 v3
Joe I setup a demo showing K2 as a banner manager. See reggae.websitedons.net/events

The 728x90 banner at the top are in rotation and randomly displayed by the K2 content module, more precisely, a revamped version of the module.

The Method
Create a text extra field for the banner URL - alias name exactly as topbanner
Create a radio extra field for new window or parent with options yes and no - alias exactly as newwin

Create a category and name it 728x90 banners
Set Item Image Options medium (or any other) to width 728
Set all options in all parameter tabs to hide (the module is handling display)

Add new items to the category with only the title and the Intro Image

The Module
As stated, we revamped the original K2 content module to do all kinds of stuff and just now added the banner display method so you can test. Get it at cmsenergizer.com/joomla-extensions/88-k2-content-module-revised Download the one with less download count. Its filename is mod_cmse_k2content-12-beta.zip I realized the title isn't showing because the display was modified.

Choose the category
Set Item Count to 1
Set Item Order to Random
Set Link Title to no
Set Image Size to Medium
Set Link Image to Ad Banner (this is the new addition for this demo)
Set Format to vertical-elements and clear the field below to just [image]
Assign to the position you want

----

All the content at the demo site is displayed only with K2

Maximizing the Power of K2 to cut third party extension dependency and increase website efficiency. cmsenergizer.com

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago - 8 years 8 months ago #146959 by Krikor Boghossian
Replied by Krikor Boghossian on topic My Feature Requests (Wish List) for K2 v3
@Joe Campbell

You can donwload Takai www.joomlaworks.net/joomla-templates/free-templates/takai to see how these variables are set up.

You should go with this method (in your index.php file):
<?php
$option 			= JRequest::getCmd('option');
$view 			= JRequest::getCmd('view');
$layout 			= JRequest::getCmd('layout');
$page 			= JRequest::getCmd('page');
$task 			= JRequest::getCmd('task');
$id 				= JRequest::getInt('id');
?>

<?php if($option == 'com_k2' && $view == 'item' ): ?>

//Code that renders inside the item only

<?php elseif($option == 'com_k2' && $view == 'itemlist' && $task=='category'): ?>

//Code that renders inside the category only

<?php else:  ?>

//Fallback

<?php endif; ?>

You can combine it with the $id variable to render modules in specific K2 items only. The $option variable is used to limit the modules inside K2.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 8 years 8 months ago by Krikor Boghossian.

Please Log in or Create an account to join the conversation.

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 8 months ago #146963 by Joe Campbell
Replied by Joe Campbell on topic My Feature Requests (Wish List) for K2 v3
Kumar thanks for taking the time to modify your custom K2 Content Module.

What's your Twitter handle so I can follow you :)

Please Log in or Create an account to join the conversation.

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 8 months ago #146965 by Joe Campbell
Replied by Joe Campbell on topic My Feature Requests (Wish List) for K2 v3
Thanks @Krikor - what about tag pages?

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #146971 by Kumar Sara
Replied by Kumar Sara on topic My Feature Requests (Wish List) for K2 v3

Joe Campbell wrote: Kumar... What's your Twitter handle so I can follow you :)

Strangely I do not have a Twitter account but the boss does @websitedons. I am only at Facebook www.facebook.com/cmsenergizer

We were attempting to get another wish list capability to output items by tag with the k2 content module, but have not had any accuracy. Finally just moved the related items code block of the item view template, to the right column to get sort of a Youtube clone. videos.websitedons.net/

Maximizing the Power of K2 to cut third party extension dependency and increase website efficiency. cmsenergizer.com

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 7 months ago #146988 by Krikor Boghossian
Replied by Krikor Boghossian on topic My Feature Requests (Wish List) for K2 v3
@Joe, change the $task to tag instead of category.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 7 months ago #147008 by Joe Campbell
Replied by Joe Campbell on topic My Feature Requests (Wish List) for K2 v3
Thanks @Krikor :)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 7 months ago #147024 by Krikor Boghossian
Replied by Krikor Boghossian on topic My Feature Requests (Wish List) for K2 v3
You 're welcome mate.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum