Forums / Developer / Howto prevent spam?

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...

eZ debug

Timing: Jan 19 2025 01:09:54
Script start
Timing: Jan 19 2025 01:09:54
Module start 'content'
Timing: Jan 19 2025 01:09:54
Module end 'content'
Timing: Jan 19 2025 01:09:54
Script end

Main resources:

Total runtime0.1890 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.8516180.8438
Module start 'content' 0.00490.0146 769.695397.8359
Module end 'content' 0.01950.1694 867.5313525.7344
Script end 0.1890  1,393.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00331.7242200.0002
Check MTime0.00130.6661200.0001
Mysql Total
Database connection0.00070.371910.0007
Mysqli_queries0.116061.35861410.0008
Looping result0.00160.83571390.0000
Template Total0.169089.410.1690
Template load0.00080.397810.0008
Template processing0.168288.986110.1682
Override
Cache load0.00050.277810.0005
Sytem overhead
Fetch class attribute can translate value0.00080.406310.0008
XML
Image XML parsing0.00020.129010.0002
General
dbfile0.025213.3282200.0013
String conversion0.00000.002130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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