string replace

Author Message

Marko Žmak

Wednesday 22 June 2005 5:16:54 pm

Is there an operator in eZ that would replace a part of string with another string? For example we have string:

a = "test 1, test 2, test 3"

and we want to replace all occurences of the word "test" in string a with string "exam" to get the string:

"exam 1, exam 2, exam 3"

I couldn't find anywhere an operator that would do something even similar to this.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Vjeran Vlahovic

Wednesday 22 June 2005 11:23:43 pm

Hi Marko,
check this:

http://www.ez.no/community/contribs/template_plugins/string_replace_operator

http://www.netgen.hr/eng

Marko Žmak

Thursday 23 June 2005 4:48:57 am

Thx. Does anyone know if there are any chances to include this operator in standard ez installation?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 11:56:55
Script start
Timing: Jan 19 2025 11:56:55
Module start 'layout'
Timing: Jan 19 2025 11:56:55
Module start 'content'
Timing: Jan 19 2025 11:56:55
Module end 'content'
Timing: Jan 19 2025 11:56:55
Script end

Main resources:

Total runtime0.6199 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.0313152.6094
Module start 'layout' 0.00490.0030 741.640639.4297
Module start 'content' 0.00790.6106 781.0703541.7109
Module end 'content' 0.61850.0014 1,322.781312.1953
Script end 0.6199  1,334.9766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4833160.0002
Check MTime0.00130.2173160.0001
Mysql Total
Database connection0.00050.088510.0005
Mysqli_queries0.567691.5592570.0100
Looping result0.00050.0787550.0000
Template Total0.594095.820.2970
Template load0.00731.169920.0036
Template processing0.586794.652020.2934
Template load and register function0.00010.016310.0001
states
state_id_array0.00070.115010.0007
state_identifier_array0.00080.132920.0004
Override
Cache load0.00360.5842170.0002
Sytem overhead
Fetch class attribute can translate value0.00050.084020.0003
Fetch class attribute name0.00180.291550.0004
XML
Image XML parsing0.00240.386020.0012
class_abstraction
Instantiating content class attribute0.00000.001760.0000
General
dbfile0.00230.3726250.0001
String conversion0.00000.001640.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs