###############################################
## Hack Title: Restrict Guest Access
## Hack Version: 1.0.0 (phpBB 2.0.4)
## Author: Encoder <[email protected]>
##
## Description: Denies guests access to member profiles, usergroups,
## memberlist, search, staff pages and hides the personal
## information displayed at the bottom of posts.
##
## Installation Level: Easy
## Installation Time: 5 minutes
##
## Files To Edit: 6
## viewtopic.php
## memberlist.php
## groupcp.php
## profile.php
## search.php
## staff.php
##
##
## Support: https://tik.lat/UhEUU
## Copyright: ©2003 Restrict Guest Access 1.0.0 - Encoder
##
###############################################
## You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
## Please visit https://tik.lat/CykwJ for support.
###############################################
## This hack is released under the GPL License.
## This hack can be freely used, but not distributed, without permission.
## Intellectual Property is retained by the hack author(s) listed above.
###############################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
if ( $poster_id != ANONYMOUS )
{
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
#
#-----[ REPLACE WITH ]------------------------------------
#
if ( $poster_id != ANONYMOUS && $userdata['session_logged_in'] )
{
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.".$phpEx."?redirect=memberlist.".$phpEx, true));
exit;
}
// End 'Restrict Guest Access' MOD
#
#-----[ OPEN ]------------------------------------------
#
groupcp.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.".$phpEx."?redirect=groupcp.".$phpEx, true));
exit;
}
// End 'Restrict Guest Access' MOD
#
#-----[ OPEN ]------------------------------------------
#
profile.php
#
#-----[ FIND ]------------------------------------------
#
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
$sid = '';
}
#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
$u = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? intval($HTTP_GET_VARS[POST_USERS_URL]) : intval($HTTP_POST_VARS[POST_USERS_URL]);
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
if ( !$userdata['session_logged_in'] && $mode == 'viewprofile')
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=viewprofile&".POST_USERS_URL."=".$u, true));
exit;
}
// End 'Restrict Guest Access' MOD
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#
if( !$userdata['session_logged_in'] || !isset($userdata))
{
redirect("login.$phpEx?redirect=search.$phpEx");
}
#
#-----[ OPEN ]------------------------------------------
#
staff.php
Note: This is only if you have installed the hack "Staff Site".
#
#-----[ FIND ]------------------------------------------
#
$userdata = session_pagestart($user_ip, PAGE_STAFF, $session_length);
init_userprefs($userdata);
#
#-----[ AFTER, ADD ]------------------------------------
#
if( !$userdata['session_logged_in'] || !isset($userdata))
{
redirect("login.$phpEx?redirect=staff.$phpEx");
}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM
## Hack Title: Restrict Guest Access
## Hack Version: 1.0.0 (phpBB 2.0.4)
## Author: Encoder <[email protected]>
##
## Description: Denies guests access to member profiles, usergroups,
## memberlist, search, staff pages and hides the personal
## information displayed at the bottom of posts.
##
## Installation Level: Easy
## Installation Time: 5 minutes
##
## Files To Edit: 6
## viewtopic.php
## memberlist.php
## groupcp.php
## profile.php
## search.php
## staff.php
##
##
## Support: https://tik.lat/UhEUU
## Copyright: ©2003 Restrict Guest Access 1.0.0 - Encoder
##
###############################################
## You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
## Please visit https://tik.lat/CykwJ for support.
###############################################
## This hack is released under the GPL License.
## This hack can be freely used, but not distributed, without permission.
## Intellectual Property is retained by the hack author(s) listed above.
###############################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
if ( $poster_id != ANONYMOUS )
{
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
#
#-----[ REPLACE WITH ]------------------------------------
#
if ( $poster_id != ANONYMOUS && $userdata['session_logged_in'] )
{
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.".$phpEx."?redirect=memberlist.".$phpEx, true));
exit;
}
// End 'Restrict Guest Access' MOD
#
#-----[ OPEN ]------------------------------------------
#
groupcp.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.".$phpEx."?redirect=groupcp.".$phpEx, true));
exit;
}
// End 'Restrict Guest Access' MOD
#
#-----[ OPEN ]------------------------------------------
#
profile.php
#
#-----[ FIND ]------------------------------------------
#
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
$sid = '';
}
#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
$u = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? intval($HTTP_GET_VARS[POST_USERS_URL]) : intval($HTTP_POST_VARS[POST_USERS_URL]);
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
if ( !$userdata['session_logged_in'] && $mode == 'viewprofile')
{
redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=viewprofile&".POST_USERS_URL."=".$u, true));
exit;
}
// End 'Restrict Guest Access' MOD
#
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#
if( !$userdata['session_logged_in'] || !isset($userdata))
{
redirect("login.$phpEx?redirect=search.$phpEx");
}
#
#-----[ OPEN ]------------------------------------------
#
staff.php
Note: This is only if you have installed the hack "Staff Site".
#
#-----[ FIND ]------------------------------------------
#
$userdata = session_pagestart($user_ip, PAGE_STAFF, $session_length);
init_userprefs($userdata);
#
#-----[ AFTER, ADD ]------------------------------------
#
if( !$userdata['session_logged_in'] || !isset($userdata))
{
redirect("login.$phpEx?redirect=staff.$phpEx");
}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM