diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-30 03:42:52 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-30 03:42:52 +0000 |
commit | c96af4a469b6e990ac3067ad691b46822deadf30 (patch) | |
tree | 49601c6afbdd7b0be1969da8b375ca076c6ec9d0 /views/rss/core | |
parent | 42ae2d2d1face8c781b6aef3140f4ec183d6f8a1 (diff) | |
download | elgg-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/rss/core')
-rw-r--r-- | views/rss/core/river/body.php | 32 |
1 files changed, 32 insertions, 0 deletions
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> |