Forums / Setup & design / Inserting email object in a class : kyriad[dot]landi[at]gofornet[dot]com

Inserting email object in a class : kyriad[dot]landi[at]gofornet[dot]com

Author Message

laurent le cadet

Wednesday 10 September 2003 7:20:04 am

I think it's nothing but when I use the email object in a classe the result is like this : kyriad[dot]landi[at]gofornet[dot]com without anylink.

Someone ever faced this problem ?

Laurent

Hans Melis

Wednesday 10 September 2003 8:41:18 am

Laurent,

It's not a problem, it's a feature :)

By default, ezp converts the @ and the . in email addresses to [at] and [dot] to prevent spambots from picking up email addresses.

I think you have 2 choices:

- Create a template.ini.append (.php) in either a site access or in the /settings/override if you want it to be site-wide. Put the following setting in it:

[WashSettings]
EmailDotText=
EmailAtText=

But I'm not sure if that will keep the @ and the . in the addresses or if it will result in a whitespace.

- What will work is overriding the default template for the email datatype. Override /design/standard/templates/content/datatype/view/ezemail.tpl (and make a copy of the default template when using the admin interface) and make your own design for the email datatype.

You could remove the "|wash(email)" in the standard template, and add the necessary tags to make it a link, but that will get you into trouble with future updates.

HTH

--
Hans

Hans
http://blog.hansmelis.be

Gunnstein Lye

Wednesday 10 September 2003 9:25:04 am

The simplest and best solution is Hans's first one, with a minor modification:

Create a template.ini.append (.php) in either a site access or in the /settings/override if you want it to be site-wide. Put the following setting in it:

[WashSettings]
EmailDotText=.
EmailAtText=@

Hans Melis

Wednesday 10 September 2003 9:33:05 am

Ah yes, that's also more logical than what I've managed to make of it :)

Thanks!

--
Hans

Hans
http://blog.hansmelis.be

laurent le cadet

Wednesday 10 September 2003 9:35:22 am

Thanks guys,

It work fine and convert "." and "@" but it don't create a mailto link.

I thought the feature email was for this like url which is ok.

Any suggestions ?

Bjørn Kaarstein

Thursday 11 September 2003 12:24:50 am

I think that would be a template issue, Laurent.
Just edit the template and put the mailto: there.

Regards Bjørn

Gunnstein Lye

Thursday 11 September 2003 3:57:34 am

Yes, in order to get the email as a link you must create an override for templates/content/datatype/view/ezemail.tpl. The default implementation will only show it as text. This is because the default also 'washes' the mail so it is not machine-readable.