MyBB Community Forums

Full Version: Adding a new tab to adminCP.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I'm new with plugins, and quite frankly have no idea how to get them to work. They're way to complex and I really don't think they need to be so complex. Whatever, that aside I've got a question.

How do you add tabs to the admincp? I've taken a look at the MyPlaza Turbo code and can't figure it out, there are just too many files.

Could somebody point me in the right direction please? Thanks.
module_meta.php under a new folder is all you need Smile
Edit:
a proper module_meta.php lol.
:\

$page->add_menu_item($lang->myplaza, "myplaza", "index.php?module=myplaza", 60, $sub_menu);

I figure that's what does it though. So, as I'd figure, if I just put a module_meta.php into the folder it'll automatically work if I include it? Oh, but how do I include it.

Sad
(2010-05-04, 08:48 PM)Diablosblizz Wrote: [ -> ]:\

$page->add_menu_item($lang->myplaza, "myplaza", "index.php?module=myplaza", 60, $sub_menu);

I figure that's what does it though. So, as I'd figure, if I just put a module_meta.php into the folder it'll automatically work if I include it? Oh, but how do I include it.

Sad

Copy paste the module_meta.php file and edit it. But yes that function adds the menu item Smile
I'm not understanding where I should copy it to, my plugin page? Does it have to go into install or activate?

Sorry I'm such a noob at this.
(2010-05-04, 09:04 PM)Diablosblizz Wrote: [ -> ]I'm not understanding where I should copy it to, my plugin page? Does it have to go into install or activate?

Sorry I'm such a noob at this.

No, it must go into a folder, like: admin/modules/yourplugin/module_meta.php
Now would I have to include that file anywhere, or activate it of any sorts? Thank you for your support thus far.
(2010-05-04, 09:09 PM)Diablosblizz Wrote: [ -> ]Now would I have to include that file anywhere, or activate it of any sorts? Thank you for your support thus far.

You need to have your plugin activated. You understand (and can write) PHP don't you? Because if you don't, I won't be able to help you
dont need to have a plugin to use the new tab, but you need to make the function names include the name of yourplugin as used by Pirata above.

example: yourplugin_meta()

create a folder in \admin\modules called yourplugin
copy an existing module_meta.php to yourplugin folder
edit that module_meta.php and change the function names. if you copy/paste the module_meta.php from \admin\modules\forums\ then do a replace of 'forums_' with 'yourplugin_'

then edit the functions, sub menus, pages, etc that the module calls
I do know PHP, but the fact that everything in MyBB is hidden and I don't know any of the required parameters for any of the functions makes it really hard to know what the hell is going on.

I did what pavemen recommended, nothing happened.
Pages: 1 2 3