Forum Moderators: coopster
Parse error: parse error, unexpected T_VARIABLE in /home/vigilant/public_html/phpBB2/includes/functions.php on line 234
Here are lines 230 through 240 of that file:
//if (!$forum_rows[$j]['forum_parent'] && ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
//{
// Begin Simple Subforums MOD
$id = $forum_rows[$j]['forum_id'];
// End Simple Subforums MOD
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id )? 'selected="selected"' : '';
$boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
//
Note that line 234 is the one that begins with $id =
Anyone know what I did wrong?
Please respond ASAP, as we are trying to get this working quickly!
Any help is appreciated.
Thanks in advance.
Parse error: parse error, unexpected T_VARIABLE in /home/vigilant/public_html/phpBB2/includes/functions.php on line 233
And Code for includes/functions.php
$boxstring = '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value!= -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';
$forum_rows = array();
while ( $row = $db->sql_fetchrow($result) )
{
$forum_rows[] = $row;
// Begin Simple Subforums MOD
$forums_list[] = $row;
// End Simple Subforums MOD
}
if ( $total_forums = count($forum_rows) )
{
for($i = 0; $i < $total_categories; $i++)
{
$boxstring_forums = '';
for($j = 0; $j < $total_forums; $j++)
{
if ( $forum_rows[$j]['forum_parent'] && ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
//if ( $forum_rows[$j]['forum_parent'] && ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
//{
// Begin Simple Subforums MOD
$id = $forum_rows[$j]['forum_id'];
// End Simple Subforums MOD
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id )? 'selected="selected"' : '';
$boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
//
// Add an array to $nav_links for the Mozilla navigation bar.
// 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
//
$nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),
'title' => $forum_rows[$j]['forum_name']
);
// Begin Simple Subforums MOD
for( $k = 0; $k < $total_forums; $k++ )
{
if ( $forum_rows[$k]['forum_parent'] == $id && $forum_rows[$k]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$k]['auth_view'] <= AUTH_REG )
{
//if ( $forum_rows[$k]['forum_parent'] == $id && $forum_rows[$k]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$k]['forum_id']]['auth_view'] )
//{
$selected = ( $forum_rows[$k]['forum_id'] == $match_forum_id )? 'selected="selected"' : '';
$boxstring_forums .= '<option value="' . $forum_rows[$k]['forum_id'] . '"' . $selected . '>-- ' . $forum_rows[$k]['forum_name'] . '</option>';
//
// Add an array to $nav_links for the Mozilla navigation bar.
// 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
//
$nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
'title' => $forum_rows[$k]['forum_name']
);
}
}
// End Simple Subforums MOD
}
}
if ( $boxstring_forums!= '' )
{
$boxstring .= '<option value="-1"> </option>';
$boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>';
$boxstring .= '<option value="-1">----------------</option>';
$boxstring .= $boxstring_forums;
}
}
}
$boxstring .= '</select>';
}
else
{
$boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value!= -1){ forms[\'jumpbox\'].submit() }"></select>';
}
Hope that helps you help me :D
Thanks.
Escape all with \ (\" and \') since u got many errors there.
Same errors later on, near end of code you posted
if ( $boxstring_forums!= '' )
{
....
....
}
else
{
....
}
Check those and see if any errors occur
Error:
Parse error: parse error, unexpected T_STRING in /home/vigilant/public_html/phpBB2/includes/functions.php on line 209
Line 209:
$boxstring = '<select name=" POST_FORUM_URL " onchange="if(this.options[this.selectedIndex].value!= -1){ forms['jumpbox'].submit() }"><option value="-1">' . $lang['Select_forum'] . </option>;
Help!
Thanks.