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

Trouble with flash files in head.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-30-2008, 12:34 AM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Trouble with flash files in head.tpl

Hi,

I'm waving the white flag, I surrender, been at this problem on and off for a couple of weeks and I still can't solve it.

I have a client who requires a flash file to run in the header of his site. It's the simplest two image fade in fade out you can do in flash. When a user clicks around the site, the whole page refreshes, the header, menus etc all refresh. If I remover the flash file from the head.tpl, the "refreshing" problem disappears also.

I've used a couple of third party programs initially to create the file and thought it may have been the way the code was generated, so I became a quick learner of Flash CS3 and created my own file. The same problem occurred so it wasn't dodgy code.

If I put the flash file in the welcome.tpl there is also no page refreshing issue. Just when it's in the head.tpl.

Has anyone struck the same issue and if so what's the damn fix ?

Thanks
__________________
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
  #2  
Old 10-30-2008, 04:01 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Trouble with flash files in head.tpl

I don't use flash, but here is x-cart's solution...
Code:
{*** Remove this part of code if you want to replace a flash movie with an image *** <td valign="top"> <object type="application/x-shockwave-flash" data="{$ImagesDir}/custom/flash_logo.swf" width="341" height="206" id="flash_logo" align="top"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="{$ImagesDir}/custom/flash_logo.swf" /> <param name="menu" value="false" /> <param name="loop" value="false" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="FlashVars" value="not_home_page={if $main eq "catalog" && $current_category.category eq ""}0{else}1{/if}&amp;final_image={#FinalImage#}&amp;company_name_path={$ImagesDir}/custom/company_name.swf&amp;home_path={$current_location}/customer/home.php" /> <param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" /> <param name="swLiveConnect" value="true" /> </object> </td> *** Remove this part of code if you want to replace a flash movie with an image ***}

It goes in head.tpl in place of where the logo is normally displayed.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 10-30-2008, 11:14 AM
  beetlejuice's Avatar 
beetlejuice beetlejuice is offline
 

eXpert
  
Join Date: Apr 2007
Posts: 251
 

Default Re: Trouble with flash files in head.tpl

Thanks JW, I'll take a look at that when I'm back in the office later today.
__________________
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
  #4  
Old 10-30-2008, 11:53 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

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

Default Re: Trouble with flash files in head.tpl

There are advantages to using swfobject for embedding flash, you might be interested in taking a look.
__________________
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
  #5  
Old 11-13-2008, 06:40 PM
 
cbostard cbostard is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: USA/ New Jersey
Posts: 47
 

Default Re: Trouble with flash files in head.tpl

I was trying to do the same thing and got it to work ok but I only need to center the flash in the space, but what I did was took the code posted above(reguards to above ) and inserted it into /customer/main/welcome.tpl you might be able to copy and paste the entire code as provided below into this folder but 1st make a backup copy
template will look like this:

Code:
{* $Id: welcome.tpl,v 1.28 2006/04/12 09:54:19 svowl Exp $ *} {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> {else} <h3> <object type="application/x-shockwave-flash" src="{$ImagesDir}/custom/flash_logo.swf" width="500" height="250" id="flash_logo" align="bottom"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="{$ImagesDir}/custom/flash_logo.swf" /> <param name="menu" value="false" /> <param name="loop" value="true" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="FlashVars" value="not_home_page={if $main eq "catalog" && $current_category.category eq ""}0{else}1{/if}&final_image={#FinalImage#}&company_name_path={$ImagesDir}/custom/company_name.swf&home_path={$current_location}/customer/home.php" /> <param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" /> <param name="swLiveConnect" value="true" /> </object> {/if} {* $Id: welcome.tpl,v 1.28.2.3 2008/07/15 12:07:40 ferz Exp $ *} <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}


next what you need to do is create a flash (.swf) file. to make it simple name it " flash_logo" and place into /xcart/skin1/images/custom

so far it works on my testing site witch is a full site with a few mods installed and there are no errors on page. once I figure out how to center it. ill post it on site. IM sure it is just adding a <cell padding > type code
__________________
Version 4.3.1
fancy catagories (enabled)
dynamic image generator 4.1(enabled)
tabbed menu buttons
Cdseo Pro (enabled)
anonymous cart mod (enabled )
skin swap "mod doesnt work well for me"
x-magnafier
xcart Gift registry
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 04:18 AM.

   

 
X-Cart forums © 2001-2020