From 8b595e63700e1ebaf0f31b08b0009922acc780e3 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Wed, 28 Sep 2011 17:02:51 +0200 Subject: restored RSS feed and added iCal feed --- views/ical/object/event_calendar.php | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 views/ical/object/event_calendar.php (limited to 'views/ical/object') diff --git a/views/ical/object/event_calendar.php b/views/ical/object/event_calendar.php new file mode 100644 index 000000000..a6ed889e5 --- /dev/null +++ b/views/ical/object/event_calendar.php @@ -0,0 +1,44 @@ +organizer) { + $organizer = "\nORGANIZER;CN={$event->organizer}\n"; +} else { + $organizer = ''; +} + +if ($event->description) { + // make sure that we are using Unix line endings + $description = str_replace("\r\n","\n",$event->description); + $description = str_replace("\r","\n",$description); + + // now convert to icalendar format + $description = str_replace("\n",'\n',$description); + $description = wordwrap($description,75,"\r\n ",TRUE); +} else { + $description = ''; +} +?> +BEGIN:VEVENT +UID:guid; ?> + +URL:guid; ?> + +DTSTAMP:getTimeUpdated())?> + +CREATED:getTimeCreated())?> + +LAST-MODIFIED:getTimeUpdated()) ?> + +DTSTART:start_date); ?> + +DTEND:real_end_time); ?> + +SUMMARY:title; ?> + +DESCRIPTION: + +LOCATION:venue; ?> + +CATEGORIES:tags); ?> + +END:VEVENT -- cgit v1.2.3