LSboards
12-24-2005, 10:00 PM
I've been looking for a solution to allow moderators editing and updating IP bans and I had no luck. I decided to write my own little system that basically allows the moderators to edit one single post and list banned IP's right there.
On my system, the script will run in the crontab every 15 minutes and takes the post and converts it to the proper format for the vB settings table. Once the 'hack' is in place, do not use the AdminCP option for the IP Bans, only use the designated post.
This requires you to have a Moderator Forum with proper access permissions. In other words: A forum that only moderators can see and where only moderators can post. It also requires to have moderators that understand what IP addresses are, and how to use wildcards.
In the post, you are also allowed to enter comments starting with #. Coments can be in the beginning of a line (complete line ignored) or at the end of a line. Blank lines are ignored. I suggest to copy and paste the instructions from the AdminCP into the post, and put # in front of it. This will help your moderators to know what they are supposed to enter.
Example:
# IP Ban by John Doe, 2005-12-24
64.64.64.*
123.123.123.123 #IP Ban By Jason
100.100.100.100
100.100.100.101
100.100.100.102
100.100.100.103
etc...
Install:
1. Create a new thread/post with a title similar to "Moderator IP Ban".
2. Copy and paste your current IP Bans to that post.
3. Download ipban.php from here.
4. Edit '$ban_post_id = XXX' and set your own PostID (line 11).
5. Upload ipban.php to ./includes/cron/
6. AdminCP > Scheduled Tasks > Add New Scheduled Task
7. Enter a title ("IP Ban from Post XXX').
8. Leave all * but on the minutes select 0, 15, 30, 45
9. As fle name set './includes/cron/ipban.php'
10. Save
Although it runs in the crontab, this hack is very light. It only does one select from the database and one single update for one field.
Since I am completely new to vB coding I hope it's not too dirty for the community here. There are no security checks, but I have checked the AdminCP and it allows the admins to enter any kind of data as well.
On my system, the script will run in the crontab every 15 minutes and takes the post and converts it to the proper format for the vB settings table. Once the 'hack' is in place, do not use the AdminCP option for the IP Bans, only use the designated post.
This requires you to have a Moderator Forum with proper access permissions. In other words: A forum that only moderators can see and where only moderators can post. It also requires to have moderators that understand what IP addresses are, and how to use wildcards.
In the post, you are also allowed to enter comments starting with #. Coments can be in the beginning of a line (complete line ignored) or at the end of a line. Blank lines are ignored. I suggest to copy and paste the instructions from the AdminCP into the post, and put # in front of it. This will help your moderators to know what they are supposed to enter.
Example:
# IP Ban by John Doe, 2005-12-24
64.64.64.*
123.123.123.123 #IP Ban By Jason
100.100.100.100
100.100.100.101
100.100.100.102
100.100.100.103
etc...
Install:
1. Create a new thread/post with a title similar to "Moderator IP Ban".
2. Copy and paste your current IP Bans to that post.
3. Download ipban.php from here.
4. Edit '$ban_post_id = XXX' and set your own PostID (line 11).
5. Upload ipban.php to ./includes/cron/
6. AdminCP > Scheduled Tasks > Add New Scheduled Task
7. Enter a title ("IP Ban from Post XXX').
8. Leave all * but on the minutes select 0, 15, 30, 45
9. As fle name set './includes/cron/ipban.php'
10. Save
Although it runs in the crontab, this hack is very light. It only does one select from the database and one single update for one field.
Since I am completely new to vB coding I hope it's not too dirty for the community here. There are no security checks, but I have checked the AdminCP and it allows the admins to enter any kind of data as well.