Forums / Setup & design / 3.1.0.2 -> Problem to override the embed.tpl to display a Flash file. Strange result.

3.1.0.2 -> Problem to override the embed.tpl to display a Flash file. Strange result.

Author Message

laurent le cadet

Tuesday 24 June 2003 3:13:25 am

Hi,

I create a class

In override.ini.append

[embed_media]
Source=content/view/embed.tpl
MatchFile=embed_media.tpl
Subdir=templates
Match[class]=14

The embed_media.tpl is a copy of the ezmedia.tpl
The class "14" belong to class group media and it show flash files.
It is in override/templates/embed_media.tpl

I have this in my page :

<div class="block">
<!-- including template design/standard/templates/content/datatype/view/ezxmltext.tpl -->
<p class="small">design/standard/templates/content/datatype/view/ezxmltext.tpl</p><br/>
<!-- including template design/standard/templates/content/datatype/view/ezxmltags/object.tpl -->
<p class="small">design/standard/templates/content/datatype/view/ezxmltags/object.tpl</p><br/><!-- including template design/demo/override/templates/embed_media.tpl -->
<p class="small">design/demo/override/templates/embed_media.tpl</p><br/>
</div>

!:(

The template has been find but I don't see what I want to. (nothing...)

Someone for help ?

Paul Forsyth

Tuesday 24 June 2003 12:02:46 pm

I assume your class 14 is new. If so you may need to give your anonymous user access to it through user/roles functionality.

laurent le cadet

Tuesday 24 June 2003 11:47:44 pm

Thanks.
It works better now. But I still have a problem in printing the content.
I just see a lik and when I click on it it just display the name and the description but not the flash file itself.

Here's the template embed_media.tpl :

{switch name=mediaType match=$attribute.contentclass_attribute.data_text1}
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="{$attribute.content.width}" height="{$attribute.content.height}">
<param name="movie" value={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl} />
<param name="quality" value="{$attribute.content.quality}" />
<param name="play" value="{section show=$attribute.content.is_autoplay}true{/section}" />
<param name="loop" value="{section show=$attribute.content.is_loop}true{/section}" />
<embed src={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl}
quality="{$attribute.content.quality}" pluginspage="{$attribute.content.pluginspage}"
width="{$attribute.content.width}" height="{$attribute.content.height}" play="{section show=$attribute.content.is_autoplay}true{/section}"
loop="{section show=$attribute.content.is_loop}true{/section}" >
</embed>
</object>
{/switch}

It's on the page, but the file is display with another one :
design/standard/templates/node/view/line.tpl

{default node_name=$node.name}<img src={"class_2.png"|ezimage} border="0" alt="{'Document'|i18n('design/standard/node/view')}" /> <a href={concat('content/view/full/',$node.node_id)|ezurl}>{$node_name|wash}</a>{/default}

I don't understand how it works together.

eZ debug

Timing: Jan 30 2025 21:37:01
Script start
Timing: Jan 30 2025 21:37:01
Module start 'content'
Timing: Jan 30 2025 21:37:01
Module end 'content'
Timing: Jan 30 2025 21:37:02
Script end

Main resources:

Total runtime0.2356 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 589.4766370.2422
Module start 'content' 0.00830.0139 959.71881,005.6719
Module end 'content' 0.02210.2134 1,965.39063,896.1641
Script end 0.2355  5,861.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00482.0241200.0002
Check MTime0.00140.5876200.0001
Mysql Total
Database connection0.00070.308910.0007
Mysqli_queries0.135357.43071410.0010
Looping result0.00150.64141390.0000
Template Total0.212990.410.2129
Template load0.00090.373510.0009
Template processing0.212190.005810.2121
Override
Cache load0.00060.247410.0006
Sytem overhead
Fetch class attribute can translate value0.00180.758510.0018
XML
Image XML parsing0.00020.098110.0002
General
dbfile0.00461.9468200.0002
String conversion0.00000.003430.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