Skip to content
Snippets Groups Projects
Commit 57dba11b authored by Matthew Juhl's avatar Matthew Juhl
Browse files

Display number of friend requests in the Friends tab, not as an additional element in the nav

parent 234bba1c
Branches
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
* @version 2.0
*/
/* We don't want this...
if(isloggedin()){
$user = get_loggedin_user();
......@@ -19,4 +20,5 @@
echo "<a href='" . $CONFIG->wwwroot . "pg/friend_request' class='new_friendrequests' title='" . elgg_echo('friend_request:new') . "'>[" . $count . "]</a>";
}
}
*/
?>
\ No newline at end of file
......@@ -68,7 +68,17 @@
foreach($alphamenu as $item) {
$requestURI = explode($vars['url'], $item->value);
$selectedTab = setSelectedTab($requestURI[1]);
echo "<li" . setSelectedTab($requestURI[1]) . "><a href=\"{$item->value}\"><span>" . $item->name . "</span></a></li>";
echo "<li" . setSelectedTab($requestURI[1]) . "><a href=\"{$item->value}\"><span>" . $item->name . "";
if ($item->name == "Friends") {
$user = get_loggedin_user();
$count = get_entities_from_relationship('friendrequest', $user->guid, true, "", "", 0, "", 0, 0, true);
if(!empty($count)){
echo " [" . $count . "]";
}
}
echo"</span></a></li>";
}
}
?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment