diff options
-rw-r--r-- | views/rss/canvas/default.php | 13 | ||||
-rw-r--r-- | views/rss/core/river/body.php | 32 | ||||
-rw-r--r-- | views/rss/layout/objects/image_block.php | 7 | ||||
-rw-r--r-- | views/rss/output/url.php | 6 |
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'); |