MyBB Community Forums

Full Version: How to ban IPs but alllow them to view forums?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to ban IPs but alllow them to view forums?

just to teach them what they are missing out? Toungue

PS. ALso is there a function where the new registered user can only make one post, which requires that first post to be validated before they can continue to post? that function should PM the moderators and admins
Actually that's impossible because the ip is what allow users to ACCESS the forums, when it's banned you can't allowed them View the forum

Put newly registered in a group and moderate their posts, then promote them after they have made one post that is verified by mods, using group promotions
Quote:Actually that's impossible because the ip is what allow users to ACCESS the forums, when it's banned you can't allowed them View the forum

Actually you just check if the current page is forumdisplay.php and not show the banned message...

Open global.php and replace:

// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true))

with:

// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true) && THIS_SCRIPT != "forumdisplay.php")

That should work.
How about banning the IP from registering BUT let them view Toungue

(2015-11-07, 09:21 AM)NathanĀ Malcolm Wrote: [ -> ]
Quote:Actually that's impossible because the ip is what allow users to ACCESS the forums, when it's banned you can't allowed them View the forum

Actually you just check if the current page is forumdisplay.php and not show the banned message...

Open global.php and replace:

// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true))

with:

// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true) && THIS_SCRIPT != "forumdisplay.php")

That should work.

how would i ban them from everything except the index and portal? would be a long condition, but dunno how safe it would be.
// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true) && THIS_SCRIPT != "index.php" && THIS_SCRIPT != "portal.php") 
this script can ONLY be index OR portal Toungue

cannot be both