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

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
TheInfernoSin
Registered User
Posts: 181
Joined: Fri Nov 24, 2006 9:14 pm
Contact:

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

Post by TheInfernoSin »

I need it so users can't login, but admins can AND be able to see the board.
StefanL
Registered User
Posts: 2265
Joined: Wed Jul 23, 2003 10:10 pm

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

Post by StefanL »

I did that several years ago. Let me look for it.
When I suggest that you should alter your files, BACKUP them BEFORE.
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

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

Post 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)
Former moderator and website team member | My MODs, and more (GitHub)
StefanL
Registered User
Posts: 2265
Joined: Wed Jul 23, 2003 10:10 pm

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

Post 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
When I suggest that you should alter your files, BACKUP them BEFORE.
User avatar
Lumpy Burgertushie
Registered User
Posts: 68191
Joined: Mon May 02, 2005 3:11 am
Contact:

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

Post by Lumpy Burgertushie »

I thought admins could log in when the board was disabled by default.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

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

Post 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.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
User avatar
Lumpy Burgertushie
Registered User
Posts: 68191
Joined: Mon May 02, 2005 3:11 am
Contact:

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

Post 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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Locked

Return to “2.0.x Support Forum”