Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
got it working. i called the jquery.js at the bottom of the page. that was the problem.
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
I updated the plugin a little bit:
2012-09-04 v0.5
- bugfix: withespaces in href are now correctly escaped
- bugfix: removed redundant type attributes in script tag
- bugfix: plugin help rewritten and extended (plugin help guidelines)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
Another small bugfix version
2012-09-24 v0.6
- bugfix: works now with jQuery 1.8.0 and greater
Last edited by trenc (2012-09-24 13:23:52)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
My knowledge of JS, etc. is little so I don’t know if the plug-in really works … !?
Live > stichtingkarkas.com … the contact info is at the bottom.
TXP (tag in article) >
p(contact). E: <txp:yab_email email="info@stichtingkarkas.nl" text="info@stichtingkarkas.nl" set_js="0" />
HTML (at bottom page) >
<!-- calling jQuery the right way > https://github.com/h5bp/html5-boilerplate/blob/master/index.html -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.9.1.min.js"><\/script>')</script>
<!-- only if jQuery include is at the bottom of HTML > http://goo.gl/I7nzpz -->
<txp:yab_email_javascript />
Results in (HTML rendered) >
<p class="contact">E: <a class="yab-email-link" href="mailto:info(%20at%20)stichtingkarkas.nl">info@stichtingkarkas.nl</a></p>
Is this all?
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
Hi Jop,
My knowledge of JS, etc. is little so I don’t know if the plug-in really works … !?
It is working. But I would leave the text attribute blank:
<txp:yab_email email="info@stichtingkarkas.nl" set_js="0" />
So the displayed text is the obfuscated mail address too, otherwise the exact text phrase will be shown, which is in your case the non-obfuscated mail address.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
Thanks Trenc … but why can’t I see an obfuscated email address? The answer is (of course) because the script defuscating the address also … isn’t it?
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
Thanks Trenc … but why can’t I see an obfuscated email address? The answer is (of course) because the script defuscating the address also … isn’t it?
So it is.
The tag itselfs is calling some PHP functions. These will obfuscate your mail and create the mailto-link. The result you can see in your HTML source code of your website (btw. it is a really nice clean layout and design).
It’s a link with the class yab-email-link
and every char in your mail address is replaced with its HTML entity. Some mail harvester can’t read these entities. Additonally the @ char is replaced by a (%20at%20)
. The %20
were escaped whitespaces für HTML validity.
The JavaScript in your browser then replace the (%20at%20)
back to a normal @. So the browser renders the link normally and it looks familiar.
Due mail harvesters are really simple and don’t understand JavaScript the harvesters will only see the obfuscated mail address. In case of e.g name@example.com the harvester will see the source code:
name(%20at%20)example.com
An browser with JavaSript disabled and some »render-abled« harvester will render:
name( at )example.com
And a browser with JavaScript enabled will see the correct mail:
name@example.com
Hope that helps,
trenc
Last edited by trenc (2013-11-15 11:25:30)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
Sure, your explanation does help. And thanks for the compliment … :))
Offline
#33 2015-05-18 18:12:39
- candyman
- Member
- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
I need to obfuscate an email address in a section of my site.
Anyway, cause I need to have this address:
mysite.it/privacy
and not this:
mysite.it/privacy/name_of_the_article_talking_about_the_privacy_policy
I have to write the article in the page itself, without using the normal method (create article).
In this way I can’t use the plugin tag.
So, can you help me to obfuscate the mail without the plugin but directly with an HTML code? Any suggestions?
Thanks in advance.
Last edited by candyman (2015-05-18 18:14:01)
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
Hi candyman,
you can use the plugin in an article or a form or a page. It doesn’t matter. Plugin tags can be used everywhere, when activated in preferences.
Last edited by trenc (2015-05-26 08:27:12)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: yab_email (simple obfuscate/defuscate email adresses, jQuery based)
yab_email_v0.7.txt is now TXP 4.6-ready.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline