Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Moderate Registrations From Certain IP Addresses Details »»
Moderate Registrations From Certain IP Addresses
Version: 1.00, by Tigga Tigga is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-01-2004 Last Update: Never Installs: 13
 
No support by the author.

One of my clients asked me to create this for him a little while ago. It's a pretty simple hack, but seems to be pretty useful, so I thought I'd share it here as well.

What does it do?
Ever had problem users that keep registering and you can't ban their IP address because it's too common and other user's may be using the same IP/host? This hack may help you then. It gives you a new setting in your Admin CP where you may specify a list of IP addresses to moderate registrations from. Any new registrations from any of the IP addresses you specify will be added to the "(COPPA) Users Awaiting Moderation" group instead of the registered group. Simple, but effective.

File Modifications: 1
Queries to run: 3
Time to Install: 1 minute

Show Your Support

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

Comments
  #2  
Old 09-02-2004, 07:39 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for Sharing Brian, I may find this useful
Reply With Quote
  #3  
Old 09-02-2004, 10:05 PM
???`S?LV?R???`'s Avatar
???`S?LV?R???` ???`S?LV?R???` is offline
 
Join Date: Aug 2003
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice..
Reply With Quote
  #4  
Old 09-03-2004, 09:34 PM
jugo jugo is offline
 
Join Date: Feb 2004
Location: Reading your emails.
Posts: 573
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work with partial IPs like the normal IP banning options?
Reply With Quote
  #5  
Old 09-06-2004, 03:40 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by juanph
Will this work with partial IPs like the normal IP banning options?
Yes. It works exactly the same as the IP banning option.
Reply With Quote
  #6  
Old 09-09-2004, 12:38 AM
Dennis B's Avatar
Dennis B Dennis B is offline
 
Join Date: Jul 2002
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very useful, much better than moderating everybody.
Thanks for sharing.
Reply With Quote
  #7  
Old 01-23-2005, 06:51 PM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks very good but what if a future vbulletin version installs over those phraseids? Is there any system in place that frees up particular phraseids or make sure these hacks won't clash?
Reply With Quote
  #8  
Old 01-23-2005, 06:59 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Didn't realize I had the phraseid's in there. There's no way future versions of vB would use those though. The only way you would run into a problem is if you already had those phraseids in your db, in which case you'd get an error when trying to run the queries. I've removed the phraseids from the queries though.
Reply With Quote
  #9  
Old 02-02-2005, 10:46 PM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

While I really the idea behind this hack, I think you could approachthis better by focusing on implementing it in this section instead:

PHP Code:
if ($_REQUEST['a'] == 'act'
The reason being, in the current way you are allowing this user tocircumvent email verification. IMO, you should allow the user to gointo Users Awaiting Email Verification usergroup first. Then when itcomes to activation, at THAT point test for IPmoderation and put theuser there. Otherwise, you won't know if it's a good email in the firstplace.

Hope this makes sense.
Reply With Quote
  #10  
Old 02-08-2005, 07:06 AM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you go I have a fix for the issue of this user not having to verify their email first.


Move down your whole code and modify it a bit. The new code should look like
Code:
		$vboptions['ipusermoderation'] = trim($vboptions['ipusermoderation']);
		if ($vboptions['ipusermoderation'])
		{
			$addresses=explode('', preg_replace("/[[:space:]]+/", "",$vboptions['ipusermoderation']) );
			foreach ($addresses AS $val)
			{
			if (strpos(' ' . IPADDRESS, ' ' . trim($val))!==false)
				{
				//thiswill be theusergroupidAFTER the user is verified
					$lateractivationid=4;
				}
				else
				{
					$lateractivationid=2;
				 }
			}
		}
And you want to place it right before this

Code:
		// sort out emails and usergroups
		if ($vboptions['verifyemail'])
		{
BUT you will have to ALSO change this line:

Code:
$activateid = build_user_activation_id($userid, 2, 0);
TO

Code:
$activateid = build_user_activation_id($userid, $lateractivationid, 0);
and you should be all set. WARNING, untested!
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 11:52 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.04603 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
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_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete