IP Banned Function?
#1
Hi guys,

Just wondering if anyone knew the function to create this:

http://i.imm.io/B3od.png

Thanks Smile
[Image: information.gif] MyBB Support Technician
Please do not PM me for support.


MyBBatically - A quick and easy way to update your board!
#2
hm i think you can do it without any plugins just add this code to index.php
this will just display that he is banned but you need to make the style by your own
How to
add to index.php :
<?php
  $userip = $_SERVER['REMOTE_ADDR'];
  $banlist = file_get_contents('bans.txt');

    if (preg_match('/'.$userip.'/i', $banlist)
    {
     print 'your banned contact the Admin at YOUREMAIL if you want to get unbanned.';
exit;
        }
?>
make bans.txt on your forum root and insert the banned ip's in it
this might work (i never actually tried it on mybb) so let me know if it worked
regards,
<snip - images exceed maximum total dimensions (see the rules)>
#3
You can ban IP addresses and ranges in the ACP.
-Paul H.

Cogisne lingua latina?
#4
and i has just noticed you can do it throw your ACP
ACP>Configuration>Banning>Banned IPs
hope i helped
regards,
<snip - images exceed maximum total dimensions (see the rules)>
#5
Cheers for the replys Smile

I was wondering if there was an actual function for creating that message inside a plugin.

I think i've got it now, I've just created a custom error message, I suppose I should of thought of using the error() function and the language variable before posting.

Thanks guys Smile
[Image: information.gif] MyBB Support Technician
Please do not PM me for support.


MyBBatically - A quick and easy way to update your board!
#6
Ban IP from ACP is only for user registration or also for forum read-only access?
#7
This user has been denied support. This user has been denied support.
Ban IP from ACP totally restricts that IP from accessing your board.

Meaning they can't view the forums/login/logout/register etc.
#8
Please don't revive old threads, especially with this kind of advices. Closing.


Forum Jump:


Users browsing this thread: