diff options
Diffstat (limited to 'mod/bookmarks/views')
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/js.php | 2 | ||||
-rw-r--r-- | mod/bookmarks/views/default/object/bookmarks.php | 1 | ||||
-rw-r--r-- | mod/bookmarks/views/rss/object/bookmarks.php | 36 |
3 files changed, 26 insertions, 13 deletions
diff --git a/mod/bookmarks/views/default/bookmarks/js.php b/mod/bookmarks/views/default/bookmarks/js.php index 0e55c510a..c36823c09 100644 --- a/mod/bookmarks/views/default/bookmarks/js.php +++ b/mod/bookmarks/views/default/bookmarks/js.php @@ -7,6 +7,6 @@ elgg.bookmarks.init = function() { var e = $('a.elgg-bookmark-page'); var link = e.attr('href') + '&title=' + encodeURIComponent(title); e.attr('href', link); -} +}; elgg.register_hook_handler('init', 'system', elgg.bookmarks.init); diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php index ba8029a54..89a0d03e0 100644 --- a/mod/bookmarks/views/default/object/bookmarks.php +++ b/mod/bookmarks/views/default/object/bookmarks.php @@ -79,7 +79,6 @@ HTML; echo elgg_view('object/elements/full', array( 'entity' => $bookmark, - 'title' => $bookmark->title, 'icon' => $owner_icon, 'summary' => $summary, 'body' => $body, 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; |