Forums / Developer / Howto prevent spam?
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
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.
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...