Disable board for moderators

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

Disable board for moderators

Post by Stoker »

Disable board for moderators
Written by Stoker

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 overslook.

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_'))