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

button.tpl code...what is this stuff?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-13-2004, 02:14 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default button.tpl code...what is this stuff?

In the file button.tpl, Xcart version 3.5.2 can be found the following code:
Code:
{* MAKE SURE YOU HAVE NO REDUNDANT CARRIAGE RETURNS IN THIS FILE ! *}{if $type eq "input"}{assign var="img_type" value="INPUT type=image"}{else}{assign var="img_type" value="img"}{/if}{capture name=goimage}{include file="buttons/go_image.tpl"}{/capture}{if $style eq "button" and $webmaster_mode ne "editor"}<SCRIPT> if (navigator.appName.indexOf('Microsoft')>=0) document.write('<nobr><{$img_type} src="{$ImagesDir}/but1.gif" border="0" align="absmiddle"><FONT class="Button">{$button_title}</FONT>[img]{$ImagesDir}/but2.gif[/img]</nobr>'); else document.write('<font class="FormButton">{$button_title} <{$img_type} {$smarty.capture.goimage|replace:"\r":""|replace:"\n":""}></font>' ); </SCRIPT>{else}<font class="FormButton">{$button_title} <{$img_type} {include file="buttons/go_image.tpl"}></font>{/if}

My question is, what does all of this do? I thought it created special buttons for Microsoft based browsers, but I have noticed no difference from Mozilla vs IE.

I have found a number of templates reference this file for their buttons. I have been steadily replacing the words + 'go' button across our site with a single graphical button. Is anything going to go haywire if I simply reference another template containing the image information for the button instead of using the above code from button.tpl?

Thanks!
Reply With Quote
  #2  
Old 01-13-2004, 10:50 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Nothing will go wrong if you orrectly reference other button templates rather than this file. This simply creates a dynamic button rather than the old text link with go button in pre 3.5 versions of xcart.
__________________
ex x-cart guru
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 05:13 PM.

   

 
X-Cart forums © 2001-2020