From b4ad2436f397f5f9f155a723f4a07bb3cc7eb32a Mon Sep 17 00:00:00 2001 From: Sem Date: Tue, 30 Oct 2012 02:32:04 +0100 Subject: Added groups icon in topbar. --- start.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'start.php') diff --git a/start.php b/start.php index eb25a82..ae5f3d6 100644 --- a/start.php +++ b/start.php @@ -29,7 +29,17 @@ function n1_theme_init() { function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){ $user = elgg_get_logged_in_user_entity(); - + + if (elgg_is_active_plugin('groups')) { + $returnvalue[] = ElggMenuItem::factory(array( + 'name' => 'groups', + 'href' => $user ? "groups/member/$user->username" : "groups/all", + 'text' => elgg_view_icon('groups'), + 'title' => elgg_echo('groups'), + 'priority' => 500, + )); + } + if (elgg_is_admin_logged_in()) { $returnvalue[] = ElggMenuItem::factory(array( 'name' => 'administration', -- cgit v1.2.3