1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Beta GeoIP template Variable 2015-06-05

Two letter code of the surfer's IP available as a template variable

  1. Weppa333
    Compatible XF Versions:
    • 1.4
    Additional Requirements:
    Requires PHP GeoIP installed ( PECL GEOIP )
    Visible Branding:
    This simple basic and beta add-on will provide an additionnal template variable so that you can hide or show template elements based on the surfer's IP.

    Example :
    Modify page_container
    <!-- Surfer IP in {xen:raw $geoipcountry} -->

    To hide something to surfer from China
    <xen:if is="{$geoipcountry} != 'CN">China does not see this</xen:if>
    Anthony Parsons likes this.