MyBB Community Forums

Full Version: Parse error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Parse error: syntax error, unexpected T_VAR in /home/bpatton/public_html/forum/index.php on line 400

I'm getting this message - and only this message - when I try to go to my site. I think I may have accidentally deleted a line of code when I tried to put the Google Analytics link into my page. Help!

This is what 381-402 look like right now:

$excols = "index";
$permissioncache['-1'] = "1";
$bgcolor = "trow1";

// Decide if we're showing first-level subforums on the index page.
if($mybb->settings['subforumsindex'] != 0)
{
$showdepth = 3;
}
else
{
$showdepth = 2;
}
$forum_list = build_forumbits();
$forums = $forum_list['forum_list'];

$plugins->run_hooks("index_end");


var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34604667-1']);
_gaq.push(['_trackPageview']);

Nevermind... I finally figured it out.
You can't mix Javascript and PHP directly.

Remove the code from index.php and place the code in your header template instead.