TinyPortal

Development => Support => Topic started by: Xtreme4U2NV on April 16, 2007, 10:14:04 PM

Title: Template Parse Error on line 120 (I searched)
Post by: Xtreme4U2NV on April 16, 2007, 10:14:04 PM
Hello all, here is the error I am getting;

Parse error: syntax error, unexpected '<' in .../Themes/default/index.template.php on line 120

111: // If we're in a board, or a topic for that matter, the index will be the board's index.
112: if (!empty($context['current_board']))
113: echo '
114: <link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
115:
116: // We'll have to use the cookie to remember the header...
117: if ($context['user']['is_guest'])
118: $options['collapse_header'] = !empty($_COOKIE['upshrink']);
119:

120:         <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

121:                 var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';
122:
123:                 function shrinkHeaderLeftbar(mode)
124:                 {';


Any suggestions on how to fix it?  Please and thank you.

Attached is a pic of it
Title: Re: Template Parse Error on line 120 (I searched)
Post by: G6Cad on April 16, 2007, 10:18:16 PM
Remove this part on line 120

<!-- // --><![CDATA[
Title: Re: Template Parse Error on line 120 (I searched)
Post by: JPDeni on April 16, 2007, 10:24:24 PM
You need to enclose the output to the screen in an echo statement. I can show you were the first part is, but you'll have to figure out the end of it yourself.


echo '        <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[


The end would probably be something like


</script>';
Title: Re: Template Parse Error on line 120 (I searched)
Post by: Xtreme4U2NV on April 16, 2007, 10:28:02 PM
Quote from: G6â„¢ on April 16, 2007, 10:18:16 PM
Remove this part on line 120

<!-- // --><![CDATA[

Quote from: JPDeni on April 16, 2007, 10:24:24 PM
You need to enclose the output to the screen in an echo statement. I can show you were the first part is, but you'll have to figure out the end of it yourself.


echo '        <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[


The end would probably be something like


</script>';


So which one should I attempt first?
Title: Re: Template Parse Error on line 120 (I searched)
Post by: G6Cad on April 16, 2007, 10:32:03 PM
Definatly JP Denis suggestion as she knows a lot more coding then me  :laugh:
Title: Re: Template Parse Error on line 120 (I searched)
Post by: Crip on April 16, 2007, 10:33:45 PM
line 118: ['upshrink']);

add the claw '; on the end & underneath an echo  ['upshrink']);

118                        ['upshrink']);';
echo '
Title: Re: Template Parse Error on line 120 (I searched)
Post by: Xtreme4U2NV on April 16, 2007, 10:34:49 PM
Quote from: crip~ on April 16, 2007, 10:33:45 PM
line 118: ['upshrink']);

add the claw '; on the end & underneath an echo  ['upshrink']);

118                        ['upshrink']);';
echo '


Will give that a shot now, thank you
Title: Re: Template Parse Error on line 120 (I searched)
Post by: Xtreme4U2NV on April 16, 2007, 10:54:39 PM
Thank you Crip, worked wonders, no more errors, thank you
Title: Re: Template Parse Error on line 120 (I searched)
Post by: Crip on April 16, 2007, 10:56:07 PM
Glad to help.