aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/views/rss/object
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-03 08:24:19 -0400
committerCash Costello <cash.costello@gmail.com>2011-11-03 08:24:19 -0400
commit7f8b7adeb346c8d07e2da4b72e9f78e8ffcb82b9 (patch)
treeafe696440cc41dc715fa066a92e1c1818b69ddf2 /mod/bookmarks/views/rss/object
parent21f67d2117ed460c7d8374c9b42348e2eea2b0f4 (diff)
downloadelgg-7f8b7adeb346c8d07e2da4b72e9f78e8ffcb82b9.tar.gz
elgg-7f8b7adeb346c8d07e2da4b72e9f78e8ffcb82b9.tar.bz2
Refs #4027 updated all rss views except for groups
Diffstat (limited to 'mod/bookmarks/views/rss/object')
-rw-r--r--mod/bookmarks/views/rss/object/bookmarks.php36
1 files changed, 25 insertions, 11 deletions
diff --git a/mod/bookmarks/views/rss/object/bookmarks.php b/mod/bookmarks/views/rss/object/bookmarks.php
index 8e88485f1..1abda4710 100644
--- a/mod/bookmarks/views/rss/object/bookmarks.php
+++ b/mod/bookmarks/views/rss/object/bookmarks.php
@@ -1,23 +1,37 @@
<?php
/**
- * Elgg bookmark rss view
- *
+ * Bookmark RSS object view
+ *
* @package ElggBookmarks
*/
$title = $vars['entity']->title;
if (empty($title)) {
- $title = substr($vars['entity']->description,0,32);
- if (strlen($vars['entity']->description) > 32)
- $title .= " ...";
+ $title = strip_tags($vars['entity']->description);
+ $title = elgg_get_excerpt($title, 32);
}
-?>
+$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $vars['entity']->getTimeCreated());
+$url_text = elgg_echo('bookmarks:address');
+$link = elgg_view('output/url', array('href' => $vars['entity']->address));
+$description = $vars['entity']->description . "<p>$url_text: $link</p>";
+
+$creator = elgg_view('page/components/creator', $vars);
+$georss = elgg_view('page/components/georss', $vars);
+$extension = elgg_view('extensions/item');
+
+$item = <<<__HTML
<item>
- <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid>
- <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
- <link><?php echo $vars['entity']->address; ?></link>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description>
+ <guid isPermaLink="true">$permalink</guid>
+ <pubDate>$pubdate</pubDate>
+ <link>$permalink</link>
+ <title><![CDATA[$title]]></title>
+ <description><![CDATA[$description]]></description>
+ $creator$georss$extension
</item>
+
+__HTML;
+
+echo $item;