neobug103 Posted July 16, 2009 Share Posted July 16, 2009 Whenever I try to include javascript or any source of code into the .tpl files I get the following error: Fatal error: Template error: [in default/footer.tpl line 36]: syntax error: unrecognized tag: (Smarty_Compiler.class.php, line 439) in /home/user/public_html/portal/includes/smarty/Smarty.class.php on line 1095 I used to have a million lines of javascript in the old templates so I'm not sure why I keep getting this, anybody know if this might be an issue on the whmcs end? 0 Quote Link to comment Share on other sites More sharing options...
gr2 Posted July 16, 2009 Share Posted July 16, 2009 put it in a .js file in you template folder and include it in your head tag in header.tpl like this: <script type="text/javascript" src="templates/{$template}/js/myJsfile.js"></script> 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted July 16, 2009 Author Share Posted July 16, 2009 I can't put it in the header. There are several javascript that needs to go in and around the design itself. Google analytics for example, another is our javascript menu and another is a text rotator script. Doing what you say above does not end in error but instead it doesn't run the file or code inside at all as if it was never there to begin with 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted July 16, 2009 Author Share Posted July 16, 2009 Found the solution. {literal} ... {/literal} 0 Quote Link to comment Share on other sites More sharing options...
gr2 Posted July 22, 2009 Share Posted July 22, 2009 now i see what you ment. i ran into the same issue down the line... thanks for posting back your solution. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.