MyBB Community Forums

Full Version: Add custom sub-menu to new admin module
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to add a sub-menu to my new module I am working on.. can't get it to work.. think it has to do with the hook name? I don't know how to create a new hook for this module.

Any help is appreciated.

This is what I currently have...

http://ryandiamond.com/work/sidebar.PNG

global $mybb, $page, $lang, $plugins;	

	$sub_menu = array();
	$sub_menu['10'] = array("id" => "management", "title" => $lang->forum_management, "link" => "index.php?module=forum-management");
	$sub_menu['20'] = array("id" => "announcements", "title" => $lang->forum_announcements, "link" => "index.php?module=forum-announcements");
	$sub_menu['30'] = array("id" => "moderation_queue", "title" => $lang->moderation_queue, "link" => "index.php?module=forum-moderation_queue");
	$sub_menu['40'] = array("id" => "attachments", "title" => $lang->attachments, "link" => "index.php?module=forum-attachments");
	
		$sidebar = new SidebarItem($lang->quick_access);
	$sidebar->add_menu_items($sub_menu, $page->active_action);
	$sub_menu = $plugins->run_hooks("admin_team_menu", $sub_menu);

	global $page, $lang, $plugins;
	$page->add_menu_item("Teams & Leagues", "team", "index.php?module=team", 40, $sub_menu);
	return true;
}
?>

Bump..

Help please!