Disable board for moderators

Guides & Snippets for phpBB3.
Try the Snippets here and share Your own Snippets

Disable board for moderators

Post by Stoker »

Disable board for moderators

A little guide howto disable board for moderators.
When you disable your board when updating or installing mods, moderators still have full access to the board.
They will just see a small notice in the header telling that the board is disabled.
This notice is very easy to overlook.

Open includes/session.php
Find:

Code: Select all

// Adjust the message slightly according to the permissions
         if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))
Replace with:

Code: Select all

// Adjust the message slightly according to the permissions
         if ($auth->acl_gets('a_'))
Find:

Code: Select all

// Is board disabled and user not an admin or moderator?
        if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
Replace with:

Code: Select all

// Is board disabled and user not an admin or moderator?
        if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_'))