encMail__XH (encrypt email) tries by best knowledge to protect your placed e-mail addresses from unfriendly spambot harvesting. It obfuscates e-mail links through javascript, the e-mail address itself with ASCII replacements and other hiding techniques to make it hard or too costly for mail harvesters to catch you address. E-Mail addresses inside form tags stay untouched.
Please do read this documentation! Support might not be given otherwise. It's generally a good idea to read the documentation, before you encounter any problems!
encMail_XH couldn't be tested so far in various environments. It is a so called RC version. Use with caution!
encMail_XH is a plugin for CMSimple_XH versions up from 1.5.4
The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details.
There are two way to setup the obfuscation functionality. The 1st is simple and easy the 2nd is more sophisticated but provides more possibilities to configure. Details see below.
put in your template at the very end:
<?php encMailTplBottom();?>
The plugin's configuration is done as with many other CMSimple_XH plugins in the website's back-end. Select "Encmail" from "Plugins".
You can change the default settings of encMail_XH in "Plugin Config". Hints for the options will be displayed when hovering over the help icon with your mouse. You can set the obfuscation setting to "global" or "page". Since global is self explanatory, select "page" and there is a additional "encmail" tab in admin edit mode when editing page. There you are able to set the obfuscation setting pagewise.
This way, according your config settings the whole page's e-mail addresses will be obfuscated, really everything, the template and all the plugins's output included. Be aware that newsboxes() or e-mail addresses placed in templates are treated the way the actual page is set. If you place an e-mail address inside a newsbox or template you have to set the e-mail obfuscation to "global".
Localization is done in "Plugin Language". You can translate the character strings to your own language, or customize them according to your needs.
This way of configuration suits small pages with little plugins.
Benefit: the page is easy configurable. Set config to global and don't worry again about e-mail obfuscation.
Drawback: The algorithm to find and replace an e-mail address to an obfusated one may turn out pretty server demanding as it has to scan the whole output of a page.
Set the obfuscation setting in configuration to "manual" and set the obfuscation as follows:
To obfuscate just the actual page:
Put in content this cmsimple scripting:
#CMSimple encMail($output);#
this obfuscates the e-mail addresses in the content/$output of the actual page. Template, menu and plugins are unaffected. This way you could put your impression (with e-mail address) in a newsbox() and obfuscate just this one. Nice & fast.
Alternative option
To obfuscate all pages:
Put in template at the very beginning:
<?php if (!$adm || !$edit) encMail($c[$s]); ?>
this obfuscates the e-mail addresses in the output of all pages. Template, menu and plugins are unaffected.
obfuscate e-mail addresses in template itself, put this sequence to the appropriate place in template:
<?php echo encMail_obfuscateSingleAddress([emailaddress],[addLink=false]);
?>
Set your e-mail address as parameter. The addLink option adds an "mailto:" Link to the simple e-mail address.
This way you you can exactly choose where the obfuscation/replacement has to be done. Unnecessary modules are not affected and reduce server load.
encMail_XH is licensed under GPLv3.
© 2014 Emanuel Marinello
Thanks to cmb Christoph M. Becker for enhancing his plugin for proper collaboration and providing templates to complete this plugin.
Many thanks to the community at the CMSimple forum for tips, suggestions and testing.
And many thanks to all developers of CMSimple_XH without whom this amazing CMS wouldn't exist.