vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Administrative and Maintenance Tools - Moderate New Registrations Based On IP Geographical Origin (https://vborg.vbsupport.ru/showthread.php?t=205044)

Jafo232 02-10-2009 10:00 PM

Moderate New Registrations Based On IP Geographical Origin
 
1 Attachment(s)
Original 3.7 mod here.

This mod will put any new registration into moderation so you can either approve or deny based on the physical location of the IP address. If the IP is located in a country that you white list, the registration will go through as normal.

This may be different for everyone else, but on my forums, I have yet to have a Russian IP sign up for anything other than posting SPAM. This plugin has moderated them all!

I hope to have time to eventually expand this to do other things.

You MUST download the zone files from this site:

http://www.ipdeny.com/ipblocks/ (download the "all files" file)

The free license does not allow me to include them with the product, plus it is better to download the latest files anyway.

No real screenshots to show here, sorry.

Changelog:

12/20/2008
  • Coded the routine in, instead of using external whois program.
  • Now compatible with Windows
  • (39 download of 1.0) (3.7.x)
2/11/2009
  • 77 downloads at this point (3.7.x)
  • Rewrote application to use zone files rather than relying on Arin
To upgrade, READ THE README, and re-install product (select overwrite).

Don't forget to:


Jafo232 02-11-2009 05:15 PM

Reserved..

Jon Tolzien 02-11-2009 05:24 PM

Sweet exactly what i needed. Installed.

Jafo232 02-11-2009 07:23 PM

Great, let me know how it works out for you. :)

bleros 02-12-2009 12:34 AM

Great Jafo good work..

Now how to block just Russian and Chinna :) how to use

XtremeOffroad 02-12-2009 01:01 AM

Oh this might be a blesing, Damn .ru spammers are a real headache.
Thanks.

Jafo232 02-12-2009 01:05 AM

Quote:

Originally Posted by bleros (Post 1741374)
Great Jafo good work..

Now how to block just Russian and Chinna :) how to use

If you want to do that you could treat the valid country codes section as an EXCLUDE list, then just change this line in whois.php:

Code:

if (!in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }
To this:

Code:

if (in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }

Nadeemjp 02-12-2009 05:43 AM

a much needed mod. .ru has been bothering me as well for a long time. and .cn as well.

dknelson 02-12-2009 09:45 AM

OK..I am trying this one again. I get this in my VBulletin options:

You need to download zone files

If you see an error below, then you did not upload the zone files yet (see readme).

I have the zone files downloaded, unzipped and uploaded to the zones folder. This is ALL it says, no error.

bleros 02-12-2009 10:32 AM

Quote:

Originally Posted by Jafo232 (Post 1741382)
If you want to do that you could treat the valid country codes section as an EXCLUDE list, then just change this line in whois.php:

Code:

if (!in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }
To this:

Code:

if (in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }


Good, but I installed the entire members becoming Administrator shit :@ my usergroup id 4 is Administrator .. Having lost the posts etc.

Vaupell 02-12-2009 10:58 AM

Quote:

Originally Posted by bleros (Post 1741751)

Good, but I installed the entire members becoming Administrator shit :@ my usergroup id 4 is Administrator .. Having lost the posts etc.

ohh gotta be carefull with mods in general then.
thought 4 was coopa or waiting confirmation
admin 6, supmod 5, mod 7. "by default"

Jafo232 02-12-2009 11:02 AM

Quote:

Originally Posted by dknelson (Post 1741716)
OK..I am trying this one again. I get this in my VBulletin options:

You need to download zone files

If you see an error below, then you did not upload the zone files yet (see readme).

I have the zone files downloaded, unzipped and uploaded to the zones folder. This is ALL it says, no error.

You have the zones folder inside the plugins folder?

Jafo232 02-12-2009 11:04 AM

Quote:

Originally Posted by bleros (Post 1741751)

Good, but I installed the entire members becoming Administrator shit :@ my usergroup id 4 is Administrator .. Having lost the posts etc.

You must have really changed up your usergroups in the past. I agree, many plugins rely on 4 being the moderated usergroup. You can change that number to whatever your moderated usergroup is.

Never heard of anyone changing usergroup 4 to admin, but I guess that is just me. :)

bleros 02-12-2009 01:21 PM

Quote:

Originally Posted by Vaupell (Post 1741767)
ohh gotta be carefull with mods in general then.
thought 4 was coopa or waiting confirmation
admin 6, supmod 5, mod 7. "by default"

i know by default

bleros 02-12-2009 01:28 PM

Quote:

Originally Posted by Jafo232 (Post 1741772)
You must have really changed up your usergroups in the past. I agree, many plugins rely on 4 being the moderated usergroup. You can change that number to whatever your moderated usergroup is.

Never heard of anyone changing usergroup 4 to admin, but I guess that is just me. :)

yes mann im changing,, but can a back all group default

dknelson 02-12-2009 11:31 PM

Quote:

Originally Posted by Jafo232 (Post 1741771)
You have the zones folder inside the plugins folder?

Yes I do. I don't know that there is a problem. Like I said, it says on the left side "You need to download the zone file"....on the right it says If you see an error below, then you did not upload the zone files yet (see readme).

What would the error say? Is that the "You need to download the zone file"? Is that the error? It seems to be working OK so far.

Jafo232 02-12-2009 11:42 PM

Quote:

Originally Posted by dknelson (Post 1742385)
Yes I do. I don't know that there is a problem. Like I said, it says on the left side "You need to download the zone file"....on the right it says If you see an error below, then you did not upload the zone files yet (see readme).

What would the error say? Is that the "You need to download the zone file"? Is that the error? It seems to be working OK so far.

I should have worded that better. No, that is not the error.. You should be good. If you saw a white box BELOW that text with an error message, then the zone files would be missing. You should be all good.

dknelson 02-12-2009 11:54 PM

Thanks...I thought that was probably the case. So far, this seems to be working well. VERY GOOD.

djbaxter 02-13-2009 11:57 AM

1. You need to update the URL in the product file to point to this thread instead of the old 3.7 version thread.

2. I found a Leeds, Manchester, England registration in the moderation queue this morning although "GB" was in the approved countries list. I had the latest zone files but on checking discovered that the IP address (84.66.124.21) was not included in the gb.zone file. Added it manually with a text editor and notified the IP Deny site.

Question:
What messages if any are displayed/sent to a new registrant who is placed in the moderation queue as a result of this add-on?

Jafo232 02-13-2009 09:12 PM

Quote:

Originally Posted by djbaxter (Post 1742801)
1. You need to update the URL in the product file to point to this thread instead of the old 3.7 version thread.

2. I found a Leeds, Manchester, England registration in the moderation queue this morning although "GB" was in the approved countries list. I had the latest zone files but on checking discovered that the IP address (84.66.124.21) was not included in the gb.zone file. Added it manually with a text editor and notified the IP Deny site.

Question:
What messages if any are displayed/sent to a new registrant who is placed in the moderation queue as a result of this add-on?

They are the same product. The next version will be updated for only the latest version.

IPDeny updates their zones daily so it is good practice to download them periodically. If someone has an IP with no country associated with it, it will default them to moderation.

They are shown the standard message all users receive who are moderated.

djbaxter 02-13-2009 10:44 PM

Quote:

Originally Posted by Jafo232 (Post 1743264)
If someone has an IP with no country associated with it, it will default them to moderation.

They are shown the standard message all users receive who are moderated.

I can't find the phrase for that message - only the phrases for the messages sent when they are accepted/approved or deleted. Can you point me in the right direction?

Jafo232 02-13-2009 10:57 PM

Just do a test registration with moderation on, you will see all the phrases you need.

djbaxter 02-14-2009 12:17 AM

Quote:

Originally Posted by Jafo232 (Post 1743329)
Just do a test registration with moderation on, you will see all the phrases you need.

D'oh!

I should have thought of this myself. Thank you! :o

kapii 02-16-2009 12:15 PM

I think this is a great idea, and if it works, could help me prevent the hacking I've had for the past year from foreign IP users. Most are proxy users anyway.

Thanks!
:up:

dknelson 03-03-2009 01:11 AM

My sincere thanks to Jafo232. This is really working well with the new Zone method. GREAT mod.

Jafo232 03-03-2009 02:28 AM

Quote:

Originally Posted by dknelson (Post 1758947)
My sincere thanks to Jafo232. This is really working well with the new Zone method. GREAT mod.

My pleasure. It is nice when a product has very few moving parts like this one.. Makes it easy to help everyone. :)

aldamon 03-03-2009 02:10 PM

Thanks for the tweak. Makes more sense to black list than to white list. Easier to manage.

Combine this hack with Human Verification and Forbid Users from Posting Links or Images if They Have Fewer than xx Posts, and every board should be SPAM free and confirmed registrations should be SPAMmer free. At least, that's what I'm hoping. :)

Quote:

Originally Posted by Jafo232 (Post 1741382)
If you want to do that you could treat the valid country codes section as an EXCLUDE list, then just change this line in whois.php:

Code:

if (!in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }
To this:

Code:

if (in_array($country, $valid_countries)) { $userdata->set('usergroupid', 4); }


Jafo232 03-03-2009 06:11 PM

This hack alone has basically eliminated SPAM on my forums. Of course most of mine are English speaking so white listing is easier than black listing.

Paul M 03-03-2009 06:15 PM

Quote:

Originally Posted by Jafo232 (Post 1743264)
If someone has an IP with no country associated with it, it will default them to moderation.

It would be better, IMO, to default them to approved.

Jafo232 03-03-2009 06:44 PM

Quote:

Originally Posted by Paul M (Post 1759475)
It would be better, IMO, to default them to approved.

Well, you can modify the code to do that, but in my case, I deal mostly with American users. Most American ISP's will show up (in fact, I have yet to see one that will not).

graham_w 03-13-2009 11:11 AM

Thanks for the mod. I reversed it so the list would be a black list instead of a white list and seems to do whats required. Thanks again.

intelgio2 03-23-2009 11:30 PM

I have installed the app and get the following message after trying to register. This comes up after entering all of the information on the registration screen. Any ideas?

"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 52 bytes) in ...whois.php on line 35"

Jafo232 03-27-2009 01:20 PM

Sounds like the IP lists are too much for the small setting you have for max memory size in your PHP.ini file.

skwestle 04-11-2009 02:15 AM

I need help to upload the folder inside the upload directory to my forum root. Can anyone help me with this?

Cyburbia 04-16-2009 04:53 PM

This looks like a fantastic mod! This cold be the key to cutting my htaccess file down by 75% or more.

However, there's one issue. On my board, there's a few countries where a small majority, but not all new registrants, are spammers; India, the Philippines, and China. (Yes, I get legit users from China, but about 80% are spammers.) Right now, using .htaccess, I direct the bulk of IP blocks from those countries into a page like this:

http://www.cyburbia.org/notice/forum_registration_india

Quote:

A disproportionately large number of those that have posted spam to the Cyburbia Forums register from IP blocks in India. Unfortunately, most if not all users that have previously registered from this IP block have been forum spammers and "black hat" SEO (search engine optimization) service providers.

We welcome new users from India, but we want to make sure they are not spammers. If you intend to be a constructive and active participant of the Cyburbia Forums, have a genuine interest in urban/town planning (planning student, or employed in planning or an allied profession such as architecture), please send email to cyburbia (at) cyburbia (dot) org with the following information:

* Your real name.
* Your desired Forums username.
* Your location (city or municipality, and state or union territory).
* A sentence or two about why you are interested in joining the Cyburbia Forums.

We create accounts by hand for registrants that look legit. (We've actually had a couple of people write to messages like "I would very muchly please like to promote web site SEO kindly do the needful and approve please", but according to our logs, thousands of others do'nt bother.)

It would be nice to have something where some countries are blocked from registering entirely (Former Soviet republics, Nigeria, Pakistan, Satellite IPs, Nigeria, Nigeria, Nigeria, Nigeria and Nigeria), while others can register, but they have to complete a few sentences about why they want to register. If they look legit, approve and send a form email. If not, deny.

djbaxter 04-16-2009 08:47 PM

^^^ That's a fine idea.

Quote:

Originally Posted by graham_w (Post 1767120)
Thanks for the mod. I reversed it so the list would be a black list instead of a white list and seems to do whats required. Thanks again.

I've also reversed it. It would be preferable to have this as the default. It makes a much shorter list to type into the options.

Daryn 05-09-2009 06:58 PM

This is a nice mod, I've been getting a lot of crap users from Russia mostly. So this will probably help out alot. Just a couple questions though:

1. For this mod to take effect what settings do I need to have on in vB?
2. For a future version, could you put in the option to make it a white/blacklist?
3. Instead of having to type in the text string for country codes, could you have the mod parse the zones and display a list of them with check boxes?

Thanks.

djbaxter 05-09-2009 07:21 PM

Quote:

Originally Posted by Daryn (Post 1807628)
2. For a future version, could you put in the option to make it a white/blacklist?

You can already do that: See https://vborg.vbsupport.ru/showthrea...20#post1767120

Quote:

Originally Posted by Daryn (Post 1807628)
Instead of having to type in the text string for country codes, could you have the mod parse the zones and display a list of them with check boxes?

If you use the blacklist version, all you have to do is type in a few country codes. Listing them all in a checkbox list or drop-down would be a huge list.

Fynnon 05-09-2009 07:51 PM

i really hate russia for historical reasons but to say that every russian that comes to your site is a spammer that is really hazardous

there are many us spammers, actually usa is the "best" in the world when it comes to spam

anyway a mod for blocking spammers by ip is a very good

10x

i fear that the database from http://www.ipdeny.com/ipblocks could be somehow false - positive in some cases because for one bad user you could block 100 good ones if they use the same ip

Daryn 05-09-2009 08:13 PM

Quote:

Originally Posted by djbaxter (Post 1807638)
You can already do that: See https://vborg.vbsupport.ru/showthrea...20#post1767120



If you use the blacklist version, all you have to do is type in a few country codes. Listing them all in a checkbox list or drop-down would be a huge list.

You can already do that, but you have to modify the mod to do it, which means you have to make that modification every time you update it. If something is needed by a lot of people it should be a setting and not an edit. Not to sound like a jerk, but it's the most basic in usability theory.

And a checkbox list would be a lot easier than having to open up an external text file, search for the country, take down the code, go back to the ACP, put in the code, go back to the text file, etc...

At the very least, having a link in the ACP to an alphabetical list of the countries and codes would make that easier.

In case you're wondering, my area of expertise is usability and accessibility, it's what I do a lot of work on.


All times are GMT. The time now is 06:18 PM.

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.01477 seconds
  • Memory Usage 1,850KB
  • 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
  • (6)bbcode_code_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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