So I've been playing around with this, and I have an HTML override for the Featured Events Module. This is what I have, at [joomla_root]/templates/[template_name]/html/mod_rseventpro_featured/default.php
<?php
/**
* @package RSEvents!Pro
* @copyright (C) 2015 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$open = !$links ? 'target="_blank"' : ''; ?>
<ul class="rsepro_featured<?php echo $suffix; ?>">
<?php foreach ($events as $eventid) { ?>
<?php $details = rseventsproHelper::details($eventid->id); ?>
<?php if (isset($details['event']) && !empty($details['event'])) $event = $details['event']; else continue; ?>
<li>
<div class="imgcontainer"></div>
<div class="textcontainer">
<div class="titlecontainer">
<a href="<?php echo rseventsproHelper::route('index.php?option=com_rseventspro&layout=show&id='.rseventsproHelper::sef($event->id,$event->name),true,$itemid); ?>"><?php echo $event->name; ?></a>
</div>
<div class="datecontainer">
<?php echo $event->allday ? rseventsproHelper::showdate($event->start,rseventsproHelper::getConfig('global_date'),true) : rseventsproHelper::showdate($event->start,null,true); ?>
</div>
<div class="locationcontainer">
<?php if ($event->locationid && $event->lpublished && !empty($event->options['show_location_list'])) { ?>
<span class="rsepro-event-location-block" itemprop="location" itemscope itemtype="http://schema.org/Place"><?php echo JText::_('COM_RSEVENTSPRO_GLOBAL_AT'); ?> <a itemprop="url" href="<?php echo rseventsproHelper::route('index.php?option=com_rseventspro&layout=location&id='.rseventsproHelper::sef($event->locationid,$event->location)); ?>"><span itemprop="name"><?php echo $event->location; ?></span></a>
<span itemprop="address" style="display:none;"><?php echo $event->address; ?></span>
</span>
<?php } ?>
</div>
</div>
</li>
<?php } ?>
</ul>
Right now, you can see the output for this at
mckinleypark.org in the "Featured Events" listing on the home page. I would like to also display an event icon alongside the text ala the RSEventsPro Events view for the component. An example of this is available here:
mckinleypark.org/events
I've been looking at the code for the component view to see if I can use it to display the event icons in the Featured Events module. In particular, I found this:
<?php if (!empty($event->options['show_icon_list'])) { ?>
<div class="rs_event_image" itemprop="image">
<a href="<?php echo rseventsproHelper::route('index.php?option=com_rseventspro&layout=show&id='.rseventsproHelper::sef($event->id,$event->name),false,rseventsproHelper::itemid($event->id)); ?>" class="rs_event_link thumbnail">
<img src="<?php echo rseventsproHelper::thumb($event->id, $this->config->icon_small_width); ?>" alt="" width="<?php echo $this->config->icon_small_width; ?>" />
</a>
</div>
<?php } ?>
I've tried various iterations of this image insertion code in my Featured Events module override, but I either get PHP errors ("$this" not instantiated), or it only shows the default icon in a very large format. I know this is what needs to be fixed:
<img src="<?php echo rseventsproHelper::thumb($event->id, $this->config->icon_small_width); ?>" alt="" width="<?php echo $this->config->icon_small_width; ?>" />
Can anyone help come up with the proper syntax to properly display each event's icon? I know I'm close, but being a newbie coder, I can't figure out exactly to what I need to refer to pull in the image.
Thanks in advance for any help or feedback!