aboutsummaryrefslogtreecommitdiff
path: root/views/rss/river
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 10:54:17 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 10:54:17 +0000
commit12beb0e6ca3d8c1a72855a7fd61481cf2f6db22b (patch)
tree7d0d4371100e73aa982de875c56953d6f74381ba /views/rss/river
parent6172577d65ed2fa82c07c92c032e7aa727ffabeb (diff)
downloadelgg-12beb0e6ca3d8c1a72855a7fd61481cf2f6db22b.tar.gz
elgg-12beb0e6ca3d8c1a72855a7fd61481cf2f6db22b.tar.bz2
Improvements to elgg_view, plus river dashboard RSS feed
git-svn-id: https://code.elgg.org/elgg/trunk@3053 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/rss/river')
-rw-r--r--views/rss/river/item/list.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/views/rss/river/item/list.php b/views/rss/river/item/list.php
new file mode 100644
index 000000000..4bc715048
--- /dev/null
+++ b/views/rss/river/item/list.php
@@ -0,0 +1,42 @@
+<?php
+
+ 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 = $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
+
+ }
+
+ $i++;
+ if ($i >= $vars['limit']) break;
+
+ }
+
+ }
+
+
+?> \ No newline at end of file