|
Copyright © 2008 John Kolbert. Visit the original article at http://simply-basic.com/posts/1941172.
I’m sorry for not updating the blog for the last week. I’ve had some family issues and work problems I’ve been dealing with. But to make up for it I’ve spent a few hours on Email Protect, a WordPress plugin that obfuscates email addresses into text or images automatically in posts, pages, and comments to keep them from being harvested by spam bots. That’s right. Email addresses typed into posts or pages will be converted automatically into either a protected text or image format. You choose which one in the “settings”. Email addresses typed into comments are always converted into text replacements.
Download link found at bottom of post. It’d be nice if you read it. :)
Since this is a release candidate I haven’t gotten around to creating a dedicated page for the plugin (I will though). Please read the description below and test it out. If you find any errors or bugs please let me know. I recommend using this on a test site as I have not finished complete bug testing.
Important: You must have the GD PHP graphics library installed to use the image replacement method. Most hosts have this come standard, so you shouldn’t have to worry about it. But if you can’t see any images, this may be why.
So how does it protect your email addresses? For example, you could chose to obfuscate your email addresses into either of the following to styles:
junk [at] simply-basic [dot] com

The plugin is fully featured. You can customize the text used to replace the “@” and the final period if you chose text replacement. If you chose image replacement you can choose the font, font color, background color, and border color.
You can also use the plugin anywhere in your template by using the following PHP code:
<?php if(function_exists('ep_email_protect')){ ep_email_protect('
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
'); } ?>
If you want to specify whether the obfuscation method should be text or email (rather then the method you selected in the “settings”), enter either “text” or “image” into the code. For example:
<?php if(function_exists('ep_email_protect')){ ep_email_protect('
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
', 'image'); } ?>
Known Issues. There is a known compatability issue with Coffe2Code’s Preserve Code Formatting plugin. If you rely on this plugin do not use Email Protect.
Full documentation, a dedicated page, and MUCH more info will come next week when I get around to finalizing bug fixes and launching the final version. Don’t forget to report your bugs!
Downloaded 21 times from this page

|