Featured event module

More
9 years 10 months ago #59423 by DPaW
Featured event module was created by DPaW
Hi,

We REALLY need a way to promote a single event for the site. many other apps like K2 allow you to set an item as featured.

This module would allow you to display 1 or several number of items, OR allow you to display a single event by ID.

I currently have created my own code (allowing me to display this on any of our related websites), but that's not really ideal, and this will just display 'x" number of events from a particular category.

any thoughts?

Attachments:

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

More
9 years 10 months ago - 9 years 10 months ago #59426 by DPaW
Replied by DPaW on topic Featured event module
Ok,

This isn't ideal, but I was able to modify the upcoming events module. II overwrote the "improved.php" file

if anyone wants to try the same, here's the code, note I am using Bootstrap 3 and Font awesome

i had to disable to call to the JavaScript file and colorbox, as i have another events module loading on the same page (so was getting errors)

Note* You can call thumb, short_description and other columns as well.

templates/your template/html/mod_eb_eventsimproved.php
Code:
<?php /** * @version 1.6.6 * @package Joomla * @subpackage Event Booking * @author Tuan Pham Ngoc * @copyright Copyright (C) 2010 - 2015 Ossolution Team * @license GNU/GPL, see LICENSE.php */ defined('_JEXEC') or die (); //JHtml::_('script', JUri::root().'components/com_eventbooking/assets/js/noconflict.js', false, false); if ($showLocation) { $width = (int) $config->map_width ; if (!$width) { $width = 800 ; } $height = (int) $config->map_height ; if (!$height) { $height = 600 ; } //EventbookingHelperJquery::colorbox('eb-colorbox-map', $width.'px', $height.'px', 'true', 'false'); } ?> <ul class="media-list"> <?php if (count($rows)) { ?> <?php foreach ($rows as $row) { ?> <li class="media"> <div class="pull-left media-left"> <a href="<?php echo JRoute::_(EventbookingHelperRoute::getEventRoute($row->id, 0, $itemId)); ?>" class="thumbnail"> <img src="/media/com_eventbooking/images/thumbs/<?php echo $row->thumb ; ?>" alt="<?php echo $row->title ; ?>" class="media-object" /> </a> </div> <div class="media-body"> <h4 class="media-heading"><?php echo $row->title ; ?></h4> <p> <button type="button" class="btn btn-default btn-small btn-sm" disabled="disabled"><i class="icon-calendar fa fa-fw fa-calendar-o"></i> <?php echo JHTML::_('date', $row->event_date, $config->event_date_format, null); ?></button> <a href="<?php echo JRoute::_(EventbookingHelperRoute::getEventRoute($row->id, 0, $itemId)); ?>" class="btn btn-primary btn-small btn-sm"><i class="fa fa-ticket"></i> Get tickets</a> </p> <?php if ($showLocation || $showCategory) { ?> <p> <?php if ($showLocation && strlen($row->location_name)) { ?> <i class="fa fa-fw fa-map-marker"></i> <a href="<?php echo JRoute::_('index.php?option=com_eventbooking&view=map&location_id='.$row->location_id.'&tmpl=component&format=html&Itemid='.$itemId); ?>" class="eb-colorbox-map"><?php echo $row->location_name ; ?></a> <?php } if ($showCategory) { ?> <i class="fa fa-fw fa-folder"></i> <?php echo $row->categories ; ?> <?php } ?> </p> <?php } ?> </p> <p><?php echo $row->short_description ; ?></p> </div> </li> <?php } ?> <?php } else { ?> <li class="media"><div class="media-body"><?php echo JText::_('EB_NO_UPCOMING_EVENTS') ?></div></li> <?php } ?> </ul>
Last edit: 9 years 10 months ago by DPaW.

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

Moderators: Tuan Pham Ngoc