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!
Post Reply
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Board Disable - Special

Post by Stoker »

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
(672 Bytes) Downloaded 926 times

Thats it, enjoy!
Board rules! No PM support
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Board Disable - Special

Post by martin123456 »

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: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Board Disable - Special

Post by Stoker »

Yes, it could easily be added to the html file.
Board rules! No PM support
Post Reply