X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add flash in a .tpl (https://forum.x-cart.com/showthread.php?t=46682)

et-sa 04-01-2009 06:27 AM

Add flash in a .tpl
 
hi, i'm trying to put a flash newsbox into the file news.tpl but nothing happen...i tried with a wrapper page and with this example(http://www.xcartmods.co.uk/adding-flash-x-cart-mods-pg-8.html) with no result...:(...anybody has an idea???

Petepots 04-01-2009 07:34 AM

Re: Add flash in a .tpl
 
I am having the same problem except I get "swfobect" is undefind error

All I have done is to follow the below url
http://www.xcartmods.co.uk/adding-flash-x-cart-mods-pg-8.html

I downloaded the file
placed the "flash" folder in skin1
copied the texted given in that file in my txt_welcome

and then I get that "swfobect" is undefind

Its so simple to install, what have I done wrong

Victor D 04-01-2009 07:43 AM

Re: Add flash in a .tpl
 
the very first line
Code:

<script type="text/javascript" src="{$SkinDir}/flash/swfobject.js"></script>

should be
Code:

<script type="text/javascript" src="swfobject.js"></script>

In this example is assumed that swf file is in the flash directory

Petepots 04-01-2009 08:13 AM

Re: Add flash in a .tpl
 
Thanks Victor

But it still gives the same error

I don't understand why you took the flash folder out of that string surely xcart wont know where the 3 files are located

Victor D 04-01-2009 08:20 AM

Re: Add flash in a .tpl
 
swfobject.js is located directly in skin1 folder for default x-cart skin after installation. Just look into skin1
I have missed $SkinDir... sad but true. :(
Code:

<script type="text/javascript" src="{$SkinDir}/swfobject.js"></script>

check spelling for swfobject in your previous post "j" is missing

Petepots 04-01-2009 08:55 AM

Re: Add flash in a .tpl
 
Victor sorry about the spelling

Still giving me the same error I do have the swfobject in both flash and skin1 directorys, so what the file read to start with was

<script type="text/javascript" src="{$SkinDir}/flash/swfobject.js"></script>

then you changed it to

<script type="text/javascript" src="{$SkinDir}/swfobject.js"></script>

as I said the swfobject.js is in both, so I cant understand why I get this error

crazyoval 04-01-2009 09:05 AM

Re: Add flash in a .tpl
 
THis is what I have on my top page and it works:

object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="511" height="140" id="welcome_header" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="welcome_header.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="http://www.MYDOMAIN.com/images/categoryheaders/welcome_header.swf" quality="high" bgcolor="#ffffff" width="511" height="140" name="welcome_header" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

hope this helps

Jerrad 04-01-2009 09:17 AM

Re: Add flash in a .tpl
 
And this works great for me :D

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="676" height="300" id="front_1" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="/front_1.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="/front_1.swf" quality="high" bgcolor="#ffffff" width="676" height="300" name="front_1" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_nl" />
</object>

Petepots 04-02-2009 02:31 AM

Re: Add flash in a .tpl
 
Thanks guys for your help

I got it to work by taking out {$SkinDir}/ and replaced it by skin1/

What I would like to know is why wont it work using {$SkinDir}/ on the code





<script type="text/javascript" src="{$SkinDir}/flash/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myId", "9.0.0", "{$SkinDir}/flash/expressInstall.swf");
</script>
<div style="text-align:center;">
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="200" height="200">
<param name="movie" value="{$SkinDir}/flash/xcart.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="{$SkinDir}/flash/xcart.swf" width="200" height="200">
<!--<![endif]-->
<div>
<h1>Please Install Flash</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>

crazyoval 04-02-2009 09:13 AM

Re: Add flash in a .tpl
 
Petebots, are you making this too hard? why do you need all that smarty stuff in there for your flash player? (excuse my ignorance)


All times are GMT -8. The time now is 11:17 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.