Changeset 1041157
- Timestamp:
- 12/09/2014 12:45:41 PM (11 years ago)
- File:
-
- 1 edited
-
geoswitch/trunk/readme.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
geoswitch/trunk/readme.txt
r1041143 r1041157 9 9 License: GPLv2 or later for plugin code, Apache License version 2.0 for Maxmind library under vendor directory 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 12 GeoSwitch is a plugin that allows you to change the content of your site based on the location of your client’s IP. 11 13 12 14 == Description == … … 22 24 23 25 == Installation == 24 **Prerequisites** 26 =Prerequisites= 25 27 The Geoswitch plugin uses MaxMind’s city database you’ll need either the free GeoLite2 city database 26 28 (download from [here](http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz)) or obtain a license from MaxMind … … 35 37 36 38 == Usage == 37 **GeoSwitch Conditional Blocks** 39 = GeoSwitch Conditional Blocks = 38 40 39 41 GeoSwitch uses two shortcodes [geoswitch] and [geoswitch_case] to create conditional blocks. … … 43 45 on the user’s IP location: 44 46 45 ` ``47 ` 46 48 [geoswitch] 47 49 [geoswitch_case country_code=”AU” state_code=”NSW”]New South Wales Office[/geoswitch_case ] … … 49 51 [geoswitch_case]International Office[/geoswitch_case ] 50 52 [/geoswitch] 51 ` ``53 ` 52 54 53 55 The above GeoSwitch block will display “New South Wales Office” to users in New South Wales within Australia, … … 66 68 The `[geoswitch_case]` shortcode matches only the attributes specified so: 67 69 68 ` ``70 ` 69 71 [geoswitch] 70 72 [geoswitch_case city=”paris”]You are in Paris![/geoswitch_case] 71 73 [/geoswitch] 72 ` ``74 ` 73 75 74 76 Will display “You are in Paris!” to any user with an IP location in a city named Paris, e.g Paris, France or Paris, Texas, USA. … … 79 81 Content between the [geoswitch] and [geoswitch_case] shortcodes should be whitespace but is usually ignored: 80 82 81 ` ``83 ` 82 84 [geoswitch] *DON’T WRITE HERE* 83 85 [geoswitch_case]...[/geoswitch_case] *OR HERE* 84 86 [geoswitch_case]...[/geoswitch_case] 85 87 [/geoswitch] 86 ` ``88 ` 87 89 88 **Informational Shortcodes** 90 = Informational Shortcodes = 89 91 90 92 In addition to the conditional block GeoSwitch offers the following shortcodes to display user information:
Note: See TracChangeset
for help on using the changeset viewer.