Ipb 2.1:404 Pages For Banned Members
From IpbWiki
Contents |
Introduction
With this simple changes you'll redirect your banned members to a 404 error page or to any other page you want, instead of giving them the default error message within the board and allowing them to log out and register another account.
This will redirect members in the Banned group and members with banned IP addresses too.
File to edit: /index.php
Open index.php and FIND:
// Do we have permission to view
// the board?
//--------------------------------
if ($ipsclass->member['g_view_board'] != 1)
{
$ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_board') );
}
REPLACE with:
// Do we have permission to view
// the board?
//--------------------------------
if ($ipsclass->member['g_view_board'] != 1)
{
$ipsclass->boink_it("http://www.yoursite.com/forum/index.php?act=idx");
}
File to edit: sources/classes/class_session.php
Open class_session.php and FIND:
REPLACE with:
Redirecting the banned members.
Replace the url in the new codes with your forum address but with a small error on it (e.g. change the "forums" folder to "forum"). Remember, the point here is to redirect them to an error page.
Alternatively, you can send them to another site or even another page created by you.
Your banned members will not understand what is happening and maybe think that your forums are offline or no longer exist, leaving you in peace for a while.
Upload the files to your server.
Upload the files back to your FTP server and you're done with this small modification.
If you want to test this modification, create a test member account in the Banned group and log in with his details. You should be redirected to the page you stated in the steps 1 and 2.
Orignal Article Author: Cointreau
