CVS edit link for Chad.emPowered
I'm a developer with emPowered Software LLC. We do Drupal site buildouts for marketing and creative companies.I'd like a CVS account to upload and maintain a custom module that we built for a user. It implements GeoIp locating based on a users location. There are 2 modules that do some of this, but they either implement geoip lookups for a specific purpose (ie targeted ads) or they only identify users by country, using the maxmind country lookup, and not the maxmind city lookup (two different api's). See projects http://drupal.org/project/ad_geoip and http://drupal.org/project/geoip
Instead, ours focuses on the City level lookup, using the maxmind City level API. It provides users with a point to input new cities, and give an approximate latitude and longitude for the city. Once that's done, when a user, authenticated or not, visits the site their approximate latitude and longitude are calculated with the lookup. We then take that approximate lat and long, and use great circle calculation (the haversine function) to find the city in the system they are closest to. That city is then stored in a session variable which can then be passed as an argument to a view, module, node, javascript etc.
Our module also provides a block that displays what system city the user is nearest to. The user then has the option of overriding what city the system thinks they are in by selecting a new one from the block and hitting submit.
The module also provides an admin menu under the 'site configuration' menu that allows an administrator to add new cities, change the values of current cities, or delete cities.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | geoip_city.tar_.gz | 44.95 KB | Chad.Cumba |
Comments
Comment #1
Chad.Cumba commentedComment #2
avpadernoRemember to change the status to , when you upload new code.
Comment #3
avpadernoWhy didn't you try to contact the maintainer of the other GeoIP module to include the support for a different localization API in the existing project?
Comment #4
avpadernoThere have not been replies from the OP in the past 7 days. I am marking this report as .