• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Style day, mon sperate in the upcomming events mod

Style day, mon sperate in the upcomming events mod 9 years 5 months ago #29280

  • Menno
  • Menno's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I would like to style the day and month and year separately of the date in de upcoming event module. Now the date is between <small> tags. Is it possible tot ad a <span class="day"> to the day and so on? Thanks
The administrator has disabled public write access.

Style day, mon sperate in the upcomming events mod 6 years 4 months ago #37602

Yes it's possible ;)
You have to separate every part of the date in different html tags and call date($event) on every instance.

Here's my upcoming events module for Yootheme Pro UiKit3 framework as an example:
<?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="<?php echo $suffix; ?> uk-list uk-link-text">
	<?php foreach ($events as $eventid) { ?>
	<?php $details = rseventsproHelper::details($eventid->id); ?>
	<?php $image = !empty($details['image_s']) ? $details['image_s'] : rseventsproHelper::defaultImage(); ?>
 
	<?php if (isset($details['event']) && !empty($details['event'])) $event = $details['event']; else continue; ?>
	<li>
		<a <?php echo $open; ?> href="<?php echo rseventsproHelper::route('index.php?option=com_rseventspro&layout=show&id='.rseventsproHelper::sef($event->id,$event->name),true,$itemid); ?>" class="uk-text-uppercase">
	<div class="uk-card uk-grid-collapse uk-card-hover uk-card-default uk-margin-remove" uk-scrollspy="cls:uk-animation-slide-bottom" uk-grid>
    	<div class="uk-card-media-left uk-cover-container uk-width-1-6">
        <img src="<?php echo $image; ?>" alt="<?php echo $event->name; ?>" uk-cover>
        <canvas width="200" height="200"></canvas>
    	</div>
		<div class="uk-child-width-auto uk-width-5-6 uk-grid-collapse uk-flex uk-flex-middle" uk-grid>
			<div class="uk-first-column uk-margin-small-left">
    			<h3 class="uk-h1 uk-text-background"><?php echo $event->allday ? rseventsproHelper::date($event->start,"d",true) : rseventsproHelper::date($event->start,"d",true); ?></h3>
   			</div>
    		<div class="uk-margin-remove">
    			<h6 class="uk-text-small uk-text-background uk-margin-remove"><?php echo $event->allday ? rseventsproHelper::date($event->start,"M",true) : rseventsproHelper::date($event->start,"M",true); ?></h6>
				<h6 class="uk-text-small uk-margin-remove uk-text-muted"><?php echo $event->allday ? rseventsproHelper::date($event->start,"Y",true) : rseventsproHelper::date($event->start,"Y",true); ?></h6>
			</div>
			<div class="uk-width-expand uk-margin-left"><span class="uk-text-small"><?php echo $event->name; ?><span>
			</div>    
 
		</div>
    </div>
    </a>
	</li>
	<?php } ?>
</ul>
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!