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 custom Javascript in my site (https://forum.x-cart.com/showthread.php?t=51001)

vasilis 11-27-2009 02:18 PM

add custom Javascript in my site
 
I want to add a Javascript photo gallery in some of my embedded static pages, and I want to use an external Javascript file. Is it ok to add the link to the external Javascript file, as well as some additional Javascript sentences and conditional IE css fixes in the \skin1\customer\meta.tpl file ?
I did it this way and the Gallery works ok (except when I am in Webmaster mode I get a smarty error:
Quote:

Error: Smarty error: [in customer/meta.tpl line 119]: syntax error: unrecognized tag: display: none; (Smarty_Compiler.class.php, line 446) in C:\wamp\www\zoom_serie\include\lib\smarty\Smarty.c lass.php on line 1092
but still the gallery effect works ok.

The lines I added to meta.tpl file are the following:

Code:

{* fix for Lightweight Image Gallery *}
<script type="text/javascript">document.write("<style type='text/css'> #gallery { display: none; } </style>");</script>
<script type="text/javascript" language="JavaScript 1.2" src="{$SkinDir}/vas_custom_js.js"></script>
{* another fix for Lightweight Image Gallery *}
<!--[if lt IE 6]><style media="screen,projection" type="text/css">#gallery { display: block; }</style><![endif]-->
<!--[if lt IE 8]>
    <style media="screen,projection" type="text/css">
    #jgal li { filter: alpha(opacity=50); }
    #jgal li.active, #jgal li:hover { filter: alpha(opacity=100); }
    </style>
<![endif]-->


plus the main Gallery Javascript code in the external vas_custom_js.js file.

vasilis 12-23-2009 04:57 AM

Re: add custom Javascript in my site
 
8)I guess, it is ok....


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

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