elgg_extend_view('css/elgg', 'bookmarks/css');
elgg_extend_view('js/elgg', 'bookmarks/js');
- elgg_extend_view('page/links', 'bookmarks/page_links');
-
+ if (elgg_is_logged_in()) {
+ $user_guid = elgg_get_logged_in_user_guid();
+ $address = urlencode(current_page_url());
+
+ elgg_register_menu_item('page_links', array(
+ 'name' => 'bookmark',
+ 'text' => elgg_view_icon('bookmark'),
+ 'href' => "pg/bookmarks/add/$user_guid?address=$address",
+ 'title' => elgg_echo('bookmarks:this'),
+ 'rel' => 'nofollow',
+ ));
+ }
// Register granular notification for this type
if (is_callable('register_notification_object')) {
register_notification_object('object', 'bookmarks', elgg_echo('bookmarks:new'));
+++ /dev/null
-<?php
-/**
- * Shows a "Bookmark this" link and icon
- */
-if (!elgg_is_logged_in()) {
- return;
-}
-
-$url = 'pg/bookmarks/add/' . elgg_get_logged_in_user_guid()
- . '?address=' . urlencode(current_page_url());
- $return[] = new ElggMenuItem('bookmark_this_page', elgg_echo('bookmarks:this'), $url);
-
-echo elgg_view('output/url', array(
- 'text' => elgg_view_icon('bookmark'),
- 'href' => $url,
- 'title' => $label,
- 'rel' => 'nofollow',
- 'encode_text' => false,
- 'class' => 'right elgg-bookmark-page',
-));
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * Page links: RSS link, reported content link, etc.
- */
-
-// Are there feeds to display?
-global $autofeed;
-$rss_link = '';
-if (isset($autofeed) && $autofeed == true) {
- $url = full_url();
- if (substr_count($url,'?')) {
- $url .= "&view=rss";
- } else {
- $url .= "?view=rss";
- }
- $url = elgg_format_url($url);
- $label = elgg_echo('feed:rss');
-
- $rss_link = elgg_view('output/url', array(
- 'text' => elgg_view_icon('rss'),
- 'href' => $url,
- 'title' => $label,
- 'rel' => 'nofollow',
- 'encode_text' => false,
- 'class' => 'right',
- ));
-}
-
-// view to extend by plugins
-$links = elgg_view('page/links', $vars);
-
-if ($links || $rss_link) {
- echo '<div class="elgg-page-links clearfix mbm">';
- echo $rss_link;
- echo $links;
- echo '</div>';
-}
* @uses $vars['sidebar'] Optional content that is displayed at the bottom of sidebar
*/
-echo elgg_view('page/elements/page_links', $vars);
+echo elgg_view_menu('page_links', array('sort_by' => 'name'));
echo elgg_view('page/elements/owner_block', $vars);