aboutsummaryrefslogtreecommitdiff
path: root/views/rss/river/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss/river/item.php')
-rw-r--r--views/rss/river/item.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/views/rss/river/item.php b/views/rss/river/item.php
new file mode 100644
index 000000000..f84e6ccf0
--- /dev/null
+++ b/views/rss/river/item.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * RSS river view
+ *
+ * @uses $vars['item']
+ */
+$item = $vars['item'];
+
+$view = $item->getView();
+
+$name = $item->getSubjectEntity()->name;
+$body = elgg_view($item->getView(), array('item' => $item), false, false, 'default');
+$body = "$name $body";
+
+$title = strip_tags($body);
+$timestamp = date('r', $item->getPostedTime());
+
+$object = $item->getObjectEntity();
+if ($object) {
+ $url = htmlspecialchars($object->getURL());
+} else {
+ $url = elgg_get_site_url() . 'activity';
+}
+
+?>
+<item>
+ <guid isPermaLink='true'><?php echo $url; ?></guid>
+ <pubDate><?php echo $timestamp; ?></pubDate>
+ <link><?php echo $url; ?></link>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <description><![CDATA[<?php echo ($body); ?>]]></description>
+</item>