#1711 - Country Specific Banners
0 guests and 0 members have recently viewed this.
The top 3 point earners from 14th Dec 2025 to 21st Dec 2025.
| PDStig |
|
|
|---|---|---|
| Gabri |
|
|
| sholzy |
|
|
There are no events at this time
Untested code...
{$BANNER,{$?,{$AND,{$EQ,{$GEOLOCATE},US,GB},{$GT,{$RAND},16000}},banner_{$GEOLOCATE},banner_regular}}
Code says...
If geolocates to either US or UK and 50% of the time (*), then show a banner of type banner_<countrycode>, otherwise show a banner of type banner_regular.
* A random number between 0 and 32000 is over 16000.
Anyway, this is not something I personally need as I said, but I thought as some people will be using Composr for multilingual sites, that this would tie in nicely with the internationalization aspects of Composr.
$GEOLOCATE returns 'GB', 'US', etc - the ISO country codes. I built that into the banner type names outputted by my Tempcode above.