TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 12:21:49 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 79
  • Total: 79

error in Load.php

Started by Alto, August 18, 2007, 02:09:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alto

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

G6Cad

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 ]

Alto

#2
// 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 :)

Crip

Might be some backups of files, remove all files with a ~ on the end~ these are only back up files good for nothing . ?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



G6Cad

#4
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!)



Alto

#5
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?

Alto

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!