Page 2 of 3
Posted: Sat 19. Mar 2005, 03:33
by goshen
Hi,
This mod looks great, but just need a little help.
I have placed the code inside a few file in the Frontend_render folder, and used the following tag inside a Content Part:
{NOSPAM_EMAIL:
mail@kitepower.com.au}
It displays on the page fine, but when a user clicks on it (which opens their email program), the address is displayed as:
mail<span>@</span>kitepower<span>.</span>com<span>.</span>au
Is there something wrong that I have done? When a user 'Mouse Overs' the email link, what should they see the Status Bar of the browser?
Thanks in advance.
Posted: Mon 21. Mar 2005, 13:58
by marcus@localhorst
mmmh, strange take a look here:
http://www.fieldmuzick.net/fieldcontent/contact.phtml
in thunderbird, the real mailadress will included, the output in sourcecode should look like this:
Code: Select all
<a href="mailto:%6D%61%69%6C%40%61%64%72%65%73%73%2E%74%6C%64">mail<span>@</span>adress<span>.</span>tld</a>
on mouse over, you will see
mailto:%6D%61%69%6C%40%61%64%72%65%73%73%2E%74%6C%64 in the statusbar...
i tried it with your adress with the code which starts the topic and it works?!
Posted: Tue 22. Mar 2005, 04:05
by goshen
It's working fine now. Thanks for the extra info (although I don't know what I was doing wrong).
Posted: Wed 30. Mar 2005, 18:06
by Statocast3r
What should the file uploaded in folder frontend_render be named as?
Posted: Wed 30. Mar 2005, 21:04
by marcus@localhorst
call it like you want! i've got one file basic.php in the frontend_render folder which hold my basic Replacementtags/functions.
greetings marcus
Posted: Fri 10. Jun 2005, 10:41
by nekket
I love this mod but it doesn't work in the current release... any solutions?
Posted: Fri 10. Jun 2005, 12:06
by marcus@localhorst
any error?
it works for me on the newest version.
turn on frontend_end folder?
greetings marcus
Posted: Fri 10. Jun 2005, 12:16
by nekket
Same problem like here (goshin)
goshen wrote:Hi,
This mod looks great, but just need a little help.
I have placed the code inside a few file in the Frontend_render folder, and used the following tag inside a Content Part:
{NOSPAM_EMAIL:
mail@kitepower.com.au}
It displays on the page fine, but when a user clicks on it (which opens their email program), the address is displayed as:
mail<span>@</span>kitepower<span>.</span>com<span>.</span>au
Is there something wrong that I have done? When a user 'Mouse Overs' the email link, what should they see the Status Bar of the browser?
Thanks in advance.
Posted: Fri 10. Jun 2005, 12:38
by marcus@localhorst
how looks the rendered link?
i get this:
Code: Select all
<a href="mailto:%6D%75%7A%69%63%6B%40%6E%61%75%7A%65%6D%75%7A%69%63%6B%2E%6E%65%74">muzick<span>@</span>nauzemuzick<span>.</span>net</a>
with this code:
Code: Select all
/********************************************
titel: {NOSPAM_EMAIL} Replacement-Tag
description: {NOSPAM_EMAIL:mail@adress.tld}
this tag will encode your emailadress to hexcode
the output looks like this:
<a href="mailto:%6D%61%69%6C%40%61%64%72%65%73%73%2E%74%6C%64">mail<span>@</span>adress<span>.</span>tld</a>
notice: these two vars replace @ and . with the chars you prefer like this: mail (at) adress (dot) tdl
$ats = "(at)";
$dots = "(dot)";
look at this too:
http://www.phpwcms.de/forum/viewtopic.php?t=4819
author: Marcus Obst
last modified: 26.01.2005 created
********************************************/
function no_spam($mail='') {
// these vars replace the @s and dots
$ats = "<span>@</span>";
$dots = "<span>.</span>";
$str = "";
$a = unpack("C*", $mail);
foreach ($a as $b)
$str .= sprintf("%%%X", $b);
$enc_mail = str_replace("@",$ats,$mail);
$enc_mail = str_replace(".",$dots,$enc_mail);
//here the link is rendered
$str = "<a href=\"mailto:" . $str . "\">" . $enc_mail . "</a>";
return $str;
}
if( ! ( strpos($content["all"],'{NOSPAM_EMAIL')===false ) ) {
$content["all"] = preg_replace('/\{NOSPAM_EMAIL:(.*?)\}/e','no_spam("$1");',$content["all"]);
}
// -------------------------------------------------------------
here is the output:
http://sser540.lw-s13.sserv.de/contact.phtml
Posted: Fri 10. Jun 2005, 18:41
by nekket
Hi,
This mod looks great, but just need a little help.
I have placed the code inside a few file in the Frontend_render folder, and used the following tag inside a Content Part:
{NOSPAM_EMAIL:
mail@kitepower.com.au}
It displays on the page fine, but when a user clicks on it (which opens their email program), the address is displayed as:
mail<span>@</span>kitepower<span>.</span>com<span>.</span>au
Is there something wrong that I have done? When a user 'Mouse Overs' the email link, what should they see the Status Bar of the browser?
Thanks in advance.
My solution:
i had a "mailto"-link in my wysiwyg editor... so there was a link in the source code.... this was the problem... just remove the link and it should work properly...
Posted: Tue 26. Jul 2005, 22:10
by StudioZ
Hi Marcus !
Is there any chance that your awesome
Replacement Tag could be used
also
to protect the
recipient: field
in the
email form generator and
email contact form content parts?
That would be so great!
Cheers,
Posted: Tue 7. Feb 2006, 15:51
by marcus@localhorst
I've update the tag to use it with individual link text like or not.
Both Tags are possible:
{NOSPAM_EMAIL:
mail@adress.de}
{NOSPAM_EMAIL:
mail@adress.de:write email}
see start post.
greetings marcus
Google and friends
Posted: Sun 21. May 2006, 15:50
by Buletti
Hi folks,
i recognized that this nospam replacemant works fine, but in the google cache the email is show in the "right" way.
Means that the "
max@mustermann.de" adress has been "fotographed".
Maybe this is a way for spiders to catch the adresses...
Posted: Sun 21. May 2006, 17:26
by marcus@localhorst
thanks for the info.
i don't know that.
what is the best way to hide e-mails for spam?
maybe to have no email adresses
Posted: Fri 10. Aug 2007, 09:26
by Nik2004
Installed it in v1.3.3 and it works.
However, when I click the generated email address in the page using IE 7, I get the message "Could not perform this operation because the default mail client is not properly installed" and the mail composition window does not pop up. I am using Thunderbird 2.0.0.6. Also, I see that the email address hyperlink in IE 7 is (when I put the mouse pointer over it, or when I right-click and do "Copy Shortcut"): "mailto:unborn%40unborn.gr". So, the @ symbol does not get generated as it should.
Any suggestion?
Everything works fine from Firefox 2.0.0.6.
Also: Any fix for the problem mentioned above (that google "photographs" emails)?