View Single Post
  #2  
Old 09-18-2008, 12:49 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Button.tpl is tearing me up!!!

Quote:
Originally Posted by hhiker
I just want a standard button throughout the site! Well, maybe 2 buttons.


file - "button/button.tpl"

PHP Code:
....

{if 
$style eq 'button' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}

...
Here is a graphical button (but1.gifbut_bg.gifbut2.gif)
If 
set a variable - {$add_style} (but{$add_style}1.gif,  class="Button{$add_style}"but{$add_style}2.gif)
...

{elseif 
$image_menu}

...
Here is a text-link button (with image "go_menu.gif",  class="GoImage")
...

{else}

...
Here is a text-link button (with image "go.gif",  class="GoImage")
 ...

{/if} 


When using a graphical button uses the following construction (for support "If Javascript is enabled in your browser click here" option):

PHP Code:
{if $js_enabled}
        {include 
file="buttons/login_menu.tpl" style="button" button_style="menu"}
{else}
         <
input type="submit" value="{$lng.lbl_log_in|escape}/>
{/if} 
Reply With Quote