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

siFR implementation problem

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-26-2008, 11:32 PM
 
carreraecommerce carreraecommerce is offline
 

Newbie
  
Join Date: May 2006
Posts: 4
 

Default siFR implementation problem

Hello everyone!! I am now half-way in designing my own template on x-cart and I am trying to use siFR to replace font text as flashbased text. This means I could manipulate the looks of my typography. Anyway, when I implement it I get this error:

Error: Smarty error: [in customer/home.tpl line 126]: syntax error: unrecognized tag: sSelector:"h1", sFlashSrc:"aquarius.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6" (Smarty_Compiler.class.php, line 436) in /home/www/globalbatteries/Smarty-2.6.12/Smarty.class.php on line 1095

Maybe anyone could help me on this. Ive searched on some forum but no luck. Is it a permission file error? i dont know. please anyone, help!!!

karlo
Reply With Quote
  #2  
Old 03-26-2008, 11:36 PM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: siFR implementation problem

Enclose your JS code with the {literal} .. {/literal} Smarty tags.
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
  #3  
Old 03-26-2008, 11:38 PM
 
carreraecommerce carreraecommerce is offline
 

Newbie
  
Join Date: May 2006
Posts: 4
 

Default Re: siFR implementation problem

Hello thanks for the fast reply!!! How do i do this? this is my JS located on the customer/home.tpl


<script type="text/javascript">
//<![CDATA[
/* Replacement calls. Please see documentation for more information. */

if(typeof sIFR == "function"){

// This is the preferred "named argument" syntax
sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"aquarius.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"}));

// This is the older, ordered syntax
sIFR.replaceElement("h5#pullquote", "vandenkeere.swf", "#000000", "#000000", "#FFFFFF", "#FFFFFF", 0, 0, 0, 0);
sIFR.replaceElement("h2", "tradegothic.swf", "#000000", null, null, null, 0, 0, 0, 0);
sIFR.replaceElement("h4.subhead", "tradegothic.swf", "#660000", null, null, null, 0, 0, 0, 0);
sIFR.replaceElement(".title","tradegothic.swf","#0 00000", "#000000", "#DCDCDC", "#DCDCDC", 0, 0, 0, 0, null);
sIFR.replaceElement("h3.sidebox","tradegothic.swf" ,"#000000", "#000000", "#DCDCDC", "#DCDCDC", 0, 0, 0, 0, null);
sIFR.replaceElement("h3", "tradegothic.swf", "#000000", null, null, null, 0, 0, 0, 0, null);

};

//]]>
</script>
Reply With Quote
  #4  
Old 03-26-2008, 11:49 PM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: siFR implementation problem

Use this code:

HTML Code:
{literal} <script type="text/javascript"> //<![CDATA[ /* Replacement calls. Please see documentation for more information. */ if(typeof sIFR == "function"){ // This is the preferred "named argument" syntax sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"aquarius.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"})); // This is the older, ordered syntax sIFR.replaceElement("h5#pullquote", "vandenkeere.swf", "#000000", "#000000", "#FFFFFF", "#FFFFFF", 0, 0, 0, 0); sIFR.replaceElement("h2", "tradegothic.swf", "#000000", null, null, null, 0, 0, 0, 0); sIFR.replaceElement("h4.subhead", "tradegothic.swf", "#660000", null, null, null, 0, 0, 0, 0); sIFR.replaceElement(".title","tradegothic.swf","#0 00000", "#000000", "#DCDCDC", "#DCDCDC", 0, 0, 0, 0, null); sIFR.replaceElement("h3.sidebox","tradegothic.swf" ,"#000000", "#000000", "#DCDCDC", "#DCDCDC", 0, 0, 0, 0, null); sIFR.replaceElement("h3", "tradegothic.swf", "#000000", null, null, null, 0, 0, 0, 0, null); }; //]]> </script> {/literal}
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
  #5  
Old 03-27-2008, 01:26 AM
 
carreraecommerce carreraecommerce is offline
 

Newbie
  
Join Date: May 2006
Posts: 4
 

Default Re: siFR implementation problem

Hey Ene, ive spent the whole day yesterday just to sort this out. You saved me man!!! Didn't know that you have to enclose it with smarty codes. Cheers!!!

RESOLVED!!!
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 01:55 PM.

   

 
X-Cart forums © 2001-2020