diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-06-19 14:36:30 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-06-19 14:36:30 +0000 |
commit | f81bbaa623dc62e1c4ae01c5b1e90006dd476a6a (patch) | |
tree | 34eb1b9614e15815cdf09fca1bf7d67ac22a1b6e /views/ical/export | |
parent | 720b81320ee4c7b759ef6358e6f4a0b7893c1386 (diff) | |
download | elgg-f81bbaa623dc62e1c4ae01c5b1e90006dd476a6a.tar.gz elgg-f81bbaa623dc62e1c4ae01c5b1e90006dd476a6a.tar.bz2 |
Closes #581: First draft ICAL export views for Notable calendar events.
git-svn-id: https://code.elgg.org/elgg/trunk@3347 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/ical/export')
-rw-r--r-- | views/ical/export/entity.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/views/ical/export/entity.php b/views/ical/export/entity.php new file mode 100644 index 000000000..0413cd56a --- /dev/null +++ b/views/ical/export/entity.php @@ -0,0 +1,35 @@ +<?php + /** + * Elgg ICAL output of default object. + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.org/ + * + */ + + $entity = $vars['entity']; + + if ( + ($entity instanceof Notable) && + ($entity->getCalendarStartTime()) && + ($entity->getCalendarEndTime()) + ) + { +?> +BEGIN:VEVENT +DTSTAMP:<?php echo date("Ymd\THis\Z", $entity->getTimeCreated()); ?> +DTSTART:<?php echo date("Ymd\THis\Z", $entity->getCalendarStartTime()); ?> +DTEND:<?php echo date("Ymd\THis\Z", $entity->getCalendarEndTime()); ?> +SUMMARY:<?php echo $event->title; ?> +LAST-MODIFIED:<?php echo date("Ymd\THis\Z", $entity->getTimeUpdated()); ?> +END:VEVENT +<?php + } +?> + if ( + + )
\ No newline at end of file |