diff options
author | Sem <sembrestels@riseup.net> | 2012-10-23 06:20:08 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-10-23 06:20:08 +0200 |
commit | 1e503286839742e72c01a6357c4293b7bf390d56 (patch) | |
tree | 270a4dcca0f4ddd26c7e641f050b2a720d6734c6 /start.php | |
parent | 771ba0de021f67de6dd6eb0a7916fe5e10dc679f (diff) | |
download | saravea_theme-1e503286839742e72c01a6357c4293b7bf390d56.tar.gz saravea_theme-1e503286839742e72c01a6357c4293b7bf390d56.tar.bz2 |
Overrided topbar icons with tooltips.
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 44 |
1 files changed, 43 insertions, 1 deletions
@@ -28,7 +28,49 @@ function n1_theme_init() { }
function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){
- //var_dump($returnvalue);exit();
+ $user = elgg_get_logged_in_user_entity();
+
+ if (elgg_is_admin_logged_in()) {
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'administration',
+ 'href' => "admin",
+ 'text' => elgg_view_icon('settings'),
+ 'title' => elgg_echo('admin'),
+ 'priority' => 100,
+ 'section' => 'alt',
+ ));
+ }
+
+ if (elgg_is_active_plugin('dashboard')) {
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'dashboard',
+ 'href' => "dashboard",
+ 'text' => elgg_view_icon('home'),
+ 'title' => elgg_echo('dashboard'),
+ 'priority' => 200,
+ 'section' => 'alt',
+ ));
+ }
+
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'usersettings',
+ 'href' => "settings/user/{$user->username}",
+ 'text' => elgg_view_icon('settings-alt'),
+ 'title' => elgg_echo('settings'),
+ 'priority' => 500,
+ 'section' => 'alt',
+ ));
+
+ $returnvalue[] = ElggMenuItem::factory(array(
+ 'name' => 'logout',
+ 'href' => "action/logout",
+ 'text' => elgg_echo('logout'),
+ 'title' => elgg_echo('logout'),
+ 'is_action' => TRUE,
+ 'priority' => 1000,
+ 'section' => 'alt',
+ ));
+ return $returnvalue;
}
/**
|