Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: GN/Henny on February 28, 2012, 04:07:13 AM

Title: Template Parse Error!
Post by: GN/Henny on February 28, 2012, 04:07:13 AM
My forum runs now for many years, and yesterday there is a problem.
I didn't do anything at the forum, and now I don't know what to do, who can help me??

http://www.kellyfamily.nl/forum/
Template Parse Error!

There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_ELSE
Title: Re: Template Parse Error!
Post by: mashby on February 28, 2012, 06:43:18 AM
Can you download via FTP this file:
Themes/default/index.template.php
And attach it in a reply?
Title: Re: Template Parse Error!
Post by: GN/Henny on February 28, 2012, 07:33:42 AM
here it is
Title: Re: Template Parse Error!
Post by: CapadY on February 28, 2012, 07:54:32 AM
Whats your SMF version ? It is always fine to know with which file-version it should be compared.
Title: Re: Template Parse Error!
Post by: CapadY on February 28, 2012, 08:00:00 AM
This index.template is for SMF1.1.5, are you sure that's correct ?

I'm asking this because this is the SMF2 support board.
Title: Re: Template Parse Error!
Post by: GN/Henny on February 28, 2012, 08:12:38 AM
oi,
I don't know for sure, I had the latest update, because I always do that.
Can I check that?
Title: Re: Template Parse Error!
Post by: GN/Henny on February 28, 2012, 08:27:02 AM
I think that I have to transfer this topic to the other board?
Title: Re: Template Parse Error!
Post by: CapadY on February 28, 2012, 08:41:00 AM
Quote from: GN/Henny on February 28, 2012, 08:27:02 AM
I think that I have to transfer this topic to the other board?

You can't do that yourself.

Latest version of the SMF1.x branch is 1.1.16 but maybe this file isn't touched with the latest upgrade.

I think the best thing you can do is renaming this particular file to index.template_org.php or something like that, download a fresh one from the download section and replace it by the fresh one.

If you are loosed MOD functionality that can be solved later.
Title: Re: Template Parse Error!
Post by: mashby on February 28, 2012, 09:03:38 AM
Line 604 seems to have an echo statement missing. Not sure if this will make it ALL better, but it's a start.

In fact, the entire Logout section just seems odd to me. Looks like the flashchat button isn't inserted quite correctly not only in placement, but in format:
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
else {
     echo '<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php">',
     ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
     . '/chat_icon.gif" alt="FlashChat" style="margin: 2px 0;"
     border="0" />' : "FlashChat"),'</a>';

    echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'],
    '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']
    . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108]
    . '" style="margin: 2px 0;" border="0" />' : $txt[108]),'</a>';
}
echo '
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
Title: Re: Template Parse Error!
Post by: GN/Henny on February 28, 2012, 09:23:55 AM
the att. did you change that? or is it the same old one, I uploaded? I thied it, but didn't work
Title: Re: Template Parse Error!
Post by: mashby on February 28, 2012, 09:35:58 AM
I changed it somewhat. When did FlashChat get added to your site? That is likely the cause of your current situation. This version has that part removed and the original Logout code inserted. This should work, but not entirely sure. :)
Title: Re: Template Parse Error!
Post by: GN/Henny on February 28, 2012, 09:44:09 AM
that was installed for 5 or 6 years, I'll try this one
Title: Re: Template Parse Error!
Post by: GN/Henny on February 28, 2012, 09:47:56 AM
yes this works, but I have now the default theme
when I click on a link ( topic or what ever) I get the notice that it's not the correct derectory, and that I have to click it ( the notice) and it comes everytime back
Title: Re: Template Parse Error!
Post by: mashby on February 28, 2012, 08:45:23 PM
Did you have another theme running then? I see your site is on the default theme at the moment. I'm thinking you had another theme that went sour, but your error message seemed to say otherwise.
Title: Re: Template Parse Error!
Post by: GN/Henny on February 29, 2012, 04:12:38 AM
yes that was the default theme, but when I put the theme in the directory, instead of default, it looks allmost ok.

this directorys are they ok?

/customers/kellyfamily.nl/kellyfamily.nl/httpd.www/forum/Smileys

/customers/kellyfamily.nl/kellyfamily.nl/httpd.www/forum/Themes/helios1.1
Title: Re: Template Parse Error!
Post by: kat on February 29, 2012, 08:58:07 AM
Is the "httpd" correct?

I know what is it, but I've never seen it on a website, thus far.
Title: Re: Template Parse Error!
Post by: Illori on February 29, 2012, 08:59:37 AM
httpd is another name for the apache service, and that folder can be whatever the host wants to name it, just usually it is www, or http or similar.

but as we dont know your server configuration we cant really tell if the path is correct, your host would know though.
Title: Re: Template Parse Error!
Post by: kat on February 29, 2012, 09:05:46 AM
Oh, yeah. As I said, I know what it is.

Just seemed weird, seeing it there, like that.

Thought it worth checking. :P