|
From: Jon O. <jon...@us...> - 2006-09-11 17:27:24
|
Update of /cvsroot/mxbb/mx_phpbb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16376/modules/mx_phpbb Modified Files: mx_phpbb.php Log Message: Restricted View access for anonymous users Index: mx_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/mx_phpbb.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_phpbb.php 16 Aug 2006 14:49:30 -0000 1.9 --- mx_phpbb.php 11 Sep 2006 17:27:19 -0000 1.10 *************** *** 15,18 **** --- 15,27 ---- // + // View Permissions + // Due to BOTs and SPAM, it's preferable to hide some forum pages for anonymous users. + // + // phpBB pages to hide (uncomment to activate): + $private_phpbb_script = array('profile', 'memberlist', 'privmsg'); + // + // + + // // Restore POST vars after redirect // Will look into this later *************** *** 51,54 **** --- 60,74 ---- include_once($mx_root_path . "modules/mx_phpbb/includes/phpbb_constants.$phpEx"); + // + // Auth + // + if ( isset($private_phpbb_script) ) + { + if ( in_array($mx_forum->phpbb_script, $private_phpbb_script) && !$userdata['session_logged_in'] ) + { + mx_redirect( append_sid( $mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true ) ); + } + } + ob_start(); $mx_forum->read_file( $mx_forum->phpbb_script ); |