MyBB Community Forums

Full Version: Adding functionality to the admin cp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How would I go about adding functionality to the admincp? Specifically adding a subtab and corresponding page to the nav?

Are there templates that I'm just not seeing? I don't think so 'cause there's no comments in the admin source either.

Thanks for reading and hopefully someone can help me out.
\inc\languages\english\admin is the folder where admin items are stored. I would suggest using a example in those files, just re-creating it.
(2012-07-30, 05:59 PM)Beyond the Lines Wrote: [ -> ]\inc\languages\english\admin is the folder where admin items are stored. I would suggest using a example in those files, just re-creating it.

Those are just languages files if I'm not mistaken. Or am I missing something??
One second, ill find you the file.
You can look at the your_admin_dir/modules/ as your reference.
(2012-07-30, 06:43 PM)RateU Wrote: [ -> ]You can look at the your_admin_dir/modules/ as your reference.

Yeah, I found those files. I'm just not sure what to do with them. The one in question would be the users file. I want to add a subtab after Merge Users in the Users and groups part.

Do I just add code to that file for what I want it to do? Or do I write a new file and just dump it in that folder?

What happens when there's an update?..Do I have to go alter it again?

Thanks for the help both of you. This can get a bit overwhelming trying to trace everything down so I'm glad there's help available.
(2012-07-30, 06:49 PM)TOA Wrote: [ -> ]The one in question would be the users file. I want to add a subtab after Merge Users in the Users and groups part.

Do I just add code to that file for what I want it to do? Or do I write a new file and just dump it in that folder?
You can use a hook in your plugin file to add a sub tabs to the page. There are some hooks you can use.

(2012-07-30, 06:49 PM)TOA Wrote: [ -> ]What happens when there's an update?..Do I have to go alter it again?
Do you mean when you update your MyBB? As long as MyBB doesn't change the hook you used, your sub tabs is still there.
(2012-07-30, 07:20 PM)RateU Wrote: [ -> ]You can use a hook in your plugin file to add a sub tabs to the page. There are some hooks you can use.

Can you point out one that might potentially work? I looked at the list of available hooks, but I'm not sure which one to use or when they're called.

The only code that I can find dealing with this is in user.php, but without adding code to that file (which I would lose in an update, hence the question in my last post) I don't know where I would add this stuff.

Would the new tab point to a new file uploaded into /modules?

I know this seems second-nature to alot of people on here, but there isn't very good documentation for beggining users. And I've watched/completed all the tutorials I can find but they're very basic and none deal with the admin cp. I can create a basic plugin with settings and all that, but I need guidance as to this more advanced task.

Thanks again for all your help, I really appreciate it and I hope you can tolerate all my questions Smile.



I'm still stuck.

How can I add a sub tab to the users menu on the acp?

Any help would be appreciated.
Still need help identifying the specific hook if anyone's out there reading this. I've tried a few and no solution.
You can try using the admin_page_output_nav_tabs_start and/or admin_user_users_begin, depends on what you want to do with your plugin.
Pages: 1 2