Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
8 + 8 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: UHQ-Geolocate
by iunderwood on 2010/12/16 16:10:28

And to sweeten the pot, I just put in IPInfoDB, which users can register for and use for free w/ their web API. :)

Just needs more polish and some verbosity in the documentation.
Re: UHQ-Geolocate
by Mamba on 2010/12/16 7:12:44

Looking good!

We always like Christmas gifts
Re: UHQ-Geolocate
by iunderwood on 2010/12/16 5:35:28

The module is moving along and has most of its shine and polish in place for a 0.9 release. The cheesy demo block can be seen on my XOOPS site:

http://xoops.underwood-hq.org

It's results are powered by the IP2Location DB1 binary database. More providers will be added to the module soon, but I do want to get this module out by Christmas.
Re: UHQ-Geolocate
by iunderwood on 2010/12/9 4:48:50

Looking for a little more feedback.

First, regarding using the module, I've got the following written up on its use:

==[ Use ]==

Modules which call out to geolocation services should test that the module is active and installed before using it. This is important because the module has been written with the capability to be disabled if desired through module preferences. (i.e. your provider cries that you use too much CPU or something)

For a full-validation include:

le="color: #000000"><?php function mymodule_geolocate($ip) { global $module_handler; $uhq_geolocate = &$module_handler->getByDirname('uhq_geolocate'); if (is_object($uhq_geolocate)) { if ($uhq_geolocate->getVar('isactive')) { require_once XOOPS_ROOT_PATH."/modules/uhq_geolocate/class/geolocate.class.php"; $geoloc = new geolocate; $geoloc->ipin = $address; $location = $geoloc->locate(); return $location; } } return NULL; }


The location is an object containing five variables: country, region, city, error, result.

Country: The two-letter ISO country code for the IP address submitted.

Region: Region within the country, if supported by your database.

City: City within the country, if supported by your database.

Error: An error number will be returned if there was a problem.
1 = Location disabled by module option
2 = Invalid IP address

Result: Object output from whatever class is used to query for the location. Good if you need to use specific results not directly supported by the module.

=====

Next up, I'm not quite sure what kinds of things would be good in the admin interface. As far as the commercial DBs go, I do intend to make it possible to update from within XOOPS, but am not necessarily committed to that for initial release.

Also, I'd like to know if anyone has a good place for an international flag set which I'd like to use within the context of a simple demo block which can be put on a site. I do have a tiny set which is good for single lines of text, but am looking for something bigger.

While I know the DBs can provide a ton more data than my object outputs at the moment, I'm looking to get a good base out there to start which can be extended upon later.
Re: UHQ-Geolocate
by iunderwood on 2010/12/7 4:13:29

Zyspec: I'm not exactly sure how to build a truly dynamic architecture for this just yet. However, I am returning an object that will have a structured output that should only get added to as the module further develops.

I've noted IPinfoDB and Maxmind for additional sources of information and will work both of those in. Note that the former is built off the free Maxmind DB and supplemented with other tools.

Who's Online

221 user(s) are online (165 user(s) are browsing Support Forums)


Members: 0


Guests: 221


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits