Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Ministry Tools > Staff Directory > avascript:linkTo_UnCryptMailto()
Total Posts: 7 - Pages (1): [1]
Author: Katharina May
Posted: Nov 23 2007 - 02:19 PM
Subject: javascript:linkTo_UnCryptMailto()
Hi *,

I've got a problem with the mailto link produced by the wec staff extension:
somehow no email client opens when clicking on the email adress, encoded
in the following way:
<a href="javascript:linkTo_UnCryptMailto('mailto:user@domain.de');"> user (at) domain.de </a>?

Did I maybe forget to configure something?

Thanks,

Katharina
user picture Author: Mark Stephenson
Posted: Nov 23 2007 - 03:52 PM
Subject: re: javascript:linkTo_UnCryptMailto()
Katharina,

Is the code you are showing something you typed in or is it from the resulting html source? Do you know what URL is coming up when you click on it? Perhaps it shows up in a browser even if it is invalid.

In Him,
Mark
Author: Katharina May
Posted: Nov 23 2007 - 04:23 PM
Subject: re: re: javascript:linkTo_UnCryptMailto()
You can actually see the problem right here online:
http://www.wzw.tum.de/waldinventur/index.php?id=staff&L=0


the code I typed was the resulting html source I just copied.
I get the following message in the browser events:
<snip>
JavaScript - http://www.wzw.tum.de/waldinventur/index.php?id=staff&L=0http://www.wzw.tum.de/waldinventur/index.php?id=staff&L=0
Javascript URL thread: "javascript:linkTo_UnCryptMailto('mailto:knoke@forst.wzw.tum.de');"
Error:
name: ReferenceError
message: Statement on line 1: Reference to undefined variable: linkTo_UnCryptMailto
Backtrace:
Line 1 of unknown script
linkTo_UnCryptMailto("mailto:knoke@forst.wzw.tum.de");
</snap>

Thanks,

Katharina
user picture Author: Mark Stephenson
Posted: Nov 23 2007 - 08:39 PM
Subject: re: avascript:linkTo_UnCryptMailto()
Katharina,

Does this happen just in the Staff Directory? If so, we will need Dave (the Staff Directory developer) to jump in here. If this happens in other places on your website then please try this below:

In your template record (click Template at the left) under the Setup section, please see if you have these two values set:

config.spamProtectEmailAddresses = 1
config.spamProtectEmailAddresses_atSubst = (at)

I am guessing that you have the first value set to 0. Here are the instructions for setting spamProtectEmailAddresses taken from this page:

http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/7/3/

If set, then all email addresses in typolinks will be encrypted so spam bots cannot detect them. If you set this value to a number, then the encryption is simply an offset of character values. If you set this value to "-2" then all characters will have their ASCII value offset by "-2". To make this possible, a little JavaScript code is added to every generated web page! (It is recommended to set the value in the range from -5 to 1 since setting it to >= 2 means a “z” is converted to “|” which is a special character in TYPO3 tables syntax – and that might confuse columns in tables. Now hardcoded range)

Alternatively you can set this value to the keyword "ascii". This way every character of the "mailto:" address will be translated to a Unicode HTML notation. Have a look at the example to see how this works.

Example:
mailto:a@b.c will be converted to
mailto:a@b.c

The big advantage of this method is that it doesn't need any JavaScript!


In Him,
Mark
Author: Dave Slayback
Posted: Nov 23 2007 - 11:59 PM
Subject: re: avascript:linkTo_UnCryptMailto()
Hi Katharina,

It is likely that Mark's advice should fix this. The config.spamProtectEmailAddresses = 1 is what sets the encryption. If this is not set, then there would be no encryption.

This should be in the manual, but if it's not, we'll be sure to add it or highlight it.

-Dave
Author: Katharina May
Posted: Nov 24 2007 - 07:30 AM
Subject: re: avascript:linkTo_UnCryptMailto()
Hi Mark, Hi Dave,

thanks, Marks advice solved my problem perfectly!

-Katharina
user picture Author: Mark Stephenson
Posted: Nov 24 2007 - 07:50 AM
Subject: re: avascript:linkTo_UnCryptMailto()
Katharina,

Excellent!

In Him,
Mark
Total Posts: 7 - Pages (1): [1]
You must login to post a message to this conference.