[Plugin: Events Manager] ical templates out-of-date
-
G’day Marcus,
The templates for ical are now out of date since the reorg of the EM_Event object. I just fixed my ical code which was loosely based on one of those templates (I use an AJAX-style link to deliver an .ics file for event from a link on the event-single template); here’s the most pertinent bit relating to start and end dates:
$gmtOffset = 60 * 60 * get_option('gmt_offset'); $ics[] = 'DTSTART:' . date('Ymd\THis\Z', strtotime("{$EM_Event->event_start_date} {$EM_Event->event_start_time}") - $gmtOffset); $ics[] = 'DTEND:' . date('Ymd\THis\Z', strtotime("{$EM_Event->event_end_date} {$EM_Event->event_end_time}") - $gmtOffset); $ics[] = 'DTSTAMP:' . date('Ymd\THis\Z', strtotime($EM_Event->event_modified) - $gmtOffset);
There are other bits where field names now need event_ prefix etc, but that date/time one just bit me in the bum twice today so I thought I’d share in case anyone else needs it.
(I should probably write up a blog post about this sometime, but in the meantime you might want to drop that into your templates when you get around to updating them)
- The topic ‘[Plugin: Events Manager] ical templates out-of-date’ is closed to new replies.