aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/ical/canvas/default.php20
-rw-r--r--views/ical/export/entity.php35
-rw-r--r--views/ical/object/default.php16
-rw-r--r--views/ical/pageshells/pageshell.php23
-rw-r--r--views/ical/search/entity_list.php20
5 files changed, 114 insertions, 0 deletions
diff --git a/views/ical/canvas/default.php b/views/ical/canvas/default.php
new file mode 100644
index 000000000..bda23f11f
--- /dev/null
+++ b/views/ical/canvas/default.php
@@ -0,0 +1,20 @@
+<?php
+ /**
+ * Elgg ICAL output
+ *
+ * @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/
+ *
+ */
+
+ for ($i = 1; $i < 8; $i++) {
+
+ if (isset($vars["area{$i}"]))
+ echo $vars["area{$i}"];
+
+ }
+?> \ No newline at end of file
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
diff --git a/views/ical/object/default.php b/views/ical/object/default.php
new file mode 100644
index 000000000..4b9b075f6
--- /dev/null
+++ b/views/ical/object/default.php
@@ -0,0 +1,16 @@
+<?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/
+ *
+ */
+
+ elgg_view('export/entity', $vars);
+
+?> \ No newline at end of file
diff --git a/views/ical/pageshells/pageshell.php b/views/ical/pageshells/pageshell.php
new file mode 100644
index 000000000..29894cdad
--- /dev/null
+++ b/views/ical/pageshells/pageshell.php
@@ -0,0 +1,23 @@
+<?php
+
+ /**
+ * Elgg ICAL output pageshell
+ *
+ * @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/
+ *
+ */
+
+ header("Content-Type: text/calendar");
+
+ echo $vars['body'];
+?>
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Curverider Ltd//NONSGML Elgg <?php echo get_version(true); ?>//EN
+<?php echo $vars['body']; ?>
+END:VCALENDAR
diff --git a/views/ical/search/entity_list.php b/views/ical/search/entity_list.php
new file mode 100644
index 000000000..8712f7134
--- /dev/null
+++ b/views/ical/search/entity_list.php
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Elgg default layout
+ *
+ * @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/
+ */
+
+ $entities = $vars['entities'];
+ if (is_array($entities) && sizeof($entities) > 0) {
+ foreach($entities as $entity)
+ echo elgg_view_entity($entity);
+ }
+
+?> \ No newline at end of file