• 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: Adding .ics link for calender in RSfrom User Email

Adding .ics link for calender in RSfrom User Email 2 years 3 months ago #41741

  • rakeshy
  • rakeshy's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 94
  • Thank you received: 3
This setup requires integration of RSform.

1. Create hidden field with name: Event_ID
2. Add this code inside the "Default Value" box:
//<code>
return JFactory::getApplication()->input->getInt('id');
//</code>

3. Change User Email message and add this URL:
https://YOURDOMAIN/index.php?option=com_rseventspro&task=rseventspro.export&id={Event_ID:value}:new-event
Note: Check that your email keeps the full URL intact and doesn't make it relative (JCE texteditor can do this automatically).

Example:
<a href="https://YOURDOMAIN/index.php?option=com_rseventspro&task=rseventspro.export&id={Event_ID:value}:new-event"><button type="button">ADD TO YOUR AGENDA</button></a>



Other solution:

you could try achieving this by saving the file on your server and attach it to your user email, through a script as the following in 'PHP Email Scripts - Script called before the User Email is sent' area:
$icsFile = JPATH_SITE.'/tmp/user-ics-'.$SubmissionId.'.ics';
$http = JHttpFactory::getHttp();
$data = $http->get(JUri::root().'index.php?option=com_rseventspro&task=rseventspro.export&id={Event_ID:value}:new-event);
if ($data)
{
   file_put_contents($icsFile, $response->body);
}
 
$userEmail['files'][] = $icsFile';



Hope this helps you
Solution is provided with support from the RSjoomla support-team.
Last Edit: 2 years 3 months ago by rakeshy.
The administrator has disabled public write access.

Adding .ics link for calender in RSfrom User Email 2 years 3 months ago #41757

  • rakeshy
  • rakeshy's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 94
  • Thank you received: 3
Please note that RSEvents!Pro exports the events to .ics in UTC time.

For Mac users, you might need to enable the "Turn on time zone support" in Calender>Preferences>Advanced tab
support.apple.com/guide/icloud/change-th...ne-mmfbbb458d/icloud

Since the RSevents!Pro export has this format:
DTSTART:20211230T190000Z
DTEND:20211230T220000Z
Instead of
DTSTART;TZID=Europe/Amsterdam:20211230T190000
DTEND;TZID=Europe/Amsterdam:20211230T220000
Last Edit: 2 years 3 months ago by rakeshy.
The administrator has disabled public write access.

Adding .ics link for calender in RSfrom User Email 2 years 3 months ago #41758

  • rakeshy
  • rakeshy's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 94
  • Thank you received: 3
Not many people will make the effort of changing their advanced settings.
So I changed the source file ical.php inside Components>com_rseventspro>helpers at line 60

From
if ($event->allday) {
$vevent->setProperty('dtstart', rseventsproHelper::showdate($event->start,'Ymd'), array("VALUE" => "DATE"));
} else {
$vevent->setProperty('dtstart', array($start->format('Y'), $start->format('m'), $start->format('d'), $start->format('H'), $start->format('i'), $start->format('s'), 'tz' => 'Z'));
$vevent->setProperty('dtend', array($end->format('Y'), $end->format('m'), $end->format('d'), $end->format('H'), $end->format('i'), $end->format('s'), 'tz' => 'Z'));
}

to
if ($event->allday) {
$vevent->setProperty('dtstart', rseventsproHelper::showdate($event->start,'Ymd'), array("VALUE" => "DATE"));
} else {
$vevent->setProperty('dtstart', array('tz' => 'Europe/Amsterdam', $start->format('Y'), $start->format('m'), $start->format('d'), $start->format('H'), $start->format('i'), $start->format('s')));
$vevent->setProperty('dtend', array( 'tz' => 'Europe/Amsterdam', $end->format('Y'), $end->format('m'), $end->format('d'), $end->format('H'), $end->format('i'), $end->format('s')));
}

Ofcourse, you need to change the TZ "'Europe/Amsterdam" to your own TimeZone.
Hope it is of use, let me know with the thank you button.


Note:With RSevents update, this might be removed again.
Last Edit: 2 years 3 months ago by rakeshy.
The administrator has disabled public write access.

Adding .ics link for calender in RSfrom User Email 2 years 2 months ago #41886

  • rakeshy
  • rakeshy's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 94
  • Thank you received: 3
If you still have problems with the times, try something simple like:
, $start->format('H')+1,
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!