Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
Moderators can ban by IP address Details »»
Moderators can ban by IP address
Version: 1.00, by mikellogg mikellogg is offline
Developer Last Online: Aug 2011 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 03-01-2006 Last Update: Never Installs: 4
Additional Files  
No support by the author.

This PHP file allows your moderators to ban by IP address.

It is:
  • A simple form that allows your moderators to add to (or subtract from) the list of banned IPs.
  • A separate .php file and updates are controlled by a password that only your moderators know.
  • Ugly but functional. If you have the time and the know-how, please improve it.
Some safeguards:
  • Password protected
  • IP addresses must have at least 3 octets (so "12.34.56.", not just "12." which could ban a lot of users)
  • Can't ban administrator's IP
I hope people find this helpful!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-02-2006, 05:55 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice 1 installed, well will be once i can figure out the settings
Looks a little over my head

Just a quicky though, can this be changed to just super mods?
Reply With Quote
  #3  
Old 03-02-2006, 05:59 PM
mikellogg mikellogg is offline
 
Join Date: May 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.

Access is controlled by password, not usergroup. Only those people who have the password can change the list of banned IPs.
Reply With Quote
  #4  
Old 03-02-2006, 06:24 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah right...yeah i get ya now

I am actually struggling to get this to work
I am trying to create an internal page using Logicans web templates
I have also tried creating an internal PHP page using the manager for
my portal, still no go....

I noticed there are 2 ip addys for the administrator, do i change both?
Its asking for address url of forum, not sure what to put there,
is it the path such as www.bashys-place.com/forums or is it the
sites/home/bashys......1
Also this bit 1) mysql database connection string location, whats that all about?
And this bit 3) password to give to moderators: $_POST['passw'] ==
Wherere exactly does the password go? is it in between == or after it then space
then the password?

This is confusing the hell out of me pmsl....

I think you need to do a tutorial m8 as i have done a few bits here an there
well say about 200 hacks installed lol and for peeps just starting this is gonna
scare the hell out of them lol......
Reply With Quote
  #5  
Old 03-02-2006, 07:48 PM
mikellogg mikellogg is offline
 
Join Date: May 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Bashy,

Since this is outside the vBulletin structure, it requires a MySQL connection string just like any PHP page that connects to a MySQL database. If you are creating "an internal page using Logicans web templates", then you probably won't need that connection string anymore.

Also, all lines that start with // or are between /* */ are comment lines. Where I say "// 3) password to give to moderators: $_POST['passw'] ==", just look at the line underneath it to find that code and the spot for the password.

No offense, but maybe it is best that someone who understands PHP a little better than both you and I does the work to integrate this into the vB structure.
Reply With Quote
  #6  
Old 03-02-2006, 07:55 PM
mikellogg mikellogg is offline
 
Join Date: May 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, here's my tutorial.


To get this working on your board, you should change a few things in the file first.
// 1) Change this to the correct location of your MySQL connection string:
PHP Code:
require_once ('connect.php'); 
// 2) change chdir("C:\Inetpub\forum"); to the correct directory of your forums
PHP Code:
 chdir("C:\Inetpub\forum"); 
// 3) password to give to moderators: $_POST['passw'] ==
PHP Code:
 { if ($_POST['passw'] == 'your password goes here'
// 4) administrator's IP address in !strpos($sVal,'12.34.56.78')
PHP Code:
if (eregi("^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(\.[0-9]{1,3})* )+$"$sVal) && !strpos($sVal,'12.34.56.78')) 
Reply With Quote
  #7  
Old 03-02-2006, 08:56 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi m8

Yeah i did figure your tut out myself apart from the password bit lol
But like ya said m8 its well over my head, think im gonna leave it for now till some1
can do sommat with it
Reply With Quote
  #8  
Old 12-06-2006, 08:03 PM
Protonus Protonus is offline
 
Join Date: Aug 2005
Location: Rochester, NY
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone tried this in 3.6.x?
Reply With Quote
  #9  
Old 12-06-2006, 08:58 PM
mikellogg mikellogg is offline
 
Join Date: May 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it works the same in 3.6.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04802 seconds
  • Memory Usage 2,281KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete