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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 05:29:12
Script start
Timing: Jan 31 2025 05:29:12
Module start 'layout'
Timing: Jan 31 2025 05:29:12
Module start 'content'
Timing: Jan 31 2025 05:29:12
Module end 'content'
Timing: Jan 31 2025 05:29:12
Script end

Main resources:

Total runtime0.0154 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.6094151.2734
Module start 'layout' 0.00460.0030 739.882836.7266
Module start 'content' 0.00760.0063 776.609498.2500
Module end 'content' 0.01390.0014 874.859437.9922
Script end 0.0153  912.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002214.4017140.0002
Check MTime0.00106.6632140.0001
Mysql Total
Database connection0.00074.771110.0007
Mysqli_queries0.003019.569530.0010
Looping result0.00000.065110.0000
Template Total0.00117.310.0011
Template load0.00085.023710.0008
Template processing0.00032.268610.0003
Override
Cache load0.00053.172010.0005
General
dbfile0.002315.202880.0003
String conversion0.00000.052740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs