Plugin details

The Enkoder helps protect email addresses by converting them into encrypted JavaScript code, hiding them from email-harvesting robots while revealing them to real people.

Websitehttp://hivelogic.com/enkoder Author Dan Benjamin Tags Javascript, email LicenseUnknown

Documentation

==Installation:

Just drop the "enkoder" folder into the /vendor/plugins folder in your project.

==Usage:

There are two methods:

enkode( html )



This method accepts a block of html (or any text) and returns an enkoded JavaScript.

The second method is:

enkode_mail( email, link_text, title_text=nil, subject=nil )



This method takes an email address, the text to show to the viewer, optional title text (what's seen when somebody hovers over the link), and optional subject for the email, and returns an enkoded email address link.


==Examples:

To enkode a single email address, one could just do:

<%= enkode_mail('user@domain.com','click here') %>



And the following link would be returned (enkoded as JavaScript):

click here



Of course we can also enkode many email addresses on the fly:

<% @users.each do |user| %>
		<%= enkode_mail(@user.email,@user.name) %>
<% end %>



To enkode a snippet of XHTML, we can do:

<%= enkode("<p>This block will be hidden from spambots.</p>") %>



We could protect a link or block of XHTML from being indexed like this:

<%= enkode('Try and find <a href="secret.html">this</a>, google!') %>



We could have anything we wanted in that block, XHTML, links, email addresses, etc.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: scott, 7 months ago