Email Protection Plus for Joomla – its not just for text anymore

Spambots and e-mail harvesters are an important tool for the spamming community as collecting e-mail addresses from web sites provides a ‘market’ for all that junk you get in your spam folder and often in your inbox.

Like any good content management system or blog, Joomla protects any e-mail addresses in your site content by using javascript to encode the emails in source code of your site. This prevent the harvesters from recognizing them as an e-mail address but allows the end-user to click the e-mail address on your site and trigger your default mail client to start composing a new message with the 'To:' field pre-populated.

The email cloaking feature is delivered via the aptly-named ‘Email cloaking’ plugin which makes protecting your email address available to 3rd party extensions such as JCal Pro® that support content plugins.  However, I have had to disable this plugin in the past on some sites as end-users would sometimes report the following error when they clicked on some e-mail links

This e-mail address is being protected from spambots. You need JavaScript enabled to view it.

Well, I never really got to the root of the problem and it always bothered me that I had a site without e-mail protection. Today the problem reared its head again and I decided to get to the bottom of it. First stop: forum.jooma.org

Searching for the error message above returned many hits, suggesting that this is a common problem with no immediate solution. After discussing the issue with some other Joomla developers, we quickly discovered that the behaviour only occurred when images were being used as links to the e-mail address. For example:

<a href="mailto: This e-mail address is being protected from spambots. You need JavaScript enabled to view it "><img src="/mail.png" alt="Email” /></a>

This was the critical clue and refining our search on the forum confirmed that this type of link was not supported by the email cloaking plugin. Thankfully, user wajdan723 had already posted a hack of the plugin to support image links properly.

Not wanting to hack the Joomla core, Ken Crowder - a colleague and author of Using Joomla: Building Powerful and Efficient Web Sites - quickly took the opportunity to port the hack into a stand-alone plugin called Email Protection Plus that can be installed on your Joomla site as a replacement for the default plugin.

This plugin is now available as a free download here at anything-digital.com .

Last modified on Oct062011
blog comments powered by Disqus
 
 

Get the latest updates on our extensions