aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 03:42:52 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-30 03:42:52 +0000
commitc96af4a469b6e990ac3067ad691b46822deadf30 (patch)
tree49601c6afbdd7b0be1969da8b375ca076c6ec9d0 /views
parent42ae2d2d1face8c781b6aef3140f4ec183d6f8a1 (diff)
downloadelgg-c96af4a469b6e990ac3067ad691b46822deadf30.tar.gz
elgg-c96af4a469b6e990ac3067ad691b46822deadf30.tar.bz2
supporting river rss
git-svn-id: http://code.elgg.org/elgg/trunk@7766 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/rss/canvas/default.php13
-rw-r--r--views/rss/core/river/body.php32
-rw-r--r--views/rss/layout/objects/image_block.php7
-rw-r--r--views/rss/output/url.php6
4 files changed, 45 insertions, 13 deletions
diff --git a/views/rss/canvas/default.php b/views/rss/canvas/default.php
deleted file mode 100644
index 4b8d12e6d..000000000
--- a/views/rss/canvas/default.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-/**
- * Elgg default layout
- *
- * @package Elgg
- * @subpackage Core
- */
-
-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/rss/core/river/body.php b/views/rss/core/river/body.php
new file mode 100644
index 000000000..a168dd6a9
--- /dev/null
+++ b/views/rss/core/river/body.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() . 'pg/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>
diff --git a/views/rss/layout/objects/image_block.php b/views/rss/layout/objects/image_block.php
new file mode 100644
index 000000000..ff94bcff2
--- /dev/null
+++ b/views/rss/layout/objects/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/output/url.php b/views/rss/output/url.php
new file mode 100644
index 000000000..e0b94bf8d
--- /dev/null
+++ b/views/rss/output/url.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * RSS url view
+ *
+ */
+echo elgg_view('output/url', $vars, false, false, 'default');