MyBB Community Forums

Full Version: Include your custom pages in Mybb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Can this be used outside the forum directory? I mean, my forum is in .com/forum/ directory, and I would like to create a page on the .com/ directory as a homepage. Something kinda like the portal page but outside the forum, unlike the portal which has to be redirected.
Ive had a look through this thread and there are that many different versions of code where things havnt worked an changes being made it makes it quite hard to work out which code you should actualy be using, would it be possible for someone to post a new upto date version of this tutorial with the correct code and what needs to be done in the acp?

Sorry but im not a coder and i like everything to be as simple as possible and im sure there are others who re the same, i dont mind aking the odd change but anything more and i start to get confused
I guess that the first post of this thread is up to date. Smile
how can I restrict the new page so only registered member can view the page?

thanks for helping
dvb Wrote:how can I restrict the new page so only registered member can view the page?

thanks for helping

add this at the top of your page:

define("IN_MYBB", 1);
require_once "./global.php";

if($mybb->user['uid'] == 0)


How do I add Permission to a page like this so only Mods and Super mods can view it?? CAN ANY BODY TELL ASAP ??
The good news is, I have this working. The only problem is that it is not taking on any CSS styles of the template I am using even with Global-All Template Sets selected. I am mainly talking about border color which should be a purple color and it comes up white. The table header text also is white and it should be an orange color. I am wondering if I need to copy the global file into the default theme (Add Template, like I did with the global) so it uses its CSS style? If I do this do I need to change the php file I first created to look in the default theme and not in the global. Maybe there is a much simpler way of doing it?
Thanks for the tutorial.

Update: I have found a solution to this that will work for me but probably wouldn't work for most boards because it will effect all themes since it is global.

Take Care
Is there a way to make this work like /page.php instead of /forum/page.php. I tried and it didn't work.
Well I was searching, is there any way to use "php" scripts in the custom pages?
xScopex, you can't make the pages outside the forum folder.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14