How to Disable Email Cloaking in Joomla on a Particular Page

We’re not the biggest fans of Joomla’s Email Cloaking plugin; we think it’s useless. But, obviously, the Joomla development team doesn’t agree with us as the plugin still exists in Joomla 3.4.x (the latest version of Joomla at time of writing this post). Additionally, there are still many Joomla websites who still use this plugin because they (mistakenly) believe it will protect their emails from spam. But, at times, some of these websites start having issues on some pages, and so their administrators reluctantly decide to completely disable the Email Cloaking plugin, thinking that this is the only way to address the problem.

While we think that disabling the plugin is the best way to address any problem caused by it (we really, really don’t like it), we have to admit, it is not the only way. In fact, one can disable the plugin at the problematic page level by just adding the following code to the (beginning of the) content item having the issue (the content item can be a Joomla article, a K2 item, a Joomla custom HTML module, etc…):

{emailcloak=off}

Once the above code is added to a content item, then the plugin will not be applied on that content item. This is because, in its code, the plugin has the following lines:

if (JString::strpos($text, '{emailcloak=off}') !== false){
$text = JString::str_ireplace('{emailcloak=off}', '', $text);
return true;
}

As you can see from the above code, the plugin is instructed not to continue running in case it encounters {emailcloak=off} in the content item.

If you would like to disable Joomla’s Email Cloaking plugin for a certain article (or any other content item), then all you need to is to follow the above code. If it doesn’t work for you, then just contact us and we’ll do it for you in no time and for a very affordable fee!

No comments yet.

Leave a comment