aboutsummaryrefslogtreecommitdiff
path: root/views/rss/page/components
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss/page/components')
-rw-r--r--views/rss/page/components/creator.php14
-rw-r--r--views/rss/page/components/gallery.php8
-rw-r--r--views/rss/page/components/georss.php15
-rw-r--r--views/rss/page/components/image_block.php7
-rw-r--r--views/rss/page/components/list.php14
5 files changed, 58 insertions, 0 deletions
diff --git a/views/rss/page/components/creator.php b/views/rss/page/components/creator.php
new file mode 100644
index 000000000..a14f1dbca
--- /dev/null
+++ b/views/rss/page/components/creator.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Creator view
+ *
+ * Implements Dublin Core creator
+ *
+ * @uses $vars['entity']
+ */
+
+$owner = $vars['entity']->getOwnerEntity();
+if ($owner) {
+ $owner_name = htmlspecialchars($owner->name, ENT_NOQUOTES, 'UTF-8');
+ echo "<dc:creator>$owner_name</dc:creator>";
+}
diff --git a/views/rss/page/components/gallery.php b/views/rss/page/components/gallery.php
new file mode 100644
index 000000000..690416e5b
--- /dev/null
+++ b/views/rss/page/components/gallery.php
@@ -0,0 +1,8 @@
+<?php
+/*
+ * RSS gallery view
+ *
+ * @uses $vars['items']
+ */
+
+echo elgg_view('page/components/list', $vars);
diff --git a/views/rss/page/components/georss.php b/views/rss/page/components/georss.php
new file mode 100644
index 000000000..d176b8cac
--- /dev/null
+++ b/views/rss/page/components/georss.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * GeoRSS view
+ *
+ * This implements GeoRSS-Simple
+ *
+ * @uses $vars['entity']
+ */
+
+$longitude = $vars['entity']->getLongitude();
+$latitude = $vars['entity']->getLatitude();
+
+if ($vars['entity'] instanceof Locatable && $longitude && $latitude) {
+ echo "<georss:point>$latitude $longitude</georss:point>";
+}
diff --git a/views/rss/page/components/image_block.php b/views/rss/page/components/image_block.php
new file mode 100644
index 000000000..ff94bcff2
--- /dev/null
+++ b/views/rss/page/components/image_block.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * RSS image block view
+ *
+ * Only display the body
+ */
+echo $vars['body']; \ No newline at end of file
diff --git a/views/rss/page/components/list.php b/views/rss/page/components/list.php
new file mode 100644
index 000000000..2650fc006
--- /dev/null
+++ b/views/rss/page/components/list.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * RSS list view
+ *
+ * @uses $vars['items']
+ */
+
+$items = $vars['items'];
+
+if (is_array($items) && sizeof($items) > 0) {
+ foreach ($items as $item) {
+ echo elgg_view_list_item($item, $vars);
+ }
+} \ No newline at end of file