diff options
Diffstat (limited to 'mod/bookmarks')
-rw-r--r-- | mod/bookmarks/languages/en.php | 4 | ||||
-rw-r--r-- | mod/bookmarks/manifest.xml | 2 | ||||
-rw-r--r-- | mod/bookmarks/pages/bookmarks/all.php | 4 | ||||
-rw-r--r-- | mod/bookmarks/pages/bookmarks/friends.php | 8 | ||||
-rw-r--r-- | mod/bookmarks/pages/bookmarks/view.php | 1 | ||||
-rw-r--r-- | mod/bookmarks/start.php | 2 | ||||
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/bookmarklet.php | 9 | ||||
-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 |
10 files changed, 44 insertions, 25 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/manifest.xml b/mod/bookmarks/manifest.xml index 679d3f1d8..b95af87f8 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -10,7 +10,7 @@ <description>Adds the ability for users to bookmark internal and external sites. Other users can then comment on the bookmarks.</description> <website>http://www.elgg.org/</website> <copyright>See COPYRIGHT.txt</copyright> - <license>GNU Public License version 2</license> + <license>GNU General Public License version 2</license> <requires> <type>elgg_release</type> <version>1.8</version> diff --git a/mod/bookmarks/pages/bookmarks/all.php b/mod/bookmarks/pages/bookmarks/all.php index d9ac2767f..f57776752 100644 --- a/mod/bookmarks/pages/bookmarks/all.php +++ b/mod/bookmarks/pages/bookmarks/all.php @@ -20,6 +20,10 @@ $content = elgg_list_entities(array( 'view_toggle_type' => false )); +if (!$content) { + $content = elgg_echo('bookmarks:none'); +} + $title = elgg_echo('bookmarks:everyone'); $body = elgg_view_layout('content', array( diff --git a/mod/bookmarks/pages/bookmarks/friends.php b/mod/bookmarks/pages/bookmarks/friends.php index be164fcec..15b1da098 100644 --- a/mod/bookmarks/pages/bookmarks/friends.php +++ b/mod/bookmarks/pages/bookmarks/friends.php @@ -5,19 +5,19 @@ * @package ElggBookmarks */ -$owner = elgg_get_page_owner_entity(); +$page_owner = elgg_get_page_owner_entity(); if (!$page_owner) { forward('bookmarks/all'); } -elgg_push_breadcrumb($owner->name, "bookmarks/owner/$owner->username"); +elgg_push_breadcrumb($page_owner->name, "bookmarks/owner/$page_owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); elgg_register_title_button(); $title = elgg_echo('bookmarks:friends'); -$content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false); +$content = list_user_friends_objects($page_owner->guid, 'bookmarks', 10, false); if (!$content) { $content = elgg_echo('bookmarks:none'); } @@ -30,4 +30,4 @@ $params = array( $body = elgg_view_layout('content', $params); -echo elgg_view_page($title, $body);
\ No newline at end of file +echo elgg_view_page($title, $body); diff --git a/mod/bookmarks/pages/bookmarks/view.php b/mod/bookmarks/pages/bookmarks/view.php index 8e097b090..2439d2ee8 100644 --- a/mod/bookmarks/pages/bookmarks/view.php +++ b/mod/bookmarks/pages/bookmarks/view.php @@ -28,7 +28,6 @@ $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'header' => '', )); echo elgg_view_page($title, $body); diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 2a7b44e97..21a2d8940 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -83,6 +83,7 @@ function bookmarks_init() { * Title is ignored * * @param array $page + * @return bool */ function bookmarks_page_handler($page) { elgg_load_library('elgg:bookmarks'); @@ -151,7 +152,6 @@ function bookmarks_page_handler($page) { } elgg_pop_context(); - return true; } diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php index 1d0b25498..b3e9737fe 100644 --- a/mod/bookmarks/views/default/bookmarks/bookmarklet.php +++ b/mod/bookmarks/views/default/bookmarks/bookmarklet.php @@ -20,13 +20,16 @@ if (!$name && ($user = elgg_get_logged_in_user_entity())) { } $url = elgg_get_site_url(); - +$img = elgg_view('output/img', array( + 'src' => 'mod/bookmarks/graphics/bookmarklet.gif', + 'alt' => $title, +)); $bookmarklet = "<a href=\"javascript:location.href='{$url}bookmarks/add/$guid?address='" . "+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" - . "<img src=\"{$url}mod/bookmarks/graphics/bookmarklet.gif\" alt=\"$title\" /> </a>"; + . $img . "</a>"; ?> <p><?php echo elgg_echo("bookmarks:bookmarklet:description"); ?></p> <p><?php echo $bookmarklet; ?></p> <p><?php echo elgg_echo("bookmarks:bookmarklet:descriptionie"); ?></p> -<p><?php echo elgg_echo("bookmarks:bookmarklet:description:conclusion"); ?></p>
\ No newline at end of file +<p><?php echo elgg_echo("bookmarks:bookmarklet:description:conclusion"); ?></p> 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; |