What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Nov 23, 2007 by magyusz
Labels: Featured, Phase-Deploy
HowTo  
Learn to use it in 1 minute

Download the latest jar

It is always available here: http://code.google.com/p/mailhide-tag/downloads/list

Put it on classpath of the web application (WEB-INF/lib)!

Add tag decalaration to the top of your jsp

If you use a prelude.jsp, it's recommended to add there.

<%@ taglib prefix="mailhide" uri="http://mailhide.recaptcha.net/tags" %>

Get API Key from reCAPTCHA

http://mailhide.recaptcha.net/apikey

It shows you the keys like:

Public Key: 01Kv9zQDQpGcbh2gofzvozDA==
Private Key: FD32D1A537831870E25568F6A2808AA5

It is important to generate your own keys, and not to use these demonstration keys to hinder even the tricky spammers from collecting mail addresses from your page.

Very simple to use

<mailhide:url email="test@example.org" privKey="FD32D1A537831870E25568F6A2808AA5" pubKey="01Kv9zQDQpGcbh2gofzvozDA=="/>

The above code will render this: http://mailhide.recaptcha.net/d?k=01Kv9zQDQpGcbh2gofzvozDA==&c=nXnYbQLCtPBI1DnvcpkKVb2Pm8eVBrjykVwL1w5su4o=

It is recommended to use it as a popup

Note: This example uses the c:set tag of standard tag library (jstl core).

<c:set var="mailhideUrl"><mailhide:url email="test@example.org" privKey="FD32D1A537831870E25568F6A2808AA5" pubKey="01Kv9zQDQpGcbh2gofzvozDA=="/></c:set>

<a href="${mailhideUrl}" title="Reveal email address"
onclick="window.open('${mailhideUrl}', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;">
Reveal email address
</a>

Comment by v.educurve, Aug 24, 2008

test


Sign in to add a comment