{NOSPAM_EMAIL} Replacement Tag
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.
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.
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
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:
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?!
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>
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?!
-
- Posts: 31
- Joined: Sun 27. Feb 2005, 10:50
What should the file uploaded in folder frontend_render be named as?
Visit my handheld gaming site on http://www.handheld-gamers.com/
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
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.
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
how looks the rendered link?
i get this:
with this code:
here is the output:
http://sser540.lw-s13.sserv.de/contact.phtml
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>
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"]);
}
// -------------------------------------------------------------
http://sser540.lw-s13.sserv.de/contact.phtml
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...
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,
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,
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
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
Both Tags are possible:
{NOSPAM_EMAIL:mail@adress.de}
{NOSPAM_EMAIL:mail@adress.de:write email}
see start post.
greetings marcus
Google and friends
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...
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...
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
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)?
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)?