MSPSS: is there life after the helpdesk?

sharing solutions to uncommon IT problems

Joomla: country content filter – custom plugin

leave a comment »


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.

Advertisements

Written by zantoro

July 9, 2013 at 3:15 pm

Posted in Joomla

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: