vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   IP Bans for Moderators Controlled via Post in Moderator Forum (https://vborg.vbsupport.ru/showthread.php?t=103733)

LSboards 12-24-2005 10:00 PM

IP Bans for Moderators Controlled via Post in Moderator Forum
 
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:

Code:

# 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.

Snake 12-25-2005 06:24 PM

This is quite good. Thanks man...

Zachariah 12-25-2005 09:28 PM

1st Hack :)

Welcome to the party.

Hornstar 12-27-2005 05:46 AM

I remember this has been requested many times, and i think this is the first time its been done, so congrats on the hack. I needed this a little while ago, but right now am not in need for it, but will keep it in mind. Only problem is the staff dont always know about proxies and often several members could be affeted by the 1 ip ban, so its not a power i'll be giving my staff right now, but nice work none the less.

utw-Mephisto 12-27-2005 02:04 PM

So that means if an admin or moderator adds an IP to that post it ban it automatically when the cron job run ?

EDIT : AWESOME, works like a charm ;) *installed*

brent_strong 01-24-2006 02:08 AM

Looks VERY nice. Will be installing tonight.

Is there any way you could look into integrating a time aspect into this? It's not necessary and could cause some headaches, but it would be cool to have.

Thanks for the hack!

zagman76 02-25-2006 08:57 PM

very cool!

thank you!

Rat1972 04-08-2006 11:55 AM

Hmm strange.
I did everything what here was said.

It work a little bit. The posts work, the cronjob works, when i going to the adminpanel, the bans are standing there, but the bans doesnt work. When i press ok in the admin panel, then the bans are working, but if i doesnt press the ok button, it doesnt work.

Can anyone telling me what the problem could be?

Rat1972 04-12-2006 11:11 AM

no one?

m4ck 06-07-2006 01:44 AM

Nice man this works perfect.


All times are GMT. The time now is 02:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01234 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete