Test Accounts

There are 3 test accounts.

Username: Test
Password: test123

Username: Test 2
Password: testuser2

Username: Test 3
Password: testuser3

Board Disable - Special

Useful little modifications. I did not make any of them

Moderator: Jessica

Forum rules
There will be no more new snippets here. All snippets are posted here: http://chenschool.elementfx.com/phpBB3/kb.php?c=1

Board Disable - Special

Postby Jessica » April 7th, 2012, 5:52 pm

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 to template folder:
board_disable.zip
(672 Bytes) Downloaded 235 times


User avatar
Jessica
Founder
 
Topic author
Posts: 97
Topics: 39
Blog entries: 5
Joined: October 27th, 2011, 4:30 pm
Likes: 7 posts
Liked in: 24 posts
Images: 133

Return to Snippets

Who is online

Users browsing this forum: No registered users and 2 guests

x

#{title}

#{text}