Spam Me Not
An email obfuscator that works even with Javascript disabled
Download Spam Me Not 1.0.3 (2kb zip)
This version posted September 15, 2007
I know EE has the built in “encode” for masking email addresses but I’m one of those people who really like things to work whether or not the user has Javascript enabled. My goal was to make port an email obfuscator that worked even with Javascript disabled.
I just started using EE for most sites. Before, I used to have a config.php file that had all my handy functions in it – one of which was obfuscateEmail(); which ran a bit of PHP (see http://www.zapyon.de/ for the basis of what is happening in this plugin) to encode the email address in decimal or hexadecimal mode. May not be the most robust email masking, but it has worked for me on numerous sites, and I’ve never had a client say they were getting too much spam. I wanted this to work in my EE sites, so I wrote my first plugin! (cue sound of 1 hand clapping…)
Versions
Version 1.0.3 (Sep 15 2007):
Added class and subject options (Thanks gleam, jejune)
Version 1.0.2 (Nov 17 2006) – 160 downloads
Description
The tag has three six parameters:
1. email – The email address to obfuscate. [REQUIRED]
2. mode – 1 or 2. 1 = decimal mode and 2 = Hexadecimal [OPTIONAL, defaults to 1]
3. text – Text to display if different than the email address [OPTIONAL, defaults to showing the email address]
4. title – OPTIONAL
5. subject – OPTIONAL
6. class – OPTIONAL
Example usage (full):
{exp:spammenot email="ee@masugadesign.com" mode="1" title="My Title"
class="nocion email" subject="EE Inquiry" text="Email Ryan for more info."}
Example usage (basic):
{exp:spammenot email="ee@masugadesign.com"}
Hope it works for you.
This entry was last updated April 20, 2008.