-1

I found this article about cloaking emails http://docs.joomla.org/How_to_cloak_email_addresses

This is not working for me :(. If I open an article and change to the source-code view and paste in JHtml::_('email.cloak', 'demo@example.com'); the code is interpreted as text not as email link - not to mention that it is uncloaked.

Can someone tell me what I have to do to make that work?

1

Firstly, please ensure you are using the latest version of your Joomla build, so either 2.5.24 or 3.3.3 as there was a bug fixed for the email cloak in both the latest versions.

You cannot simply paste PHP into your text editor, this will not work. For Joomla to process PHP or other languages in the editor, you must use a 3rd party plugin such as Sourcerer.

2

The code you're trying to use (JHtml::_('email.cloak','demo@example.com'); is not meant to be used within articles. The page you linked to states clearly:

Joomla has inbuilt email cloaking functionality that can be called within a component or module template

But there is an email cloaking plugin included in your Joomla installation, look for Content - Email Cloaking in the Joomla Plugin Manager and enable it if necessary. Or check the Joomla Extensions Directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.