• 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: 'Repeat On' week day name on template override

'Repeat On' week day name on template override 9 years 9 months ago #31836

Hi,
I set my event to 'recurring', in the recurring tab I set the 'Repeat On' to monday and tuesday.
All I need to do is have it set to recurring and pick a day of the week that it repeats for ever.

So in my template override for the default.php I added

if($event->recurring){
echo 'Every'
}

I now want to echo the days of the week I picked for 'Repeat on'
But I can't really find the data for the 'repeat on' in the database so I can call the right column name.

Would you mind pointing me in the right direction?

Thanks
The administrator has disabled public write access.

'Repeat On' week day name on template override 9 years 9 months ago #31850

Hi,
While I haven't got any response here in the forum.
I added the lines below to my default.php template override.

if ($event->id) {
$db = JFactory::getDbo();
$query = $db->getQuery(true);

$query->clear()
->select($db->qn('id'))
->from($db->qn('#__rseventspro_taxonomy'))
->where($db->qn('type').' = '.$db->q('days'))
->where($db->qn('ide').' = '.$event->id);

$db->setQuery($query);
$repeatweekdays = $db->loadColumn();

foreach( $repeatweekdays as $weekday){
switch ($weekday) {
case 0:
echo 'Sunday';
break;
case 1:
echo 'Monday';
break;
case 2:
echo 'Tuesday';
break;
case 3:
echo 'Wednesday';
break;
case 4:
echo 'Thrusday';
break;
case 5:
echo 'Friday';
break;
case 6:
echo 'Saturday';
break;
}
}

}

The questions are:
1 - Is there an easier/better way to achieve this?
2 - Is there any security risk by using the lines above in the template override?

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