• 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: Show startdate, starttime and endtime

Show startdate, starttime and endtime 10 years 3 months ago #30246

  • flexsus
  • flexsus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 2
Hi all

I'm trying to do a template override of the following code:
				<?php if ($event->allday) { ?>
				<?php if (!empty($event->options['start_date_list'])) { ?>
				<?php echo rseventsproHelper::date($event->start,$this->config->global_date,true); ?>
				<?php } ?>
				<?php } else { ?>
				<?php if (!empty($event->options['start_date_list']) && !empty($event->options['end_date_list'])) { ?>
				<?php echo rseventsproHelper::date($event->start,rseventsproHelper::showMask('list_start',$event->options),true); ?> <?php echo rseventsproHelper::date($event->end,rseventsproHelper::showMask('list_end',$event->options),true); ?>
				<?php } else if (!empty($event->options['start_date_list'])) { ?>
				<?php echo rseventsproHelper::date($event->start,rseventsproHelper::showMask('list_start',$event->options),true); ?>
				<?php } else if (!empty($event->options['end_date_list'])) { ?>
				<?php echo rseventsproHelper::date($event->end,rseventsproHelper::showMask('list_end',$event->options),true); ?>
				<?php } ?>
				<?php } ?>

For an event I would like to show startdate, starttime and endtime, e.g. like:
28.01.2015, 08:30-13:00

How can I get the endtime out? I know I can set config to not show end date and time, but as in above, if you disable enddate, then endtime will not show, whether set or not.

Regards,
Henrik
The administrator has disabled public write access.

Show startdate, starttime and endtime 10 years 2 months ago #30498

  • flexsus
  • flexsus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 2
Solved!

This is what I did in /templates/my-template/html/mod_rseventspro_upcoming/default.php:
		<?php if ($event->allday) { ?>
		<?php if (!empty($event->options['start_date_list'])) { ?>
		<?php echo rseventsproHelper::date($event->start,rseventsproHelper::getConfig('global_date'),true); ?>
		<?php } ?>
 
		<?php } else { ?>
		<?php if (!empty($event->options['start_date_list']) && !empty($event->options['end_date_list'])) { ?>		
		<?php echo rseventsproHelper::date($event->start,'d.m.Y') ; ?> <?php echo JText::_('COM_RSEVENTSPRO_GLOBAL_TO_LOWERCASE'); ?> <?php echo rseventsproHelper::date($event->end,'d.m.Y'); ?>, <?php echo JText::_('COM_RSEVENTSPRO_TIME'); ?> <?php echo rseventsproHelper::date($event->start,'H:i'); ?>-<?php echo rseventsproHelper::date($event->end,'H:i'); ?>
 
		<?php } else if (!empty($event->options['start_date_list'])) { ?>
		<?php echo rseventsproHelper::date($event->start,'d.m.Y') ; ?>, <?php echo JText::_('COM_RSEVENTSPRO_TIME'); ?> <?php echo rseventsproHelper::date($event->start,'H:i'); ?>-<?php echo rseventsproHelper::date($event->end,'H:i'); ?>
 
		<?php } else if (!empty($event->options['end_date_list'])) { ?>
		<?php echo rseventsproHelper::date($event->end,'d.m.Y'); ?>, <?php echo JText::_('COM_RSEVENTSPRO_TIME'); ?> <?php echo rseventsproHelper::date($event->end,'H:i'); ?>
		<?php } ?>
 
		<?php } ?>

Henrik
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!