News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Having problems with a parser error.

Started by Saohc, June 03, 2010, 12:37:35 AM

Previous topic - Next topic

Saohc

It seems everytime I try to install a really good mod on my PHPBB3 forum(Hocotate Freight), I get these errors.
"Parse error: syntax error, unexpected T_VARIABLE in /home/luigi/public_html/includes/functions_display.php on line 100
"

I'm trying to fix an error on my phpbb3 forum and i'm having problems..

Here's the code that is apperantly causing the error..


$branch_root_id = $root_data['forum_id'];


Nothing seems to be wrong, maybe the site doesn't want the modification I'm trying to install?

I did everything the mods' install.xml file told me to.

Can someone help me?
I've tried adding one of these..
;
)
]

and it still is showing the same error!
I attached the file at the bottom for you to look at.
Can someone assist me with this problem? :( I want to get back on my site and have the modification, I installed it correctly..

VirtuallTek

It seems that the syntax error is in the previous line, because the error shows that the variable in the line 100 is an unexpected token, ie should not have a variable declaration after the last token of the previous line.
If you post more snippets of the file is easier to help.

[]s

Saohc

Well here it is:

// Display list of active topics for this category?
$show_active = (isset($root_data['forum_flags']) && ($root_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;

$sql_array = array(
'SELECT' => 'f.*',
'FROM' => array(
FORUMS_TABLE => 'f'
),
'LEFT_JOIN' => array(),
);

if ($config['load_db_lastread'] && $user->data['is_registered'])
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id');
$sql_array['SELECT'] .= ', ft.mark_time';
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
$tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();

if (!$user->data['is_registered'])
{
$user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
}
}

if ($show_active)
{
$sql_array['LEFT_JOIN'][] = array(
'FROM' => array(FORUMS_ACCESS_TABLE => 'fa'),
'ON' => "fa.forum_id = f.forum_id AND fa.session_id = '" . $db->sql_escape($user->session_id) . "'"
);

$sql_array['SELECT'] .= ', fa.user_id';
}
$sql_array['LEFT_JOIN'][] = array(//for NV ALTT
'FROM' => array(TOPICS_TABLE => 't'),
'ON' => "f.forum_last_post_id = t.topic_last_post_id AND t.topic_moved_id = 0"
);
$sql_array['SELECT'] .= ', t.topic_title, t.topic_id, t.topic_last_post_id';

$sql_array['LEFT_JOIN'][] = array(
$result = $db->sql_query($sql))
;
$forum_tracking_info = array()
$branch_root_id = $root_data['forum_id'];

VirtuallTek

At the end of the line before the error is missing a ";" to separate the statements. Enjoy!

[]s