yab_email -- Email obfuscate/defuscate as textpattern plugin
Trencavel am 20. September 2009
yab_email is a tiny Textpattern CMS-Plugin for obfuscating and defuscating email adresses to prevent harvesting email adresses.
This plugin will use jQuery and is based on the jQuery plugin Email Defuscator.
Download
Plugin help
This plugin requires the jQuery Javascript-Framework is called in the site.
Tags
<txp:yab_email />
Obfuscate a given email address.
| attribute | default | description |
|---|---|---|
| name@example.com | An email address, that will be obfuscated. | |
| text | not set | Linktext for a created hyperlink. |
| at | at | Text between the created parantheses in the obfuscated email address. |
| set_js | 1 | Return the javascript for defuscating. |
| class | yab-email-link | Class for generated span. |
| link | 1 | If no attribute ‘text’ is given and link=“0” so a mailto link will not be generated. Output will be a <span>. |
<txp:yab_email_javascript />
Defuscate the obfuscated email address.
If you don’t want do display the defuscating javascript — f.i. if you want to obfuscate/defuscate more than one email address or if you call the jquery.js at the bottom of your page — so you can supress the javascript output by the attribute set_js="0". And with the tag <txp:yab_email_javascript /> you can output the javascript on your own.
| attribute | default | description |
|---|---|---|
| class | yab-email-link | Class for generated span. If you call <txp:yab_email_javascript />, be sure the class is same as used in <txp:yab_email />. |
| link | 1 | If no ‘text’ from <txp:yab_email /> is given and link=“0” so a mailto-link will not be generated. Output will be a <span>. |
Changelog
- 2009-09-20 v0.1
- initial release
- 2009-09-20 v0.2
- bugfix: releated DOM load
- 2009-09-20 v0.3
- feature: added class attribute
- bugfix: style in plugin help
- 2009-09-21 v0.4
- bugfix: fixed XHTML validation errors
- feature: added new attribute link
# - Su-Mu schrieb am 25. September 2009, 09:17:
Danke für deine Hilfe, vielleicht solltest du diesen jQuery-Schnipsel für den Head-Bereich noch oben in deine Anleitung einfügen? Ist ja nicht jeder so ein Coder ;-)
# - trenc schrieb am 25. September 2009, 11:13:
Hi Sumu,
hast Du bestimmt übersehen, aber der Hinweis steht ganz oben in der Plugin-Hilfe. :)
# - Su-Mu schrieb am 25. September 2009, 13:05:
nein, habe ich nicht übersehen! nicht verstanden!
Damit konnte ich leider nichts anfangen …
# - trenc schrieb am 25. September 2009, 17:40:
Ah ok.
Ich ändere die Hilfe beim nächsten Update.