Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

adding flash to the welcome.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-28-2009, 08:12 AM
 
tbm tbm is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 39
 

Default adding flash to the welcome.tpl

hi,

trying to figure out the best way to add a small flash movie to my front page. currently i'm using a static image embedded in the welcome.tpl file. here's the code:

Code:
{* $Id: welcome.tpl,v 1.28.2.1 2006/07/12 04:51:17 svowl Exp $ *} {*DELETED HEADLINE AREA*} {* {if ($active_modules.Greet_Visitor ne "") and ($smarty.cookies.GreetingCookie ne "") and $logout_user eq ''} {assign var="_name" value=$smarty.cookies.GreetingCookie|replace:"\'":"'"} <h3>{$lng.lbl_welcome_back|substitute:"name":$_name} </h3> {elseif $lng.lbl_site_title} <h3>{$lng.lbl_welcome_to|substitute:"company":$lng.lbl_site_title}</h3> {else} <h3>{$lng.lbl_welcome_to|substitute:"company":$config.Company.company_name}</h3> {/if} *} <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="{$ImagesDir}/front_page1.jpg"></td> <td class="frontpageRight">{$lng.txt_welcome}</td> </tr> </table> <br /> {if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} <br /> {include file="customer/main/featured.tpl" f_products=$f_products}

simply replacing the "{$ImagesDir}/front_page1.jpg" with "{$ImagesDir}/front_page1.swf" aint working, so what do i need to do?

i did check out this thread but i couldn't really make sense of it. any help would be greatly appreciated.
__________________
Linux
X-Cart 4.1.11
Reply With Quote
  #2  
Old 01-29-2009, 01:26 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: adding flash to the welcome.tpl

Quote:
Originally Posted by tbm
hi,

trying to figure out the best way to add a small flash movie to my front page. currently i'm using a static image embedded in the welcome.tpl file. here's the code:

Code:
{* $Id: welcome.tpl,v 1.28.2.1 2006/07/12 04:51:17 svowl Exp $ *} {*DELETED HEADLINE AREA*} {* {if ($active_modules.Greet_Visitor ne "") and ($smarty.cookies.GreetingCookie ne "") and $logout_user eq ''} {assign var="_name" value=$smarty.cookies.GreetingCookie|replace:"\'":"'"} <h3>{$lng.lbl_welcome_back|substitute:"name":$_name} </h3> {elseif $lng.lbl_site_title} <h3>{$lng.lbl_welcome_to|substitute:"company":$lng.lbl_site_title}</h3> {else} <h3>{$lng.lbl_welcome_to|substitute:"company":$config.Company.company_name}</h3> {/if} *} <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="{$ImagesDir}/front_page1.jpg"></td> <td class="frontpageRight">{$lng.txt_welcome}</td> </tr> </table> <br /> {if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} <br /> {include file="customer/main/featured.tpl" f_products=$f_products}

simply replacing the "{$ImagesDir}/front_page1.jpg" with "{$ImagesDir}/front_page1.swf" aint working, so what do i need to do?

i did check out this thread but i couldn't really make sense of it. any help would be greatly appreciated.

You can not insert a flash as a picture.
You need to use a special code to insert a flash.

PHP Code:
<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=264 HEIGHT=195
<
PARAM NAME=movie VALUE="{$ImagesDir}/front_page1.swf"
<
PARAM NAME=menu VALUE=false
<
PARAM NAME=quality VALUE=high
<
PARAM NAME=wmode VALUE=transparent
<
PARAM NAME=scale VALUE=noscale>
<
EMBED src={$ImagesDir}/front_page1.swf menu=false quality=high wmode=transparent scale=noscale WIDTH=264 HEIGHT=195 TYPE="application/x-shockwave-flash" 
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</
EMBED>
</
OBJECT
Reply With Quote

The following user thanks Yurij for this useful post:
eaglemobiles (12-12-2009)
  #3  
Old 01-29-2009, 02:38 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: adding flash to the welcome.tpl

Easy method here using SWFObject...
http://www.xcartmods.co.uk/adding-flash-x-cart-mods-pg-8.html
__________________
xcartmods.co.uk
Reply With Quote
  #4  
Old 01-29-2009, 02:55 AM
 
tbm tbm is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 39
 

Default Re: adding flash to the welcome.tpl

thanks all, got this working!
__________________
Linux
X-Cart 4.1.11
Reply With Quote
  #5  
Old 02-21-2009, 03:01 PM
  nortonz's Avatar 
nortonz nortonz is offline
 

Senior Member
  
Join Date: Nov 2007
Location: N. Idaho, USA
Posts: 156
 

Default Re: adding flash to the welcome.tpl

This is an old thread, but here it goes anyway.

I added this line to my "txt_welcome.tpl" file, and got the Flash to play fine., but there is a White box around the animation, and I can't figure out where it is coming from. Hope someone can help.

This is the text I added.

Code:
<script type="text/javascript" src="{$SkinDir}/flash/swfobject.js"></script> <script type="text/javascript"> swfobject.registerObject("myId", "9.0.0", "{$SkinDir}/flashexpressInstall.swf/"); </script> <div style="text-align:center;"> <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="700" height="120"> <param name="movie" value="{$SkinDir}/flash/Tv Tech Center_2.swf" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="{$SkinDir}/flash/Tv Tech Center_2.swf" width="700" height="120"> <!--<![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>

The flash plays just fine, but I need to figure out where the White background is coming from to get rid of it. maybe "skin1.css"

Heres the link. http://www.tvtechcenter.com/xcart/home.php

Any help would be great. Thanks

Michael
__________________
X-Cart 4.5.4
Linux CentOS 5.8 Apache 2.2.3 PHP 5.2.17
MySQL 5.0.95
CDSEOPro 1.8.8 xCMS 1.31 Easyupsale 2.3
Reply With Quote
  #6  
Old 02-22-2009, 03:54 AM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: adding flash to the welcome.tpl

Can't see any Flash files, did you remove it?
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote
  #7  
Old 02-22-2009, 07:42 AM
  nortonz's Avatar 
nortonz nortonz is offline
 

Senior Member
  
Join Date: Nov 2007
Location: N. Idaho, USA
Posts: 156
 

Default Re: adding flash to the welcome.tpl

No its still there, I did add a line to the first part. The Flash file has a Transparent Background, and that was the cause of the problem. This is what the code looks like now.

Code:
<script type="text/javascript" src="{$SkinDir}/flash/swfobject.js"></script> <script type="text/javascript"> swfobject.registerObject("myId", "9.0.0"), "{$SkinDir}/flashexpressInstall.swf/"; </script> <div style="text-align:center;"> <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="700" height="120"> <param name="movie" value="{$SkinDir}/flash/Tv Tech Center_2.swf" wmode="transparent" quality="high" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="{$SkinDir}/flash/Tv Tech Center_2.swf" wmode="transparent" quality="high" width="700" height="120"/> <!--<![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>

The 2 lines in RED are what I changes. The white background is now gone in FF3, but still there in IE7/8. I guess IE has a problem this the "wmode=transparent" Anyway I'm still looking for a fix for it..

If you didn't see the Flash playing on the top of the screen What Browser are you using?

Michael
__________________
X-Cart 4.5.4
Linux CentOS 5.8 Apache 2.2.3 PHP 5.2.17
MySQL 5.0.95
CDSEOPro 1.8.8 xCMS 1.31 Easyupsale 2.3
Reply With Quote
  #8  
Old 02-22-2009, 10:36 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: adding flash to the welcome.tpl

If you can't get it to work, you might consider using SWFObject method for embedding flash. I have used their method for transparancy, and it worked for me.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #9  
Old 02-22-2009, 01:13 PM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: adding flash to the welcome.tpl

Or you could save yourself the grief and redo the .fla file with your background colour.
__________________
XCart 4.5.4, 4.6.1, 4.64 stores
Many, many mods from Altered Cart
XCart Mods Reboot template
The XCart Store Templates and Mods
WCM CDSEO Pro
BCSE Rewards Points and Gallery Mods
and a few others
Reply With Quote

The following user thanks beetlejuice for this useful post:
nortonz (02-22-2009)
  #10  
Old 02-22-2009, 07:46 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: adding flash to the welcome.tpl

It's possible to randomise the flash banners ? so on every page refresh it would show new banners ?
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:47 AM.

   

 
X-Cart forums © 2001-2020