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