Plugin Directory

Changeset 1041157


Ignore:
Timestamp:
12/09/2014 12:45:41 PM (11 years ago)
Author:
elialgranti
Message:

Version 1.0.0 for development source control see https://github.com/elialgranti/geoswitch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geoswitch/trunk/readme.txt

    r1041143 r1041157  
    99License: GPLv2 or later for plugin code, Apache License version 2.0 for Maxmind library under vendor directory
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     11
     12GeoSwitch is a plugin that allows you to change the content of your site based on the location of your client’s IP.
    1113
    1214== Description ==
     
    2224
    2325== Installation ==
    24 **Prerequisites**
     26=Prerequisites=
    2527The Geoswitch plugin uses MaxMind’s city database you’ll need either the free GeoLite2 city database
    2628(download from [here](http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz)) or obtain a license from MaxMind
     
    3537
    3638== Usage ==
    37 **GeoSwitch Conditional Blocks**
     39= GeoSwitch Conditional Blocks =
    3840
    3941GeoSwitch uses two shortcodes [geoswitch] and [geoswitch_case] to create conditional blocks.
     
    4345on the user’s IP location:
    4446
    45 ```
     47`
    4648[geoswitch]
    4749[geoswitch_case country_code=”AU” state_code=”NSW”]New South Wales Office[/geoswitch_case ]
     
    4951[geoswitch_case]International Office[/geoswitch_case ]
    5052[/geoswitch]
    51 ```
     53`
    5254
    5355The above GeoSwitch block will display “New South Wales Office” to users in New South Wales within Australia,
     
    6668The `[geoswitch_case]` shortcode matches only the attributes specified so:
    6769
    68 ```
     70`
    6971[geoswitch]
    7072[geoswitch_case city=”paris”]You are in Paris![/geoswitch_case]
    7173[/geoswitch]
    72 ```
     74`
    7375
    7476Will 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.
     
    7981Content between the [geoswitch] and [geoswitch_case] shortcodes should be whitespace but is usually ignored:
    8082
    81 ```
     83`
    8284[geoswitch] *DON’T WRITE HERE*
    8385[geoswitch_case]...[/geoswitch_case] *OR HERE*
    8486[geoswitch_case]...[/geoswitch_case]
    8587[/geoswitch]
    86 ```
     88`
    8789
    88 **Informational Shortcodes**
     90= Informational Shortcodes =
    8991
    9092In addition to the conditional block GeoSwitch offers the following shortcodes to display user information:
Note: See TracChangeset for help on using the changeset viewer.