The parse_templates hook is inside the process_templates function where $activeusers is not in scope. You can try globaling it like below, but if you still get nothing, then it could be that $activeusers isn't set yet, so $activeusers doesn't exist at the parse_templates hook:
Code:
global $activeusers;
if ($activeusers)
{
$template_hook['navbar_community_menu_end'] .= '<li><a href="usermap.php' .
$session[sessionurl_q] . '">' . $vbphrase['usermap'] . '</a></li>';
}
If $activeusers isn't set, how about doing something like this instead?
Code:
if ($vbulletin->userinfo['userid'])
{
$template_hook['navbar_community_menu_end'] .= '<li><a href="usermap.php' .
$session[sessionurl_q] . '">' . $vbphrase['usermap'] . '</a></li>';
}
That way you can forgo the other stuff, and you'll know that at least one person is active, the logged in member who can see the link to the user map. It might not quite be what you are after, but there will be at least one logged in person if the link appears.