MyBB Community Forums
Adding functionality to the admin cp - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Adding functionality to the admin cp (/thread-123530.html)

Pages: 1 2


Adding functionality to the admin cp - TOA - 2012-07-30

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.


RE: Adding functionality to the admin cp - Beyond the Lines - 2012-07-30

\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.


RE: Adding functionality to the admin cp - TOA - 2012-07-30

(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??


RE: Adding functionality to the admin cp - Beyond the Lines - 2012-07-30

One second, ill find you the file.


RE: Adding functionality to the admin cp - RateU - 2012-07-30

You can look at the your_admin_dir/modules/ as your reference.


RE: Adding functionality to the admin cp - TOA - 2012-07-30

(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.


RE: Adding functionality to the admin cp - RateU - 2012-07-30

(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.


RE: Adding functionality to the admin cp - TOA - 2012-07-30

(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.


RE: Adding functionality to the admin cp - TOA - 2012-08-01

Still need help identifying the specific hook if anyone's out there reading this. I've tried a few and no solution.


RE: Adding functionality to the admin cp - RateU - 2012-08-01

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.