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/event_calendar/show_events.php | 7 +++++ views/ical/object/event_calendar.php | 44 +++++++++++++++++++++++++++++++ views/ical/page/default.php | 17 ++++++++++++ views/ical/page/layouts/default.php | 2 ++ 4 files changed, 70 insertions(+) create mode 100644 views/ical/event_calendar/show_events.php create mode 100644 views/ical/object/event_calendar.php create mode 100644 views/ical/page/default.php create mode 100644 views/ical/page/layouts/default.php (limited to 'views/ical') diff --git a/views/ical/event_calendar/show_events.php b/views/ical/event_calendar/show_events.php new file mode 100644 index 000000000..19981596f --- /dev/null +++ b/views/ical/event_calendar/show_events.php @@ -0,0 +1,7 @@ +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 diff --git a/views/ical/page/default.php b/views/ical/page/default.php new file mode 100644 index 000000000..b8347c9a0 --- /dev/null +++ b/views/ical/page/default.php @@ -0,0 +1,17 @@ + +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Curverider Ltd//NONSGML Elgg //EN + +END:VCALENDAR diff --git a/views/ical/page/layouts/default.php b/views/ical/page/layouts/default.php new file mode 100644 index 000000000..57598fa1b --- /dev/null +++ b/views/ical/page/layouts/default.php @@ -0,0 +1,2 @@ +