Howto prevent spam?

Author Message

K259

Wednesday 16 June 2004 1:56:26 pm

What is the most easy way in eZ publish to recode the @-viewing in the templates, so the e-mail addresses are showed with an _at_ instead of @ and so the @ in the mailto-address is also converted in the viewing to _at_ ?

Tore Skobba

Wednesday 16 June 2004 2:18:53 pm

Hi

I think you should use the wash operator like this:

{$node.data_map.email|wash(email)}

See here for more: http://www.ez.no/ez_publish/documentation/development/standards/template

Cheers
Tore

K259

Wednesday 16 June 2004 11:25:59 pm

I have to clarify, this is not an email-attribute, but I need to recode the @ into _at_ inn all the ordinary xml-textfields..and they are already going trough the wash operator.

Tore Skobba

Thursday 17 June 2004 4:19:03 am

Hmm then I do not know.. Maybee overide the template for the xml textfields?

Paul Forsyth

Thursday 17 June 2004 4:24:36 am

Normally i would suggest the array operators:

http://ez.no/ez_publish/documentation/development/libraries/ez_template/operators/array_handling

but they dont seem to have the right operators for this. 'contains' would be good if it actually returned the position of the string being contained but it doesn't.

The closest is probably 'explode' using the @ delimiter. Then you implode again with your _ character.

paul

--
http://www.visionwt.com

Fabricio Guerrero

Wednesday 22 February 2006 7:45:40 am

just in case anybody would like an example:

<a href="{$href|explode('@')|implode('_AT_')}">

do this in the datatype/view/link.tpl

this is much better that using:

<a href="{$href|wash(email)">

Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

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 19 2025 04:24:16
Script start
Timing: Jan 19 2025 04:24:16
Module start 'layout'
Timing: Jan 19 2025 04:24:16
Module start 'content'
Timing: Jan 19 2025 04:24:17
Module end 'content'
Timing: Jan 19 2025 04:24:17
Script end

Main resources:

Total runtime1.1345 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.0391152.6094
Module start 'layout' 0.00550.0031 741.648439.4297
Module start 'content' 0.00851.1246 781.0781629.2500
Module end 'content' 1.13310.0013 1,410.328112.1875
Script end 1.1345  1,422.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2836160.0002
Check MTime0.00130.1147160.0001
Mysql Total
Database connection0.00080.069610.0008
Mysqli_queries1.075794.8200700.0154
Looping result0.00070.0613680.0000
Template Total1.100997.020.5504
Template load0.00190.166320.0009
Template processing1.099096.868720.5495
Template load and register function0.00020.015110.0002
states
state_id_array0.00090.078910.0009
state_identifier_array0.00140.121920.0007
Override
Cache load0.00160.1398310.0001
Sytem overhead
Fetch class attribute can translate value0.00100.089940.0003
Fetch class attribute name0.00110.096670.0002
XML
Image XML parsing0.00120.103140.0003
class_abstraction
Instantiating content class attribute0.00000.001270.0000
General
dbfile0.00360.3217160.0002
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs