diff options
Diffstat (limited to 'mod/profile')
-rw-r--r-- | mod/profile/start.php | 1 | ||||
-rw-r--r-- | mod/profile/views/default/profile/topbar_extend.php | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php index 1b47445d7..f83f10869 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -23,6 +23,7 @@ function profile_init() { register_entity_url_handler('profile_url', 'user', 'all'); // Set up the menu for logged-in users + elgg_extend_view('elgg_topbar/extend', 'profile/topbar_extend'); //if (isloggedin()) { // add_menu(elgg_echo('profile:yours'), $_SESSION['user']->getURL() . '/extend'); //} diff --git a/mod/profile/views/default/profile/topbar_extend.php b/mod/profile/views/default/profile/topbar_extend.php new file mode 100644 index 000000000..c1c4e13bb --- /dev/null +++ b/mod/profile/views/default/profile/topbar_extend.php @@ -0,0 +1,11 @@ +<?php +/** + * + */ + +$user = get_loggedin_user(); + +if (($user instanceof ElggUser) && ($user->guid > 0)) { + $friends = elgg_echo('friends'); + echo "<a class='myfriends' href=\"{$vars['url']}pg/friends/{$user->username}\" title=\"$friends\">$friends</a>"; +} |