MyBB Community Forums

Full Version: Add new page to modcp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everybody!

I added news page as a portal of mybb forum. And it working fine. Now, i want to add some pages to modcp to manage news. But i failed. I was tried:
- Add new link to modcp (modcp.php?action=newsmanage) successfull
- Add new template modcp_newsmanage to the templates successfull
- Open the modcp.php then add some code:
if ($mybb->input['action'] == "newsmanage"){
	eval("\$newsmanage = \"".$templates->get("modcp_newsmanage")."\";");
	output_page($newsmanage);
}
i got this error:
 syntax error, unexpected '<', expecting '}' in C:\xampp\htdocs\modcp.php(100) : eval()'d code on line 17
I'm trying to print something for testing only. I don't know how to fix this error. Please help!

I want to make new function in modcp to:
- Main page: list all sub functions (show all news which deleted, show all news posted on a day , etc...)
- Sub page, example "news was deleted" will display all news was deleted with some control button...

Please help me to print something first. I really want to write code myself

Sorry, my english not good. If you can't understand what i want, i will explain more

Thanks in advance!
as it is evaluated code, check the code added in modcp_newsmanage template
Omg! thank you very much. I have just replaced everything on template by "aaaaaaaa" then working fine ^_^
I copied from banning template because i think it's html only and will be print immediately. ^_^