1 (edited by Socuine 2010-07-16 09:01)

Topic: [Solved] Parse Error, Unexpected '<' index.php

Dear community,

I've attempted to modify the index.php file in order to mod the last post row. I've followed a certain topic which showed me what I should change in order to get the desired effect.

I get the following error:

Parse error: syntax error, unexpected '<' in /mnt/web2/21/17/51673017/htdocs/community/index.php on line 208

Index.php (line 208) view code below(line marked with bold is line 208):

if ($cur_forum['last_post'] != '')
$forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_index['Last post'].'</span><strong><a href="'.forum_link($forum_url['post'], $cur_forum['last_post_id']).'">'.limit_characters(forum_htmlencode($cur_forum['subject'])).'</a></strong> <cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite><strong>'.format_time($cur_forum['last_post']).'</strong></li>';</strong><cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite></li>';       

else

$forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><strong>'.$lang_common['Never'].'</strong></li>';

($hook = get_hook('in_normal_row_pre_display')) ? eval($hook) : null;
   
}

2 (edited by Grez 2010-07-16 09:15)

Re: [Solved] Parse Error, Unexpected '<' index.php

Hi. I highlighted string which is causing the problem smile (just delete it and it should work fine  wink )

Socuine wrote:

$forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_index['Last post'].'</span><strong><a href="'.forum_link($forum_url['post'], $cur_forum['last_post_id']).'">'.limit_characters(forum_htmlencode($cur_forum['subject'])).'</a></strong> <cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite><strong>'.format_time($cur_forum['last_post']).'</strong></li>';</strong><cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite></li>';

Eraversum - scifi browser-based online webgame

Re: [Solved] Parse Error, Unexpected '<' index.php

Grez wrote:

Hi. I highlighted string which is causing the problem smile (just delete it and it should work fine  wink )

Socuine wrote:

$forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_index['Last post'].'</span><strong><a href="'.forum_link($forum_url['post'], $cur_forum['last_post_id']).'">'.limit_characters(forum_htmlencode($cur_forum['subject'])).'</a></strong> <cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite><strong>'.format_time($cur_forum['last_post']).'</strong></li>';</strong><cite>'.sprintf($lang_index['Last poster'], forum_htmlencode($cur_forum['last_poster'])).'</cite></li>';

You sir are amazing. Thanks for the fast resolve. I am in your debt.

Sincerely,

Socuine