MyBB Community Forums

Full Version: Adding a new page in ACP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi

How can I add a new page in ACP. I have added a new menu in ACP ( I just copied the code from Tikitiki's PM admin plugin Smile. But when I click on my menu, it is displaying the contents of the page as is. It is not parsing the PHP code inside that :-(. Is there any changes I need make to parse my PHP code?

Thanks
Albin
Are you trying to do this via a plugin? or are you adding an actual page into the folder?
I am trying with a plugin
What's the URL you want to use for your Admin CP page?
What I need is a new menu in ACP. and when the user clicks on the menu link a new page should come in the right frame. It would be something similar to Tikitiki' Private message Admin plugin. I copied the menu making code and changed to my URL. So the code would look like

$menu[130]['items'][] = array('title' => "My Title", 'url' => "myurl.php?".SID);

I have a page named myurl.php in my admin directory. When I click on the menu, it is displaying the contents of myurl.php in the right frame. But PHP code is not getting parsed. Am I doing something wrong?
You can't just place php and html inside myurl.php. They still need to parse along with mybb and how it operates. Check the other admin pages for examples.
Whats the PHP code?
I tried with the pmadmin.php (Tikitiki's page) page only. I just renamed it and placed it in my admin directory. I though if it is working I can start changing the code according to my requirements.

Btw my code has nothing to do with PM Admin plugin. I am not changing or modifying that plug in. Since I am newbie in PHP and myBB I need a code to model.
The pmadmin.php has other dependencies and cannot be relied upon. I suggest you use another plugin that uses the admin interface.
Oh. Then that is the mistake I made . :-(.

But still I don't understand why the PHP is not getting parsed. Server found the page. but it is displaying the PHP code directly to the browser :-((

Could you suggest a plugin I can model?
Pages: 1 2