TIP GeoPlugin is not installed on Foswiki.org.

GeoPlugin

Geo location services

GeoPlugin provides geo-location services, implementing a lookup feature from IP address, domain name, or physical address. It is a wrapper around the CPAN:Geo::IP and CPAN:Geo::GeoNames libraries.

Note that GeoPlugin caches each request, so multiple instances on the same page do not slow things down.

Usage

%GEO{ "address" format="$country_code ($lat,$lng)" }%

address can be one of:
  • IP address
  • Domain name
  • Physical address

the format string can reference these defined variables
  • $country
  • $country_name
  • $latitude
  • $longitude
  • $time_zone
  • $region (state or province, typically)
  • $city
  • $postal_code (for USA addresses only (maybe Canadian, too))
  • $area_code
  • $metro_code (for USA addresses only)

  • $query the original query
  • $method Geo::IP or Geo::GeoNames

Examples

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

To install the database(s) used by CPAN:Geo::IP,

CPAN:Geo::GeoNames uses a webservice (I believe). I think there is a way to download a database, but I have not persued that yet.

Info

Author(s): Foswiki:Main.WillNorris
Copyright: © 2009 Will Norris.
License: GPL (Gnu General Public License)
Version: 3230 (2009-03-21)
Change History:  
17 Mar 2009 Added time_zone support
17 Mar 2009 Initial release
Dependencies:
NameVersionDescription
Geo::IPOptional. Required to lookup location based on IP address
Geo::GeoNamesOptional. Required to lookup location based on geographic name
Home page: http://foswiki.org/bin/view/Extensions/GeoPlugin
Support: http://foswiki.org/bin/view/Support/GeoPlugin
Demo: http://myhome.cocomint.org/Sandbox/GeoPluginExamples

Topic attachments
I Attachment Action Size Date Who Comment
GeoPlugin.md5md5 GeoPlugin.md5 manage 150 bytes 21 Mar 2009 - 05:38 WillNorris  
GeoPlugin.sha1sha1 GeoPlugin.sha1 manage 174 bytes 21 Mar 2009 - 05:39 WillNorris  
GeoPlugin.tgztgz GeoPlugin.tgz manage 10 K 21 Mar 2009 - 05:38 WillNorris  
GeoPlugin.zipzip GeoPlugin.zip manage 13 K 21 Mar 2009 - 05:38 WillNorris  
GeoPlugin_installerEXT GeoPlugin_installer manage 4 K 21 Mar 2009 - 05:38 WillNorris  
Topic revision: r3 - 21 Mar 2009, WillNorris - This page was cached on 27 May 2016 - 10:39.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License