aboutsummaryrefslogtreecommitdiff
path: root/views/rss/river
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-17 20:12:55 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-17 20:12:55 +0000
commitfcc8efa279aab75419022bd8fc1b3134023c7806 (patch)
treeea9d162ea0cfe5969cef9dd960460b4c68a909a7 /views/rss/river
parent63159053d7f94c4e32d48ebc0ab90733070e0215 (diff)
downloadelgg-fcc8efa279aab75419022bd8fc1b3134023c7806.tar.gz
elgg-fcc8efa279aab75419022bd8fc1b3134023c7806.tar.bz2
Updating RSS feeds to use proper views called with page_shells.
git-svn-id: http://code.elgg.org/elgg/trunk@6073 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/rss/river')
-rw-r--r--views/rss/river/item/list.php50
1 files changed, 22 insertions, 28 deletions
diff --git a/views/rss/river/item/list.php b/views/rss/river/item/list.php
index 5ac43c544..8047c24bf 100644
--- a/views/rss/river/item/list.php
+++ b/views/rss/river/item/list.php
@@ -6,39 +6,33 @@
* @link http://elgg.org/
*/
-if (isset($vars['items']) && is_array($vars['items'])) {
-
- $i = 0;
- if (!empty($vars['items'])) {
- foreach($vars['items'] as $item) {
-
- // echo elgg_view_river_item($item);
- if (elgg_view_exists($item->view,'default')) {
- $body = elgg_view($item->view,array('item' => $item),false,false,'default');
- $time = date("r",$item->posted);
- if ($entity = get_entity($item->object_guid)) {
- $url = htmlspecialchars($entity->getURL());
- } else {
- $url = $vars['url'];
- }
- $title = strip_tags($body);
-
- ?>
- <item>
- <guid isPermaLink='true'><?php echo $url; ?></guid>
- <pubDate><?php echo $time; ?></pubDate>
- <link><?php echo $url; ?></link>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <description><![CDATA[<?php echo (autop($body)); ?>]]></description>
- </item>
- <?php
-
+if (isset($vars['items']) && is_array($vars['items']) && !empty($vars['items'])) {
+ foreach($vars['items'] as $item) {
+ if (elgg_view_exists($item->view)) {
+ $body = elgg_view($item->view, array('item' => $item));
+ $time = date('r', $item->posted);
+ if ($entity = get_entity($item->object_guid)) {
+ $url = htmlspecialchars($entity->getURL());
+ } else {
+ $url = $vars['url'];
}
+ $title = strip_tags($body);
+
+ echo <<<__HTML
+<item>
+ <guid isPermaLink="true">$url</guid>
+ <pubDate>$time</pubDate>
+ <title><![CDATA[$title]]></title>
+ <link>$url</link>
+ <description><![CDATA[$body]]></description>
+</item>
+__HTML;
+
$i++;
if ($i >= $vars['limit']) {
break;
}
}
}
-} \ No newline at end of file
+}