diff options
Diffstat (limited to 'mod/bookmarks')
-rw-r--r-- | mod/bookmarks/languages/en.php | 4 | ||||
-rw-r--r-- | mod/bookmarks/views/rss/object/bookmarks.php | 36 |
2 files changed, 27 insertions, 13 deletions
diff --git a/mod/bookmarks/languages/en.php b/mod/bookmarks/languages/en.php index 0478e292f..2c589c207 100644 --- a/mod/bookmarks/languages/en.php +++ b/mod/bookmarks/languages/en.php @@ -68,14 +68,14 @@ $english = array( */ 'bookmarks:save:success' => "Your item was successfully bookmarked.", - 'bookmarks:delete:success' => "Your bookmarked item was successfully deleted.", + 'bookmarks:delete:success' => "Your bookmark was deleted.", /** * Error messages */ 'bookmarks:save:failed' => "Your bookmark could not be saved. Make sure you've entered a title and address and then try again.", - 'bookmarks:save:invalid' => "The address of the bookmark is invalid and could nto be saved.", + 'bookmarks:save:invalid' => "The address of the bookmark is invalid and could not be saved.", 'bookmarks:delete:failed' => "Your bookmark could not be deleted. Please try again.", ); 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; |