Problem with a flash image

Author Message

christian bencivenni

Tuesday 13 November 2007 12:35:02 am

Hi to you all.
I have a problem overriding the pagelayou.tpl template in a fesh installation of ez 3.10.
I override correctly the home page pagelayout.tpl file but in the HTML code I have to put some code like this:

<div id="container">
...
<div id="lunario">Questo testo e' sostituito dal filmato Flash.</div>
<script type="text/javascript">
		// <![CDATA[
		var so = new SWFObject("lunario.swf", "mymovie", "760", "38", "7", "#000000");
		so.useExpressInstall('expressinstall.swf');
		so.write("lunario");
		// ]]>
	</script>
...
</div>

The problem is: nothing happens. I put the swf files both in images and javascript directory:
/design/name_site/images
/design/name_site/javascript
but nothing.
In a static HTML page instead all works correctly.
I tried to put the direct URL of www.domain.com//design/name_site/images/lunario.swf in a browser and the flash animation opened correctly too.
Where is my error?
Thank you a lot.

André R.

Tuesday 13 November 2007 2:02:21 am

With that code, your browser will look for the swf file in the 'folder you are currently in'.
As in, when you go to domain.com/folder/folder2/content1, your browser will look for the swf files in domain.com/folder/folder2/lunario.swf.

So basically you need to look into the ezimage and ezdesign template operators, I leave it to you to find them in the doc..

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

christian bencivenni

Tuesday 13 November 2007 2:19:38 am

thank you.
but... mmm... I don't think so.
I also try changing the url into:

var so = new SWFObject("/images/lunario.swf", "mymovie", "760", "38", "7", "#000000");

or

var so = new SWFObject("/name_site/images/lunario.swf", "mymovie", "760", "38", "7", "#000000");

or even
var so = new SWFObject("http://www.domain.com/design/name_site/images/lunario.swf", "/name_site/images/mymovie", "760", "38", "7", "#000000");

but without success.
I cannot use ez teplate path like {'lunario.swf'|ezimage} into a CDATA section isn't it?

André R.

Tuesday 13 November 2007 2:31:51 am

ez template code should not care about CDATA sections.

try something like:

<script type="text/javascript">
                // <![CDATA[
                var so = new SWFObject({"lunario.swf"|ezimage}, "mymovie", "760", "38", "7", "#000000");
                so.useExpressInstall({"expressinstall.swf"|ezimage});
                so.write("lunario");
                // ]]>
        </script>

And be sure that your apache rewrite rules allows swf files from the images directory

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

christian bencivenni

Wednesday 14 November 2007 12:24:52 am

Sigh...
No way.
I also use IIS server so I don'texactly know how to search a rewrite file.

André R.

Wednesday 14 November 2007 4:47:19 am

Look in the generated source code ('view source') and try to paste the generated url for the swf's directly in you browser to see if it's a url / rewrite rule problem or something else..

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

christian bencivenni

Saturday 17 November 2007 8:24:50 am

All work now!
With many tries i find the correct path to find the image.
thank you.

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 31 2025 06:00:07
Script start
Timing: Jan 31 2025 06:00:07
Module start 'layout'
Timing: Jan 31 2025 06:00:07
Module start 'content'
Timing: Jan 31 2025 06:00:09
Module end 'content'
Timing: Jan 31 2025 06:00:09
Script end

Main resources:

Total runtime1.3634 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.1328151.2109
Module start 'layout' 0.00580.0036 739.343836.6484
Module start 'content' 0.00941.3531 775.9922986.5938
Module end 'content' 1.36250.0009 1,762.585920.4766
Script end 1.3633  1,783.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2347160.0002
Check MTime0.00140.1028160.0001
Mysql Total
Database connection0.00060.045410.0006
Mysqli_queries1.292294.7790690.0187
Looping result0.00070.0479670.0000
Template Total1.310796.120.6553
Template load0.00240.173320.0012
Template processing1.308395.958920.6541
Template load and register function0.00120.089010.0012
states
state_id_array0.00310.226110.0031
state_identifier_array0.00210.151120.0010
Override
Cache load0.00220.1582480.0000
Sytem overhead
Fetch class attribute can translate value0.00060.042120.0003
Fetch class attribute name0.00180.134280.0002
XML
Image XML parsing0.00280.206020.0014
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00440.3251170.0003
String conversion0.00000.000640.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs