MyBB Community Forums
Custom maintenance - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Custom maintenance (/thread-185887.html)



Custom maintenance - mrmod - 2015-10-30

Need to know how to make custom maintenance page for mybb site instead of 
Tis site is closed the admin is listed why below
Text here
To 
<!doctype html>
<title>Site Maintenance</title>
<style>
  body { text-align: center; padding: 150px; }
  h1 { font-size: 50px; }
  body { font: 20px Helvetica, sans-serif; color: #333; }
  article { display: block; text-align: left; width: 650px; margin: 0 auto; }
  a { color: #dc8100; text-decoration: none; }
  a:hover { color: #333; text-decoration: none; }
</style>

<article>
    <h1>We&rsquo;ll be back soon!</h1>
    <div>
        <p>Sorry for the inconvenience but we&rsquo;re performing some maintenance at the moment. If you need to you can always <a href="mailto:#">contact us</a>, otherwise we&rsquo;ll be back online shortly!</p>
        <p>&mdash; The Team</p>
    </div>
</article>
How do i do this site is located at /home.php


RE: Custom maintenance - Zaneman122 - 2015-10-30

Are you talking about creating a new page and using that HTML for the page?


RE: Custom maintenance - mrmod - 2015-10-30

Yes and when i trigger maintenance mode that will display


RE: Custom maintenance - Josh H. - 2015-10-30

https://github.com/mybb/mybb/blob/fda43f3dc95421a50bf2f6eb0de0a92a10f1490b/global.php#L935 is where the maintenance page display is handled. One option is to redirect the user to a maintenance, or you could use the template system to render a different template of your choice there.


RE: Custom maintenance - mrmod - 2015-10-31

How do i redirect to another page

Ehmm bump


RE: Custom maintenance - SvePu - 2015-10-31

You could use the redirect function => http://www.mybbsecurity.net/docs/function/redirect.html


RE: Custom maintenance - mrmod - 2015-10-31

(2015-10-31, 08:50 AM)SvePu Wrote: You could use the redirect function => http://www.mybbsecurity.net/docs/function/redirect.html

Hello svepu i found a fix.so i make forum home.php
An make maintence  index.php so when they come they see maintenance page
Ad whey im done with maintenance i put forum on index.php and maintenance on home.php


RE: Custom maintenance - Nathan Malcolm - 2015-10-31

That only affects the index page. All that's really doing is disabling the forum index. The rest of your forum will still be accessible.