Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [How To?] How do I modify the admin panel header?
#1
Not Solved
I'm in the process of integrating MyBB with my football MMORPG. What am I asking is how would I go about adding a new section to the admin panel like for, lets say, "teams", that'll be like the users section of the MyBB admin panel...

Where would I modify the code to put the Teams link in the header where it says Config, Posts & Forums, Users & Groups, etc. And then where would I put the sub-menu for that section and the modules? Would I make a new folder in the modules called "team" and put all the files in there?

Any help is greatly appreciated.
#2
Not Solved
A plugin will do this. You would have to make your own or request someone to do this for you.
#3
Not Solved
I'm pretty confident I could do this myself.

Do you happen to know of an example code that does this that I can look at to get an idea of the hooks / parameters that are passed?
#4
Not Solved
Any plugin that adds an admin module.
#5
Not Solved
I was able to modify the module-meta file in the admin/module/forum folder directly to modify the header by adding these lines:

	$page->add_menu_item($lang->forums_and_posts, "forum", "index.php?module=forum", 20, $sub_menu);
	$page->add_menu_item("Teams & Leagues", "teams", "index.php?module=tl", 15, $sub_menu_tl);
	$page->add_menu_item("Players & Coaches", "teams", "index.php?module=pc", 17, $sub_menu_tl);

I'm just unsure of how to actually make the module. I'm trying to find a plugin but I cannot.
#6
Not Solved
Wiki by Jones NewPoints by Pirata.
#7
Not Solved
Think I may have found how to do this on my own without plugins.. will update you in a little bit.
#8
Not Solved
OK.
I did not know how to do this with out looking at plugins. But I guess you have to add the code you put in the function next to where in the admin pages the hook is loaded.
#9
Not Solved
Ok, so here is what I did:

1. Go into admin/module folder.
2. Copy any of the folders, I did "users".
3. Open user/module_meta.php and changed all the user_ functions to team_
4. And it worked perfectly!

The thing I am trying to do now is to change the main page that opens when you click on teams on the menu bar, but the file i copied from user folder is 3000 lines long so I don't know where to delete because when I delete too much the page is no longer outputted.
#10
Not Solved
Take a look at my Wiki plugin - it has multiple pages, a default page, and is fairly short - module_meta.php and docs.php (a sample page).

The code you want is this, iirc (the if clause, not the else):

	if(!isset($actions[$action]))
	{
		$page->active_action = "articles";
		return "articles.php";
	}
	else
	{
		$page->active_action = $actions[$action]['active'];
		return $actions[$action]['file'];
	}

It is in the *_action_handler function.
Please don't PM me for support. Smile


Forum Jump:


Users browsing this thread: 2 Guest(s)