Smarty error in tpl_head?? (SOLVED)

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
jan_hut
Forum Members
Forum Members
Posts: 60
Joined: Sat Jul 01, 2006 1:48 pm

Smarty error in tpl_head?? (SOLVED)

Post by jan_hut »

I'm getting this error:

Code: Select all

string(130) "Smarty error: [in tpl_head:21 line 20]: syntax error: unrecognized tag: margin-bottom: -3px; (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in tpl_head:21 line 20]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(129) "Smarty error: [in tpl_head:21 line 21]: syntax error: unrecognized tag: margin-bottom:-4px; (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in tpl_head:21 line 21]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" 
I was assuming there would be a tpl_head file containing an illegal { or }. But no. The error only occurs on "album" pages and I'm using the standard lightbox template in Album.
Last edited by jan_hut on Sat Aug 02, 2008 7:20 pm, edited 1 time in total.
jan_hut
Forum Members
Forum Members
Posts: 60
Joined: Sat Jul 01, 2006 1:48 pm

Re: Smarty error in tpl_head??

Post by jan_hut »

Can anyone at least tell me where to find "tpl_head" ??? It should be easy to circumvent using {literal} around the margin tags but for the life of me I just can't find this tpl_head thing.....
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Smarty error in tpl_head??

Post by Dr.CSS »

What ver. of what?...

I would think it has to do with some files missing, you can go to the forge and download Album the n FTP it to your site to see if that helps...
jan_hut
Forum Members
Forum Members
Posts: 60
Joined: Sat Jul 01, 2006 1:48 pm

Re: Smarty error in tpl_head??

Post by jan_hut »

I was thinking the same so I've replaced all album files from the tar (instead of importing the xml) but the error remains.
I'm reinstalling to see if the error is reproduced
jan_hut
Forum Members
Forum Members
Posts: 60
Joined: Sat Jul 01, 2006 1:48 pm

Re: Smarty error in tpl_head??

Post by jan_hut »

It seems that I have found the problem, or at least a part of it.
I'm getting the following error:
string(130) "Smarty error: [in template:20 line 24]: syntax error: unrecognized tag: margin-bottom: -3px; (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in template:20 line 24]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(129) "Smarty error: [in template:20 line 25]: syntax error: unrecognized tag: margin-bottom:-4px; (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in template:20 line 25]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
I've added a global contentblock named JavaScript for IE page width containing the following code:
{literal}
=b){nw=b+"px";}if(w
{/literal}
I'm calling this in the standard template with the following code:
{global_content name='JavaScript for IE page width'}






#primary-nav li {margin-bottom: -3px;}
#primary-nav li:hover {margin-bottom:-4px;} /* a HACK!!! for IE7 */
This removes the error from all pages except the Album pages. Seems to me that all I have to do is incorporate above code in the Album template that I'm using, since for some reason it seems to be bypassing it in the normal template when an Album page is generated. The question is.....how?????
Last edited by jan_hut on Sat Aug 02, 2008 8:28 am, edited 1 time in total.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Smarty error in tpl_head??

Post by kermit »

in templates and page content... scripts and css containing {curly braces} must be placed inside a {literal} ... {/literal} block to keep smarty (the template engine) from trying to interpret them... so:



#primary-nav li {margin-bottom: -3px;}
#primary-nav li:hover {margin-bottom:-4px;} /* a HACK!!! for IE7 */



becomes

{literal}


#primary-nav li {margin-bottom: -3px;}
#primary-nav li:hover {margin-bottom:-4px;} /* a HACK!!! for IE7 */

{/literal}
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
jan_hut
Forum Members
Forum Members
Posts: 60
Joined: Sat Jul 01, 2006 1:48 pm

Re: Smarty error in tpl_head??

Post by jan_hut »

Ah thanks kermit........I knew about using {literal} but didn't think I was gonna need it if the code is within

Problem solved!
Locked

Return to “[locked] Installation, Setup and Upgrade”