Hi, i have the Module for Events on my Site and i dont see the images from event in this. Before last update i have the images there. What can be the problem?
THX
HI, Ronny Wunderlich.
Current events module doesn't display events images but a kind of calendar card with title and other details.
Hi, but in last versions was the image from Event or not? And when it was why not in the current version?
Is it possible in any way to display it? I like it more than the calendar card.
Hi, Ronny Wunderlich.
It could be done but after customizing module.
it was designers decision to change it look...
I'll mark your thread as Pending Support and in my spare time I'll prepare a customization. But be aware that it will take a while ;0
I'll update you with a solution.
Thanx for help!
Hi.
Copy this file:
ROOT/modules/mod_community_events/tmpl/default.php
to:
ROOT/templates/your-template/html/mod_community_events (if you don't have "html" or "mod_community_events" folders, feel free to create them)
Edit file and replace this (starting from line 12 up to 38):
<div>
<div class="app-box-content">
<ul class="cThumbDetails cResetList">
<?php foreach ($events as $event) { ?>
<li <?php if (!empty($event->summary)): ?>class="jomNameTips" title="<?php echo CStringHelper::escape($event->summary); ?>" <?php endif; ?>>
<b class="cThumb-Calendar cFloat-L">
<b><?php echo CEventHelper::formatStartDate($event, JText::_('M')); ?></b>
<b><?php echo CEventHelper::formatStartDate($event, JText::_('d')); ?></b>
</b>
<div class="cThumb-Detail">
<a href="<?php echo $event->getLink(); ?>" class="cThumb-Title"><?php echo CStringHelper::escape($event->title); ?></a>
<div class="cThumb-Location">
<?php echo CStringHelper::escape($event->location); ?>
</div>
<div class="cThumb-Members small">
<a href="<?php echo $event->getGuestLink(COMMUNITY_EVENT_STATUS_ATTEND); ?>">
<?php echo JText::sprintf((!CStringHelper::isSingular($event->confirmedcount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY' : 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $event->confirmedcount); ?>
</a>
</div>
</div>
</li>
<?php } ?>
</ul>
</div>
<div class="app-box-footer">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events'); ?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_EVENTS'); ?></a>
</div>
</div>
<div>
<div class="app-box-content">
<ul class="cThumbDetails cResetList">
<?php foreach ($events as $event) { ?>
<li <?php if (!empty($event->summary)): ?>class="jomNameTips" title="<?php echo CStringHelper::escape($event->summary); ?>" <?php endif; ?>>
<?php if($event->thumb) { ?>
<a href="<?php echo $event->getLink(); ?>" title="<?php echo CStringHelper::escape($event->title); ?>" class="cThumb-Calendar-image">
<img src="<?php echo $event->thumb; ?>" alt="<?php echo CStringHelper::escape($event->title); ?>">
</a>
<?php } else { ?>
<b class="cThumb-Calendar cFloat-L">
<b><?php echo CEventHelper::formatStartDate($event, JText::_('M')); ?></b>
<b><?php echo CEventHelper::formatStartDate($event, JText::_('d')); ?></b>
</b>
<?php } ?>
<?php if($event->thumb) {
$details_class = 'cThumb-Detail-image';
$event_date_start = '(' . CEventHelper::formatStartDate($event, JText::_('d')) . '.' .CEventHelper::formatStartDate($event, JText::_('M')) . ')';
} else {
$details_class = 'cThumb-Detail';
$event_date_start = '';
}
?>
<div class="<?php echo $details_class; ?>">
<a href="<?php echo $event->getLink(); ?>" class="cThumb-Title"><?php echo CStringHelper::escape($event->title) . ' ' . $event_date_start; ?></a>
<div class="cThumb-Location">
<?php echo CStringHelper::escape($event->location); ?>
</div>
<div class="cThumb-Members small">
<a href="<?php echo $event->getGuestLink(COMMUNITY_EVENT_STATUS_ATTEND); ?>">
<?php echo JText::sprintf((!CStringHelper::isSingular($event->confirmedcount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY' : 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $event->confirmedcount); ?>
</a>
</div>
</div>
</li>
<?php } ?>
</ul>
</div>
<div class="app-box-footer">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events'); ?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_EVENTS'); ?></a>
</div>
</div>
.cThumb-Calendar-image {
float:left !important;
width: 64px;
}
.cThumb-Detail-image {
margin: 0 0 0 75px;
}
Its works great! THX a lot!