rss_googlemap_stats
Plugin Details
- Download:
- rss_googlemap_stats v0.2
- Textpattern Forum:
- View discussion
- Plugin Type:
- Regular
- Current Version:
- 0.2
- Status on this site:
- Active
The rss_googlemap_stats plugin displays recent visitors to your site on a Google Map along with a chart of recent visitors below. Here’s how the plugin works:
This plugin displays recent visitors to your site on a Google Map along with a chart of recent visitors below. Here’s how the plugin works:
- The last x distinct IP Addresses written to the TXP log table are queried (25 by default)
- The physical location of the IPs are looked up using an IP Address Lookup service and results are cached locally using a PHP function written by Carlos Averett
- If the location is found, the coordinates are added to the Google Map display using the GXmlHttp object, Google’s implementation of “AJAX” support.
- The map is placed in a div with an ID of “map” and the chart is placed in a div with an ID of “mapchart”
How To Use the Plugin
- Go get a Google Maps API Key. Its free, and you need a unique key for each domain you use the plugin on.
- Make sure you have a “Temp Folder” set under your Advanced Preferences and that its writeable. It will be used as a cache directory for IP Address Lookups.
- Add the
<txp:rss_googlemap_stats_js apikey="xxx" />tag to the<head>section of your page. Set the apikey attribute using the key you just got along with any other attributes. - Add the
<txp:rss_googlemap_stats />tag to the<body>section of your page. Set the attributes as you like.
Example Output
The rss_googlemap_stats_js tag
apikey
Your Google Maps API Key.
Default: ‘my-key’
Example: apikey=”go-get-your-own-key”
limit
The number of unique IPs used for the map.
Default: ‘25’
Example: limit=”50”
zoom
The map zoom level. Valid range is 1 – 17. The lower the number, the close the zoom.
Default: ‘16’
Example: zoom=”7”
showcontrol
Indicates whether the map navigational control is shown.
Default: ‘1’
Example: showcontrol=”0”
controltype
The type of navigational control. Valid options are “large” and “small”. Large include the full zoom slider while small does not.
Default: ‘large’
Example: controltype=”small”
showmaptype
Indicates whether the map type switcher (map/satellite/hybrid) is shown.
Default: ‘1’
Example: showmaptype=”0”
showchart
Indicates whether the map type switcher (map/satellite/hybrid) is shown.
Default: ‘1’
Example: showchart=”0”
The rss_googlemap_stats tag
width
The width of the map in pixels.
Default: ‘500’
Example: width=”700”
height
The height of the map in pixels.
Default: ‘300’
Example: height=”500”
refreshbutton
Indicates whether a refresh button is shown above the map.
Default: ‘1’
Example: refreshbutton=”0”
