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.

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 19 2025 04:29:12
Script start
Timing: Jan 19 2025 04:29:12
Module start 'layout'
Timing: Jan 19 2025 04:29:12
Module start 'content'
Timing: Jan 19 2025 04:29:12
Module end 'content'
Timing: Jan 19 2025 04:29:12
Script end

Main resources:

Total runtime0.0166 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.0547152.6094
Module start 'layout' 0.00640.0031 741.664139.4141
Module start 'content' 0.00950.0052 781.078193.4297
Module end 'content' 0.01480.0018 874.507838.3047
Script end 0.0165  912.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002515.2086140.0002
Check MTime0.00116.5568140.0001
Mysql Total
Database connection0.00127.333310.0012
Mysqli_queries0.003219.299530.0011
Looping result0.00000.083410.0000
Template Total0.00148.610.0014
Template load0.00074.504910.0007
Template processing0.00074.095110.0007
Override
Cache load0.00053.183510.0005
General
dbfile0.00148.250780.0002
String conversion0.00000.035940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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