• 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: Single day event; single date

Single day event; single date 11 years 3 months ago #26306

  • denelan
  • denelan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Is there a way to get rid of the second date when an event is only on one day, in stead of showing the date with the start and end time, on the same date?
The administrator has disabled public write access.

Single day event; single date 10 years 5 months ago #29429

  • admin565
  • admin565's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Were you able to figure out a way to do this? I'm looking to do the same - show the start date, start time, end time without showing an end date.
The administrator has disabled public write access.

Single day event; single date 10 years 3 months ago #29903

  • phaedrap
  • phaedrap's Avatar
  • OFFLINE
  • Fresh Boarder
  • Firmitas, Utilitas et Venustas
  • Posts: 3
Hi,

In event views templates I found 2 <div>'s with style="display: none" already coded.

BASIC SYNOPSIS

By removing the style for 2 <div>'s already coded in RSEvents!Pro template's you can show the event start/end day and time.

Change the ($event->start,'Y-m-d H:i:s') in the <div>'s to your liking based on the PHP: date manual
http://php.net/manual/en/function.date.php

HOW TO

Go to the event views templates folder on your server: YOURDOMAIN/components/com_rseventspro/views

Edit 2 templates located in this sub-folder: YOURDOMAIN/components/com_rseventspro/views/rseventspro/tmpl

1. default.php - events listing page
2. show.php - full event page

Edit 1 template if you are using the event calendar module: YOURDOMAIN/components/com_rseventspro/views/calendar/tmpl

1. day.php - event listing page clicked from the calendar module

Example for default.php to only show time and also show day of the week

find // lines 218 and 219
<div style="display:none"><span itemprop="startDate"><?php echo rseventsproHelper::date($event->start,'Y-m-d H:i:s'); ?></span></div>
<div style="display:none"><span itemprop="endDate"><?php echo rseventsproHelper::date($event->end,'Y-m-d H:i:s'); ?></span></div>

change to
<p><?php echo rseventsproHelper::date($event->start,'l'); ?></p>
<span itemprop="startDate"><b><?php echo rseventsproHelper::date($event->start,'g:i a'); ?></b> to 
<b><?php echo rseventsproHelper::date($event->end,'g:i a'); ?></b></span>

will render

Thursday
6:00 pm to 8:00 pm

BREAKDOWN
  • Day of the week for start date use a lower case "L" in date($event->start,'l')
  • Only Start time use the "g:i a" in date($event->start,'g:i a')
  • Only End time you use the "g:i a" in date($event->end,'g:i a')

REFERENCE

PHP: date manual
http://php.net/manual/en/function.date.php

B)
Code for Life
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!