Board Disable - Special

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Board Disable - Special

Post by Stoker » 26 Jul 2011, 17:20

Board Disable - Special

Author: cherokee red for Stoker
Description: A nice phpBB3 board disable screen, used on phpbb.com and now here.
Screenshot:
disable.png
Instructions:
Open language/en/common.php
Find:

Code: Select all

?>
Add before:

Code: Select all

// Board disable
$lang = array_merge($lang, array(
	'DISABLE_MESSAGE'   	 	 	 => 'Board unavailable',
	'DISABLE_RETURN'   	 	 	 => 'Return to index page',
));
Open includes/sessions.php
Find:

Code: Select all

if ($this->data['is_bot'])
			{
				send_status_line(503, 'Service Unavailable');
			}

			$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
			trigger_error($message);
Replace with:

Code: Select all

header('HTTP/1.1 503 Service Unavailable');
            header('Status: 503 Service Unavailable');

            $template->assign_vars(array(
                'MESSAGE'    => $config['board_disable_msg'],
                'DISABLE'    => $this->lang['DISABLE_MESSAGE'])
            );

            page_header($this->lang['OFFLINE']);

            $template->set_filenames(array(
                   'body' => 'board_disable.html'
            ));

            page_footer();

            exit;
Unzip and upload this file to your template folder:
board_disable.zip

Thats it, enjoy!
You do not have the required permissions to view the files attached to this post.
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear


User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 764
Joined: 25 Jul 2011, 11:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!

Board Disable - Special

Post by martin123456 » 03 Dec 2011, 01:44

Have you thought about adding your count down timer to this page so it displays a short message and then a timer ?

ie

we are fixing some major errors that our new nub staff member made so will be open in !

(counter here) 7 years and 3 months and 64 days :D

note the days lol

User avatar
Stoker
Site Admin
Site Admin
Posts: 3511
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Board Disable - Special

Post by Stoker » 03 Dec 2011, 06:00

Yes, it could easily be added to the html file.
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear