how to colorize the code ?

Author Message

Pascal France

Sunday 25 May 2008 5:45:00 am

Hi,

How can I colorize the code examples that I add in my articles like what is done on this page:
http://ez.no/developer/articles/creating_datatypes_in_ez_publish_4/a_moment_in_time_the_ymcdatatypedatetime_class

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Kristof Coomans

Sunday 25 May 2008 8:06:30 am

Hi Pascal

Take a look at the ezgeshi extension: http://projects.ez.no/ezgeshi

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Pascal France

Friday 13 June 2008 3:09:16 am

Hi,

I followed the advice of Kristof but once the extension is installed it seems that the default «html» class doesn't work any more.

I mean if I use:

<literal class="html"><h1 style="color: red;">Pascal</h1></literal>

the displayed result is:

<h1 style="color: red;">Pascal</h1>

and not «Pascal» as a red h1 title.

The solution I have found is to remove this file:
extension/ezsh/design/standard/templates/content/datatype/view/ezxmltags/literal.tpl
so that the file:
design/standard/templates/content/datatype/view/ezxmltags/literal.tpl
is used instead of.

Maybe is there another solution ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

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 18 2025 16:01:02
Script start
Timing: Jan 18 2025 16:01:02
Module start 'layout'
Timing: Jan 18 2025 16:01:02
Module start 'content'
Timing: Jan 18 2025 16:01:03
Module end 'content'
Timing: Jan 18 2025 16:01:03
Script end

Main resources:

Total runtime0.9649 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.0061 587.9141152.6250
Module start 'layout' 0.00610.0029 740.539139.4453
Module start 'content' 0.00900.9545 779.9844535.0547
Module end 'content' 0.96350.0014 1,315.039112.4766
Script end 0.9649  1,327.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3330160.0002
Check MTime0.00130.1311160.0001
Mysql Total
Database connection0.00070.073110.0007
Mysqli_queries0.914594.7718570.0160
Looping result0.00080.0824550.0000
Template Total0.931596.520.4657
Template load0.00240.253320.0012
Template processing0.929096.280020.4645
Template load and register function0.00020.019910.0002
states
state_id_array0.00080.083410.0008
state_identifier_array0.00130.133120.0006
Override
Cache load0.00200.2094260.0001
Sytem overhead
Fetch class attribute can translate value0.00060.059020.0003
Fetch class attribute name0.00140.143040.0003
XML
Image XML parsing0.00050.053220.0003
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00080.0866160.0001
String conversion0.00000.001040.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/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
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs