From 4bc94301b666395106adaee96767d629b51ef445 Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 13 Feb 2010 15:32:46 +0000 Subject: Add 'export to dokuwiki calendar' functionality. --- forum/utils/calendar.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'forum') diff --git a/forum/utils/calendar.php b/forum/utils/calendar.php index 006922c..318f458 100644 --- a/forum/utils/calendar.php +++ b/forum/utils/calendar.php @@ -23,6 +23,22 @@ if($action=="addentry") { if($ZEND_DIR != "") googleCalendarEvent($event); + if($DOKUWIKI_CALENDAR != "") { + $file = $DOKUWIKI_CALENDAR; + $fp = fopen($file, "w"); + + fprintf($fp, "=====DIEs calendar=====\n"); + fprintf($fp, "Do not edit this file - it is automatically generated by the ExecutionRoom CMS.\n\n"); + fprintf($fp, "====Events====\n"); + foreach($events->events as $event) { + fprintf($fp, " * %s - %s %s: %s\n", + date("j.n.Y G:i", $event->starttime), + date("j.n.Y G:i", $event->starttime + $event->duration), + $event->title, $event->description); + } + fclose($fp); + } + notify("calendar", "New calendar entry:\n" . $title . "\n" . date("r", $time) . "\n" . $description . "\n" . $FORUM_URL . "/?mode=calendar&date=" . $time); -- cgit v1.2.3