vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - GLA - Geographic Location Awareness for vBulletin (https://vborg.vbsupport.ru/showthread.php?t=151601)

mfyvie 07-10-2007 03:36 PM

Careful there - the forum post you are quoting is 3 years old. From the looks of that site it doesn't appear to be well maintained. The last update was in March, already 4 months old. I used this database because it was free and I didn't have to look too hard to find it. However, if anyone else finds a more reliable source for the database, I can look at switching over to something else. Most of these databases are unfortunately commercial.

mfyvie 07-12-2007 12:18 PM

I've discovered a very minor flaw.

Impact: If a user's IP isn't found in the database, GLA functions will be disabled for that user. For example, they won't be able to see the who's online list. Whenever that person loads any page on the forum, 1 extra query will be executed - for most people that wouldn't be the end of the world, but I have tried to make GLA as efficient as possible.

What you need to do: Download the .zip file again, you do not need to reinstall the whole package, just replace your includes/gla.php file that you uploaded earlier.

Why this happened: People not interested in the programmer's explanation may skip this next part - show's over folks.. When someone's IP address isn't found we write a null value to the session variable. We use isset() to later check if we've already executed the query, but if the null value is written to the database it doesn't come back on the next page load, therefore the isset() we expected to be true is really false. This is solved by writing an unknown entry to the database as ' ' (space character), GLA then trims anything that comes from the session table the first time it loads - effectively nullifying the variable again. Thereore developers can still use isset() before their GLA compatible plugins (to test if GLA is present at all), and != null to test to see if a country has been found.

What if I do nothing? Well it won't be the end of the world, but it might mean that some users (who have IP addresses that aren't in the database) might not be able to use features which rely on GLA. I'd therefore prefer it if everyone replaced their gla.php file - just to ensure no support issues come up in the future.

Who should do this? Anyone who downloaded and installed GLA before the date of this post. Anyone who has installed GLA after the date of this post can safely ignore this whole post!

mfyvie 07-12-2007 08:25 PM

For those of you who run the Proxy RBL on Registration mod, you'll be pleased to know that I've posted some info here on how to make this mod "country aware" using GLA.

TOGUIMASTER 07-12-2007 09:22 PM

Thanks for this ..

Captain Kirk76 07-13-2007 09:50 AM

Thanks for this.
Although it is a bit USA happy. Alot of people seem to get traced to the US. (I.E one of my German members is apparantly in the USA :p)

mfyvie 07-13-2007 12:13 PM

Quote:

Originally Posted by Captain Kirk76 (Post 1289857)
Thanks for this.
Although it is a bit USA happy. Alot of people seem to get traced to the US. (I.E one of my German members is apparantly in the USA :p)

Yes that can happen if the block was original allocated to a US company who then allocated parts of it somewhere else without that being recorded in the database.

If you know of any such errors you can also make a manual modification to the database.

Captain Kirk76 07-14-2007 06:58 AM

Quote:

If you know of any such errors you can also make a manual modification to the database.
I wouldn't know where to edit the DB to fix the problem, lol :o

mfyvie 07-14-2007 07:02 AM

Quote:

Originally Posted by Captain Kirk76 (Post 1290622)
I wouldn't know where to edit the DB to fix the problem, lol :o

You would if you looked back one page in this thread, specifically post #24. That will give you instructions to manually add IP ranges to the database

Captain Kirk76 07-14-2007 05:34 PM

Okay, thanks ;)

(Also, finally remembered to click installed :D)

mfyvie 07-16-2007 09:09 PM

I've just finished a verification script which will test many aspects of GLA and report whether they are correct or not. If something is not correct a text box will be displayed explaining how the problem may be resolved.

I believe this should make it much easier for people who install it to be able to verify their installation before asking for support. In fact, the script gives the sort of answers I might give them if they came to this thread for support anyway.

Those of you who already have working GLA installations may be interested to look at the script anyway. It will tell you whether you've installed the flags correctly for ALL of your styles, and if GLA is functioning correctly it will even give you a little search box where you can query any IP address you like to find out the country.

This file is called gla_test.php and is now included in the installation archive. It is designed to be run from your main forum directory, but you could run it from any directory you like. You can either redownload the archive to get this file, or I've attached it to this post with a screenshot. Unfortunately the screenshot gets automatically scaled down, so it may be hard to read.

I hope you all enjoy this test script and find it useful.


All times are GMT. The time now is 05:50 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.01102 seconds
  • Memory Usage 1,741KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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