Page 1 of 1

How can I make phpBB board 2.0.22 online offline to users.

Posted: Mon Sep 17, 2007 10:47 pm
by TheInfernoSin
I need it so users can't login, but admins can AND be able to see the board.

Re: How can I make phpBB board 2.0.22 online offline to users.

Posted: Mon Sep 17, 2007 10:51 pm
by StefanL
I did that several years ago. Let me look for it.

Re: How can I make phpBB board 2.0.22 online offline to users.

Posted: Mon Sep 17, 2007 10:52 pm
by TheInfernoSin
Great.

Re: How can I make phpBB board 2.0.22 online offline to users.

Posted: Mon Sep 17, 2007 11:19 pm
by dellsystem
This MOD has a lot of features, but it should work for you:

http://www.phpbb.com/community/viewtopic.php?t=274377

(it basically makes the phpBB disable forum system more advanced, so admins can log in while it's disabled and still see the board)

Re: How can I make phpBB board 2.0.22 online offline to users.

Posted: Tue Sep 18, 2007 1:31 am
by StefanL
dellsystem wrote:This MOD has a lot of features, but it should work for you:

http://www.phpbb.com/community/viewtopic.php?t=274377

(it basically makes the phpBB disable forum system more advanced, so admins can log in while it's disabled and still see the board)
That was a nice MOD with a lot of options. But for only bypass the disabled board, this is what he need.

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
common.php
#
#-----[ FIND ]------------------------------------------
#
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}
#
#-----[ REPLACE WITH ]----------------------------------
#
// Start MOD admin
// This is to find out if a Admin is logged in,
// then we will show the forum even if it's disabled.
$super_admin = '0';
$userdata = session_pagestart($user_ip, 'TEST_ADMIN');
$userdata = array(); 

if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") && $super_admin != ADMIN && $super_admin != MOD )
{
	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
} 
// END MOD admin
#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]------------------------------------------
#
//
// Set page ID for session management
// 
#
#-----[ AFTER, ADD ]------------------------------------
#
// Start MOD admin
session_register($super_admin = '0');
// END MOD admin
#
#-----[ OPEN ]------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------
#
function session_pagestart($user_ip, $thispage_id)
{
	global $db, $lang, $board_config;
	global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
#
#-----[ AFTER, ADD ]------------------------------------
#
	// Start MOD admin
	global $super_admin; // To test if it's a Admin. 
	// END MOD admin
#
#-----[ FIND ]------------------------------------------
#
		$userdata = $db->sql_fetchrow($result);
#
#-----[ AFTER, ADD ]------------------------------------
#
		// Start MOD admin
		$super_admin = $userdata['user_level'];
		// END MOD admin 
#
#-----[ FIND ]------------------------------------------
#
				$SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';
#
#-----[ AFTER, ADD ]------------------------------------
#
				// Start MOD admin
				if (!$thispage_id == 'TEST_ADMIN')
				{
				// END MOD admin  
#
#-----[ FIND ]------------------------------------------
#
				return $userdata;
			}
		}
	}
#
#-----[ REPLACE WITH ]----------------------------------
#
				// Start MOD admin
				}
				// END MOD admin  
				return $userdata;
			}
		}
	}
	// Start MOD admin
	if (!$thispage_id == 'TEST_ADMIN')
	{
	// END MOD admin 
#
#-----[ FIND ]------------------------------------------
#
	return $userdata;

}
#
#-----[ BEFORE, ADD ]-----------------------------------
#
	// Start MOD admin
	}
	// END MOD admin  
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM

Re: How can I make phpBB board 2.0.22 online offline to users.

Posted: Tue Sep 18, 2007 3:11 am
by Lumpy Burgertushie
I thought admins could log in when the board was disabled by default.

robert

Re: How can I make phpBB board 2.0.22 online offline to users.

Posted: Tue Sep 18, 2007 3:16 am
by ric323
Lumpy Burgertushie wrote:I thought admins could log in when the board was disabled by default.

robert
You can't browse the board though. You still see the "board is disabled message", but with a link to the Admin Panel if you log in.

Re: How can I make phpBB board 2.0.22 online offline to users.

Posted: Tue Sep 18, 2007 3:18 am
by Lumpy Burgertushie
ric323 wrote:
Lumpy Burgertushie wrote:I thought admins could log in when the board was disabled by default.

robert
You can't browse the board though. You still see the "board is disabled message", but with a link to the Admin Panel if you log in.
Yep, I was editing my post above when I accidentally hit that silly close button in the FF tab. I don't like that close button. It wasn't there in the previous version of FF.

robert