Posts Tagged ‘joomla plugin’
Joomla: country content filter – custom plugin
Hello,
one of our customers kept complaining that users connecting from China get an ugly 404 error in the iframe where we displayed our Vimeo videos.
We contacted Vimeo and their obvious answer was: “we have no control on this, we can’t help you”.
We went looking for a plugin that would allow us to display content based on the user provenance but we were unable to find anything that would fit our requirements so we developed it ourselves (the credit goes mostly to Tom Meredith who re-engineered my initial prototype from scratch).
This simple plugin allows editors to easily decide what content should be displayed for selected countries based on the visitor’s IP, for example:
{countryaccess country=CN,MM}
I am not in China or Myanmar
Here you put the code you want to display if the user is not from China or Myanmar
||
I am in China or Myanmar
Here you put the code you want to display if the user is from the countries listed in the opening tag (country=). For example, with our customer we decided to display a nice image that would redirect the user to the Vimeo channel (he would still get a 404 then but not on our homepage).
{/countryaccess}
The cool thing is that the plugin can be reused for all sort of things: localised Ads, localised content etc.
The plugin can be downloaded from: https://sourceforge.net/projects/countryaccess/?source=dlp
HTH,
Roberto.