Forums / Setup & design / Flash in template

Flash in template

Author Message

Dan Mansfield

Saturday 17 January 2009 3:12:23 am

I have expanded my front page class to include a Billboard_Flash media attribute and I'm having a problem displaying the Flash applet within the template.
I have fixed the Content -Disposition bug so that I can see the flash file in the Admin but I cannot see it when viewing the page normally.

Is there a simpler way of displaying flash files in a template other than using my code here:

 <div class="bigflash">           
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="{$node.object.data_map.billboard_flash.content.width}" height="{$node.object.data_map.billboard_flash.content.height}">
<param name="movie" value={$node.object.data_map.billboard_flash.content.filepath|ezurl} />
<param name="quality" value="{$node.object.data_map.billboard_flash.content.quality}" />
<param name="play" value="{section show=$node.object.data_map.billboard_flash.content.is_autoplay}true{/section}" />
<param name="loop" value="{section show=$node.object.data_map.billboard_flash.content.is_loop}true{/section}" />
<embed src={$node.object.data_map.billboard_flash.content.filepath|ezurl} />
    </div>

the error I get is movie not loaded when I mouseover where the applet should appear. http://dev.nikoninstruments.com/global/eng if you want to have a look.

Steven E. Bailey

Saturday 17 January 2009 7:16:44 am

I get this for the first one - which I guess means it's not a valid object:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="" height="">
<param name="movie" value="/global/eng" />
<embed src="/global/eng" />
</div>

And, for the second object:
<param name="movie" value="/global/eng/var/ezwebin_site/storage/original/application/6a763c4776a06dc9e44069bcf27d2501.swf">
<embed src="/global/eng/var/ezwebin_site/storage/original/application/6a763c4776a06dc9e44069bcf27d2501.swf">

Your swf file is not at that location - you would have to drop the ezurl to get rid of the prepending of the siteaccess... but I did that and you still don't have the swf file there - it should be in your storage directory which is set by the filesettings vardir variable in your ini file. as in <vardir>/storage/original/application/6a763c4776a06dc9e44069bcf27d2501.swf you might want to check that it is there. If it's not... then why not? Did you add ezwebin after uploading the content?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Dan Mansfield

Saturday 17 January 2009 7:29:57 am

That is what is bizarre, I also did that and found that I couldn't reference the object directly through its url. But if I shell into the server and look in that folder it is sitting there?!
I'm checking through the permissions at the moment to see if that is where the issue lies.

The permissions look fine. I've dropped the ezurl to remove the siteaccess as you suggest.
Something very strange is going on.

Dan Mansfield

Saturday 17 January 2009 8:41:42 am

also tried copying to the root folder /global and trying the url in the browser from there and it wouldn't find the file. Is it recognising that it is a swf file and trying to process it accordingly and then failing somewhere?

This was a default install of 4.0.1 and it also has the latest ezComponents installed too.

Dan Mansfield

Saturday 17 January 2009 10:36:26 am

Thanks for your help. I rewrote my class and just had an xml block and then inserted the flash object instead.

eZ debug

Timing: Jan 19 2025 04:20:02
Script start
Timing: Jan 19 2025 04:20:02
Module start 'content'
Timing: Jan 19 2025 04:20:04
Module end 'content'
Timing: Jan 19 2025 04:20:04
Script end

Main resources:

Total runtime1.7553 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.9844180.8438
Module start 'content' 0.00741.6062 770.8281571.4766
Module end 'content' 1.61360.1416 1,342.3047337.3984
Script end 1.7552  1,679.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.2861210.0002
Check MTime0.00150.0848210.0001
Mysql Total
Database connection0.00110.063310.0011
Mysqli_queries1.685596.02742000.0084
Looping result0.00170.09851980.0000
Template Total1.722498.120.8612
Template load0.00280.156720.0014
Template processing1.719797.972420.8598
Template load and register function0.00020.012310.0002
states
state_id_array0.00140.078410.0014
state_identifier_array0.00200.115720.0010
Override
Cache load0.00240.1378290.0001
Sytem overhead
Fetch class attribute can translate value0.00140.078330.0005
Fetch class attribute name0.00100.058360.0002
XML
Image XML parsing0.00080.045230.0003
class_abstraction
Instantiating content class attribute0.00000.000660.0000
General
dbfile0.00270.1566280.0001
String conversion0.00000.000330.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs