Un-logged-in users see login-mask only.
Credit: BNa
Simple. Perfect. Cant be tricked out.
open
includes/functions.php
find
- Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
before add
- Code: Select all
// "Force login before you see anything" for guests and bots / BNa / 2012
$login_script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);
if (($login_script_name !== 'ucp') && (($user->data['user_id'] == ANONYMOUS) || ($user->data['is_bot'])))
{
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=login")); return;
}
// "Force login before you see anything" for guests and bots / BNa / 2012
Each guest or bot, who visit your site, see only the login mask. Registering is possible, if active, bcs. of
ucp.php?mode=register
.