Brent W
Well-known member
So I have a basic add-on that sets the Country Code based on Cloudflares GeoIP header.
The Listener is:
I am using this template conditional:
Is there a better conditional I can use (shorter using an array)?
The Listener is:
Code:
<?php
class BamaStangGuy_CFGeoIP_Listener
{
public static function template_create(&$templateName, array &$params, XenForo_Template_Abstract $template)
{
$params['countryCode'] = $_SERVER["HTTP_CF_IPCOUNTRY"];
}
}
I am using this template conditional:
HTML:
<xen:if is="{$countryCode} == 'IN' OR {$countryCode} == 'RU' OR {$countryCode} == 'CN'">
Is there a better conditional I can use (shorter using an array)?