Forums / Setup & design / Problem with a flash image

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.

eZ debug

Timing: Jan 18 2025 18:30:01
Script start
Timing: Jan 18 2025 18:30:01
Module start 'content'
Timing: Jan 18 2025 18:30:03
Module end 'content'
Timing: Jan 18 2025 18:30:03
Script end

Main resources:

Total runtime2.0746 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 589.1406180.8359
Module start 'content' 0.00791.9286 769.9766595.9141
Module end 'content' 1.93640.1382 1,365.8906341.6875
Script end 2.0746  1,707.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.2038210.0002
Check MTime0.00180.0867210.0001
Mysql Total
Database connection0.00120.059710.0012
Mysqli_queries1.991395.98322060.0097
Looping result0.00200.09852040.0000
Template Total2.036298.121.0181
Template load0.00210.100220.0010
Template processing2.034198.048121.0171
Template load and register function0.00020.010510.0002
states
state_id_array0.00150.070010.0015
state_identifier_array0.00150.072020.0007
Override
Cache load0.00180.0856480.0000
Sytem overhead
Fetch class attribute can translate value0.00140.067230.0005
Fetch class attribute name0.00180.086280.0002
XML
Image XML parsing0.00100.046730.0003
class_abstraction
Instantiating content class attribute0.00000.0012100.0000
General
dbfile0.00330.1599280.0001
String conversion0.00000.000430.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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