Forums / Developer / Changing file extension to xml from html

Changing file extension to xml from html

Author Message

James Ward

Monday 06 November 2006 8:20:10 am

I'm working with an older (ez 3.0) site and trying to setup some rss feeds. My plan is to fetch use a rssexport class to fetch appropriate data and override the pagelayout of an rss siteaccess to display. My problem is that the files will always be cached and rendered as .htm and I need them to be .xml. What do I need to hack to have ez render this siteaccess as an .xml file?

working at www.wardnet.com
blogging at www.jamesward.ca

Claudia Kosny

Tuesday 07 November 2006 12:07:58 pm

Hi James

What does your pagelayout.tpl look like? As far as I know the difference between html and xml is only in the document itself so if you have a custom pagelayout creating xml should not be a problem at all. If the problem is only the cache I would frankly just disable it - an rss feed should always be up to date. If you can't do without the caching I unfortunately do not know how to help you - maybe you can check the rss module of the newer ezversions.

Greetings from Luxembourg

Claudia

James Ward

Thursday 09 November 2006 11:55:58 am

The problem was that the header information sent by the index.php will always be html in this (very old) version of ez.

I decided to write my own script in rssfeed.php where I could set the header info myself with:

header( 'Content-Type: text/xml; charset=' . $httpCharset );

and created my own RSS Feed content objects for it to parse.

This is for such an old version of eZ I am sure its not worth release as a contrib but if anyone is stuck working with an old version and wants to add some RSS feel free to email me and I will send you the code.

working at www.wardnet.com
blogging at www.jamesward.ca

eZ debug

Timing: Jan 19 2025 15:25:12
Script start
Timing: Jan 19 2025 15:25:12
Module start 'content'
Timing: Jan 19 2025 15:25:13
Module end 'content'
Timing: Jan 19 2025 15:25:13
Script end

Main resources:

Total runtime0.9269 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.0859180.8125
Module start 'content' 0.00580.8248 769.8984535.0938
Module end 'content' 0.83060.0962 1,304.9922332.7422
Script end 0.9268  1,637.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4295210.0002
Check MTime0.00150.1637210.0001
Mysql Total
Database connection0.00080.087810.0008
Mysqli_queries0.870393.89691940.0045
Looping result0.00140.15611920.0000
Template Total0.903697.520.4518
Template load0.00160.175720.0008
Template processing0.902097.311720.4510
Template load and register function0.00010.011210.0001
states
state_id_array0.00090.091910.0009
state_identifier_array0.00100.110720.0005
Override
Cache load0.00130.1455170.0001
Sytem overhead
Fetch class attribute can translate value0.00090.093330.0003
Fetch class attribute name0.00090.093440.0002
XML
Image XML parsing0.00080.089030.0003
class_abstraction
Instantiating content class attribute0.00000.004750.0000
General
dbfile0.00260.2835270.0001
String conversion0.00000.000530.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/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
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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