News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

MAINTENANCE mode

Started by SMiFFER, March 11, 2020, 05:43:11 PM

Previous topic - Next topic

SMiFFER

I am trying but obviously missing something.

When I set maintenance mode = on

I want to display another webpage.

What I did so far was amend "LOAD.php" and "ERRORS.php", but I for some reason I ask you guys I can not get it done.

What I want to do is show another HTML-page and have it displayed.
I have therefore commented out this

/*
*         echo '
*      <title>', $mtitle, '</title>
*   </head>
*   <body>
*      <h3>', $mtitle, '</h3>
*      ', $mmessage, '
*   </body>
*</html>';
*/


and put in

header('Location: https://www.page-to-show.html');


But what's in the way so that this does not work?
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Herman's Mixen

use the code tags !

you can you need to modify some of your files.. its not that hard..
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Sir Osis of Liver

Subs-Auth.php




// Display a message about the forum being in maintenance mode, etc.
function InMaintenance()
{
global $txt, $mtitle, $mmessage, $context, $smcFunc;

loadLanguage('Login');
loadTemplate('Login');

// Send a 503 header, so search engines don't bother indexing while we're in maintenance mode.
header('HTTP/1.1 503 Service Temporarily Unavailable');

header("Location: http://www.yourforum.com/readme.html");

// Basic template stuff..
$context['sub_template'] = 'maintenance';
$context['title'] = $smcFunc['htmlspecialchars']($mtitle);
$context['description'] = &$mmessage;
$context['page_title'] = $txt['maintain_mode'];
}



Of course, it leaves you with no way to login.  You'd have to take it out of maint mode in Settings.php.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SMiFFER

Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Advertisement: