';
// Elgg logo
$image = '
';
echo elgg_view('output/url', array(
'href' => 'http://www.elgg.org/',
'text' => $image,
));
// avatar
$user_link = $user->getURL();
$user_image = $user->getIcon('topbar');
$image = "
name\" class=\"elgg-border-plain\" />";
echo elgg_view('output/url', array(
'href' => $user_link,
'text' => $image,
));
// friends
echo elgg_view('output/url', array(
'href' => elgg_get_site_url() . "pg/friends/{$user->username}/",
'text' => '
',
'title' => elgg_echo('friends'),
));
// logout link
echo elgg_view('output/url', array(
'href' => "action/logout",
'text' => elgg_echo('logout'),
'is_action' => TRUE,
'class' => 'elgg-alt',
));
// elgg tools menu
// need to echo this empty view for backward compatibility.
echo elgg_view("navigation/topbar_tools");
// enable elgg topbar extending
echo elgg_view('elgg_topbar/extend', $vars);
// user settings
echo elgg_view('output/url', array(
'href' => elgg_get_site_url() . "pg/settings/user/{$user->username}",
'text' => '
' . elgg_echo('settings'),
'class' => 'elgg-alt',
));
// The administration link is for admin or site admin users only
if ($user->isAdmin()) {
echo elgg_view('output/url', array(
'href' => elgg_get_site_url() . 'pg/admin/',
'text' => '
' . elgg_echo('admin'),
'class' => 'elgg-alt',
));
}
echo '
';
echo '';