Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
GLA - Geographic Location Awareness for vBulletin Details »»
GLA - Geographic Location Awareness for vBulletin
Version: 1.00, by mfyvie mfyvie is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.7 Rating:
Released: 07-06-2007 Last Update: 07-15-2007 Installs: 258
DB Changes Uses Plugins
Additional Files  
No support by the author.

*** Staff note: The author of this modification has passed away in a diving accident. We wish his family all strength in dealing with this traggic issue. ***

GLA - Geographic Location Awareness for vBulletin

What does this do?

GLA adds an additional layer of information into your vBulletin site (visitors' country name). GLA doesn't output anything to the user, or change any display on your forum, it simply adds additional information which is then available to other programs or mods.

But what can I use it for?

There are many applications, but the main idea is that this mod enables other mod writers to very easily add location awareness functions into their own mods. If you were thinking of writing a mod to display a person's registration country in the postbit, it's now very easy to do.

Why should I download and install this?

Unless you are also going to install one of the other mods which requires GLA, there isn't much point. If you are a developer, you might install this to add functionality to your own mods.

How will I update this?

Easy - you can update the database used for matching country names to IP addresses yourself - it's very easy. Full instructions are provided in the install.txt file inside the zip file.

How do I install?

Download the zip file and look for install.txt. But basically it's easy - upload the contents of the upload folder to your forum directory, and import the enclosed .xml file. That's it.

How do I know if it is working?

A test script is provided that will test every aspect of your GLA installation to inform you of any potential problems. Please see the installation instructions for information about this test script.

What about flags?

This includes flags, meaning that other mods won't have to package flags. You can change the flags if you like, instructions are provided.



How about a quick summary of features?
  • Fast - GLA adds almost no overhead. This is important for big sites. Only a single query is executed each time a session is created
  • Transparent - new variables are automatically available to any part of your site
  • Updateable - you can update the database yourself
  • Free - a free database is used
  • Accurate - the database provider claims 98% accuracy
  • Configuration - absolutely nothing to configure for this mod (since it just provides data to other mods)
  • Extendible - GLA may encourage other mod developers to add location features. Why not ask the author of your favourite mod to use GLA? Were you thinking of making a mod which uses location data, but didn't know how? GLA solves the problem for you - now all you need to do is read a variable
  • Easy developer information - hints and tips are provided with the zip file to make life easier for developers
Is there a list of mods that currently use GLA?



Yes, a list will be maintained here. Please let me know if you find a mod which requires GLA that isn't listed, so I can add it. The current list of GLA mods is as follows:Before posting on this thread:

Please post on this thread only for issues relating to GLA itself. If you have an issue that concerns a mod that uses GLA, please post on the appropriate thread for that mod. If you have an issue which concerns the underlying functionality of GLA itself, then post here.

Even though this is a required mod from another mod and may be fairly boring, please click install if you are using it. Support requests from people who have not clicked install may not be answered.

No screen shots for this mod, since there's nothing to see.

Version history
1.0 (07.07.07) Initial version

Show Your Support

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

Comments
  #22  
Old 07-08-2007, 03:20 PM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess it would be possible to manually add IP ranges to the database by hand if you wanted to. What are the IP ranges in question?
Reply With Quote
  #23  
Old 07-08-2007, 03:23 PM
shamda shamda is offline
 
Join Date: Feb 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mfyvie View Post
I guess it would be possible to manually add IP ranges to the database by hand if you wanted to. What are the IP ranges in question?

Well my isp is 66.229.216.150 which is c-66-229-216-150.hsd1.fl.comcast.net . Pretty popular isp.
Reply With Quote
  #24  
Old 07-08-2007, 03:34 PM
steven s's Avatar
steven s steven s is offline
 
Join Date: Aug 2004
Location: Greenville, SC
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another cool plugin might be to display one flag of each country currently view pages.
Reply With Quote
  #25  
Old 07-08-2007, 04:13 PM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, what I meant was the range you wanted added, not just the ip address.

Anyway, if we look up that address you gave in the ARIN database we see that it is registered to comcast as you say, and covers the following range:

66.229.0.0 - 66.229.255.255 (a class B range, a pretty big chunk)

Before we do anything we need to convert this to numerical format. This is pretty simple, we just do it like this for the first part of the range:

66 * 256 * 256 *256
+
229 * 256 *256
+
0 * 256
+
0

This give us 1122304000

Now we do the same for the end of the address:

66 * 256 * 256 *256
+
229 * 256 *256
+
255 * 256
+
255

This gives us 1122369535

So we want to assign addresses between 1122304000 and 1122369535 to the US. But wait - are you really sure that this whole address range is in the US? How are you sure? Anyway, since this is your own database and nobody else's, you can do what you like.

Use a tool (like PhpMyAdmin, or the SQL query function in the admincp) to look inside your database. Execute the following SQL command to give you any ranges inside the one you want like this:

Code:
SELECT * FROM ip2country WHERE ip_from <= 1122369535 AND ip_to >= 1122304000
(note that I reversed the order of the high number and the low number).

We see that a single result is returned:

1122320960 - 1122320995 - only 35 addresses? In the middle of that range assigned to portugal? Probably a mistake.

Ok, so let's say you are absolutely sure that you want to add that big block in. You could make an SQL query like this:
Code:
INSERT INTO ip2country (ip_from, ip_to, country_code2, country_code3, country_name) VALUES ('1122304000', '1122369535', 'us', 'usa', 'United States')
Now you can use repair optimise table (in admincp) just for the ip2country table to rebuild the indexes.

Then you should be done. Anyone else can also use these instructions for another IP range if they like.

Some useful links:

http://ip-to-country.webhosting.info/forum (is full of spam, and isn't very useful, but these are the official forums for the database)
http://www.arin.net/whois/ (for looking up IP address ranges)

And of course - read install.txt and developer.txt in the installation archive for links, etc.
Reply With Quote
  #26  
Old 07-08-2007, 04:23 PM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

By the way, if anyone is wondering if their OWN address is being found in the database, you can go to this page:

http://ip-to-country.webhosting.info/

They look up your address and display the country. When I visit the site I see the details. If you visit the site and don't see your country come up, your IP is not in the database.
Reply With Quote
  #27  
Old 07-08-2007, 07:36 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now we just need someone to make a plugin which will allow the admins to pick countries to ban and then have it dynamically ban anyone that registers with a certain country
Reply With Quote
  #28  
Old 07-08-2007, 07:40 PM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by meissenation View Post
Now we just need someone to make a plugin which will allow the admins to pick countries to ban and then have it dynamically ban anyone that registers with a certain country
The best thing would be for this mod to be extended to include support for GLA. Since that mod already exists, it does 90% of the functionality, it just doesn't support GLA. I've sent a PM to the author, but haven't heard back yet.
Reply With Quote
  #29  
Old 07-10-2007, 02:21 PM
TrIn@dOr TrIn@dOr is offline
 
Join Date: Nov 2006
Location: South Bend, IN
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, will u notify Country-IP-DB updates here?
Reply With Quote
  #30  
Old 07-10-2007, 03:03 PM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TrIn@dOr View Post
Very nice, will u notify Country-IP-DB updates here?
Maybe, I can't say what will happen with that database in the future, but I may consider repacking it as a new version when there is a new database. I'm not sure how often database updates will come out. We'll just have to see what happens.
Reply With Quote
  #31  
Old 07-10-2007, 03:29 PM
TrIn@dOr TrIn@dOr is offline
 
Join Date: Nov 2006
Location: South Bend, IN
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mfyvie View Post
Maybe, I can't say what will happen with that database in the future, but I may consider repacking it as a new version when there is a new database. I'm not sure how often database updates will come out. We'll just have to see what happens.
http://ip-to-country.webhosting.info/node/view/6

Approximately one time per month!
Reply With Quote
Reply


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:12 PM.


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.07371 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (4)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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