Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] wm_encode email encoder

#1 2004-10-30 18:50:45

watts
Archived Plugin Author
From: San Jose, CA
Registered: 2004-05-26
Posts: 5
Website

[archived] wm_encode email encoder

Notice: This thread is archived, this plugin is no longer available.

**********************************************************

This is a drop-in replacement for the txp:email tag which attempts to provide a more robust block against spam harvesters. It can generate both a Javascript-based encoder which can only be “cracked” by a harvester that runs Javascript and a somewhat more sophisticated entity encoder that will first convert an address from “foo@bar.com” form to “foo at bar dot com” and then encode with a mix of decimal and hex entities. (This is less convenient due to the slight “mangling” of the address.)

<txp:wm_encode email="foobar.com” linktext=“email me” title=“popup” />@

In addition, there are script and noscript attributes to control generation of the Javascript-based and text-based encoding blocks, respectively. Use script=“0” to not generate the Javascript block and script=“1” to generate it, and noscript=“0” and noscript=“1” for the text block.

By default, only the Javascript block is generated. The default settings are marked with comments in the function and can be changed. If both blocks are generated, the text block will be wrapped in <noscript> tags, so Javascript-enabled browsers will only see the first one. If only the text block is generated, it will not be wrapped in <noscript>.

http://www.ranea.org/watts/txp/

Offline

  1. Index
  2. » Archives
  3. » [archived] wm_encode email encoder

Board footer

Powered by FluxBB