TinyPortal

Development => Support => Installation => Topic started by: Alto on August 18, 2007, 02:09:08 PM

Title: error in Load.php
Post by: Alto on August 18, 2007, 02:09:08 PM
I get this when trying to refresh my install:

Parse error: syntax error, unexpected ';' in /home/bixismi0/public_html/clubhouse/Sources/Load.php on line 667

I checked the code (even redid changes with fresh Load.php from SMF)
this line was not changed during manual install.

any ideas?

TP version v0.9.8
SMF version 1.1.3
Title: Re: error in Load.php
Post by: G6Cad on August 18, 2007, 02:49:22 PM
Can you copy and paste the code from the line 650 to 700 and mark out the line 667 so we can have a look at it. Make sure you paste the code within codetags [ code ] [ /code ]
Title: Re: error in Load.php
Post by: Alto on August 18, 2007, 03:01:33 PM
// Now check if the user is a moderator.
$user_info['is_mod'] = isset($board_info['moderators'][$ID_MEMBER]);

if (count(array_intersect($user_info['groups'], $board_info['groups'])) == 0 && !$user_info['is_admin'])
$board_info['error'] = 'access';

  // Build up the linktree (adding TPortal forum index)
                $context['linktree'] = array_merge(
                        $context['linktree'],
                        array(array(
                                'url' => $scripturl . '?action=forum#' . $board_info['cat']['id'],
                                'name' => $board_info['cat']['name']
                        )),



// Set the template contextual information.
$context['user']['is_mod'] = &$user_info['is_mod'];
$context['current_topic'] = $topic;
$context['current_board'] = $board;

// Hacker... you can't see this topic, I'll tell you that. (but moderators can!)
if (!empty($board_info['error']) && ($board_info['error'] != 'access' || !$user_info['is_mod']))
{
// The permissions and theme need loading, just to make sure everything goes smoothly.
loadPermissions();
loadTheme();

$_GET['board'] = '';
$_GET['topic'] = '';

// If it's a prefetching agent, just make clear they're not allowed.
if (isset($_SERVER['HTTP_X_MOZ']) && $_SERVER['HTTP_X_MOZ'] == 'prefetch')
{
ob_end_clean();
header('HTTP/1.1 403 Forbidden');
die;
}
elseif ($user_info['is_guest'])
{
loadLanguage('Errors');
is_not_guest($txt['topic_gone']);
}
else
fatal_lang_error('topic_gone', false);
}

if ($user_info['is_mod'])
$user_info['groups'][] = 3;
}

thats 650 to 700
line 667 is
$context['user']['is_mod'] = &$user_info['is_mod'];

Thanks for the help :)
Title: Re: error in Load.php
Post by: Crip on August 18, 2007, 03:14:30 PM
Might be some backups of files, remove all files with a ~ on the end~ these are only back up files good for nothing . ?
Title: Re: error in Load.php
Post by: G6Cad on August 18, 2007, 03:15:00 PM
You have missed a few parts.

Replace the code between these 2 parts // Build up the linktree and  //Hacker...with my code.


// Build up the linktree (adding TPortal forum index)
                $context['linktree'] = array_merge(
                        $context['linktree'],
                        array(array(
                                'url' => $scripturl . '?action=forum#' . $board_info['cat']['id'],
                                'name' => $board_info['cat']['name']
                        )),
         array_reverse($board_info['parent_boards']),
         array(array(
            'url' => $scripturl . '?board=' . $board . '.0',
            'name' => $board_info['name']
         ))
      );
   }

   // Set the template contextual information.
   $context['user']['is_mod'] = &$user_info['is_mod'];
   $context['current_topic'] = $topic;
   $context['current_board'] = $board;

   // Hacker... you can't see this topic, I'll tell you that. (but moderators can!)


Title: Re: error in Load.php
Post by: Alto on August 18, 2007, 03:27:05 PM
that code did it
Thank you so much.

but, now The front page (home) is the TP message (thats cool) and I have no visible way to enter forums?
Title: Re: error in Load.php
Post by: Alto on August 18, 2007, 03:50:37 PM
OK, lol
everything working OK now.
did not go into blocks mgr and move stuff around.
Found my way.
Thanks again for the help I am liking this so much better than the old PHPnuke stuff I had been using.
Great stuff!