MyBB Community Forums

Full Version: How do i do this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do I make it so if I want to put my Maintenance page everytime someone goes on the forum?

EDIT:

Would I have to replace index.php to my Maintenance link? then switch it back when I'm done?
Admin CP > Configuration > Board Online / Offline > Set "Board Closed" to Yes.
Enter your message in the textarea. HTML is allowed.
I don't want that, I made my own Maintenance page and I want to put it on the forum everytime I put maintenance on the forum how do i do that?
I don't think it is possible.

But you can write a plugin that use the global_start to print your custom maintenance page if board is closed.
You shure I can't do that? because I made my very own page and I love it and it will look so good if i want to replace it then when someone goes on it will show the maint page that I made.
Replacing index.php temporarily would be fine, but the more advanced users will quickly find out you can still navigate through the rest of the pages (forumdisplay.php, showthread.php and such). The following is a more efficient solution:

1. Upload the maintenance page as maintenance.php.

2. Open the global.php file in a text editor.

3. Find:

// Run hooks for end of global.php
$plugins->run_hooks("global_end");

4. Add afterwards:

header("Location: maintenance.php");

Remove the code when you're done.
Thank you so much. Btw would they still be able to go though the forum?
No. No matter what page they try to access, they will be redirected to the maintenance page. Isn't that what you wanted?
Yes I wanted that

thanks for your help.

And I private msged u btw Toungue
In response to your private message: no, you do not replace the code. Like I said in the post, you should add it afterwards.
Pages: 1 2