Modified version of the excelent str_replace extension

Author Message

Felix Laate

Wednesday 11 January 2006 5:31:15 am

Hi there, mother earth!

I've made a modified version of the excelent str_replace extension(http://ez.no/community/contribs/template_plugins/string_replace_operator).

The modifications I made are:

1) If called without the first two parameters, it now uses predefines arrays from a ini-file. One array of "search"-items, and one for their replacements. If called with the first two parameters, it works just like the original

2) whitespace-, tab- and newline-cleaning

Don't if this is of interest for anyone, but I want to put into the contribs. I just don't know where, as it's mainly somebody elses work.

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

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 20 2025 20:15:05
Script start
Timing: Jan 20 2025 20:15:05
Module start 'layout'
Timing: Jan 20 2025 20:15:05
Module start 'content'
Timing: Jan 20 2025 20:15:06
Module end 'content'
Timing: Jan 20 2025 20:15:06
Script end

Main resources:

Total runtime1.1515 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1563151.2422
Module start 'layout' 0.00520.0032 739.398436.6953
Module start 'content' 0.00841.1421 776.0938488.5547
Module end 'content' 1.15050.0009 1,264.64847.8125
Script end 1.1514  1,272.4609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2663160.0002
Check MTime0.00120.1060160.0001
Mysql Total
Database connection0.00060.055110.0006
Mysqli_queries1.115996.9135460.0243
Looping result0.00060.0555440.0000
Template Total1.114096.720.5570
Template load0.00210.186220.0011
Template processing1.111896.557520.5559
Template load and register function0.00010.008210.0001
states
state_id_array0.00170.143610.0017
state_identifier_array0.00160.140220.0008
Override
Cache load0.00170.1482110.0002
Sytem overhead
Fetch class attribute can translate value0.00080.066710.0008
Fetch class attribute name0.00080.072120.0004
XML
Image XML parsing0.00050.044010.0005
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00080.0711160.0001
String conversion0.00000.000940.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 5
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs