Seite 1 von 1

Fehlermeldung PhP Gallery 1.0.5

Verfasst: 20.10.2010 23:35
von finsrok
Hallo ich habe bei uns im Forum die phpbb Galery 1.0.5 eingebaut funktioniert auch einwandfrei jetzt bekomme ich nur eine Fehlermeldung
wenn ich Beiträge öffnen möchte : Parse error: syntax error, unexpected ';' in /home/www/web88/html/ddd/viewtopic.php on line 988
Das wäre die Zeile ));
Könnt ihr mir bitte helfen ich weiß nicht mehr weiter.
Unser Forum: Dreckiges-Dutzend-clan.de

Code: Alles auswählen

$db->sql_freeresult($result);

if (!sizeof($post_list))
{
        if ($sort_days)
        {
                trigger_error('NO_POSTS_TIME_FRAME');
        }
        else
        {
                trigger_error('NO_TOPIC');
        }
}

// Holding maximum post time for marking topic read
// We need to grab it because we do reverse ordering sometimes
$max_post_time = 0;

$sql = $db->sql_build_query('SELECT', array(
        'SELECT'        => 'u.*, z.friend, z.foe, p.*, gu.personal_album_id, gu.user_images',

        'FROM'                => array(
                USERS_TABLE                => 'u',
                POSTS_TABLE                => 'p',
        ),

        'LEFT_JOIN'        => array(
                array(
                        'FROM'        => array(ZEBRA_TABLE => 'z'),
                        'ON'        => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
                , array(
                        'FROM'        => array(GALLERY_USERS_TABLE => 'gu'),
                        'ON'        => 'gu.user_id = p.poster_id'
                )
        ),

        'WHERE'                => $db->sql_in_set('p.post_id', $post_list) . '
                AND u.user_id = p.poster_id'
));

$result = $db->sql_query($sql);

$now = getdate(time() + $user->timezone + $user->dst - date('Z'));

// Posts are stored in the $rowset array while $attach_list, $user_cache
// and the global bbcode_bitfield are built
while ($row = $db->sql_fetchrow($result))
{
        // Set max_post_time
        if ($row['post_time'] > $max_post_time)
        {
                $max_post_time = $row['post_time'];
        }

        $poster_id = (int) $row['poster_id'];

        // Does post have an attachment? If so, add it to the list
        if ($row['post_attachment'] && $config['allow_attachments'])
        {
                $attach_list[] = (int) $row['post_id'];

                if ($row['post_approved'])
                {
                        $has_attachments = true;
                }
        }

        $rowset[$row['post_id']] = array(
                'hide_post'                        => ($row['foe'] && ($view != 'show' || $post_id != $row['post_id'])) ? true : false,

                'post_id'                        => $row['post_id'],
                'post_time'                        => $row['post_time'],
                'user_id'                        => $row['user_id'],
                'username'                        => $row['username'],
                'user_colour'                => $row['user_colour'],
                'topic_id'                        => $row['topic_id'],
                'forum_id'                        => $row['forum_id'],
                'post_subject'                => $row['post_subject'],
                'post_edit_count'        => $row['post_edit_count'],
                'post_edit_time'        => $row['post_edit_time'],
                'post_edit_reason'        => $row['post_edit_reason'],
                'post_edit_user'        => $row['post_edit_user'],
                'post_edit_locked'        => $row['post_edit_locked'],

                // Make sure the icon actually exists
                'icon_id'                        => (isset($icons[$row['icon_id']]['img'], $icons[$row['icon_id']]['height'], $icons[$row['icon_id']]['width'])) ? $row['icon_id'] : 0,
                'post_attachment'        => $row['post_attachment'],
                'post_approved'                => $row['post_approved'],
                'post_reported'                => $row['post_reported'],
                'post_username'                => $row['post_username'],
                'post_text'                        => $row['post_text'],
                'bbcode_uid'                => $row['bbcode_uid'],
                'bbcode_bitfield'        => $row['bbcode_bitfield'],
                'enable_smilies'        => $row['enable_smilies'],
                'enable_sig'                => $row['enable_sig'],
                'friend'                        => $row['friend'],
                'foe'                                => $row['foe'],
        );

        // Define the global bbcode bitfield, will be used to load bbcodes
        $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);

Re: Fehlermeldung PhP Gallery 1.0.5

Verfasst: 21.10.2010 08:14
von franki
Hallo

Das sieht nach einem Eibaufehler aus.

Sie dir den Bereich noch einmal an. Dort scheint eine Klammer zu fehlen.
'LEFT_JOIN' => array(
array(
'FROM' => array(ZEBRA_TABLE => 'z'),
'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
) <----------- diese Klammer dürfte fehlen
, array(
'FROM' => array(GALLERY_USERS_TABLE => 'gu'),
'ON' => 'gu.user_id = p.poster_id'
)
),

Re: Fehlermeldung PhP Gallery 1.0.5

Verfasst: 21.10.2010 08:22
von Charlie_M
Gehört das Komma da nicht raus?

Code: Alles auswählen

 'foe'                                => $row['foe'],
        );
=>

Code: Alles auswählen

 'foe'                                => $row['foe']
        );

Ist ja die letzte Variable des Arrays...

Re: Fehlermeldung PhP Gallery 1.0.5

Verfasst: 21.10.2010 08:28
von franki
Charlie_M hat geschrieben:Gehört das Komma da nicht raus?

Code: Alles auswählen

 'foe'                                => $row['foe'],
        );
=>

Code: Alles auswählen

 'foe'                                => $row['foe']
        );

Ist ja die letzte Variable des Arrays...
Wenn ich das richtig sehe ist das der original Code und keine Änderung von der Gallery-Mod.
Also sollte dort das Komma richtig sein.

Re: Fehlermeldung PhP Gallery 1.0.5

Verfasst: 21.10.2010 08:41
von Charlie_M
Ja, stimmt - sorry :oops:

Re: Fehlermeldung PhP Gallery 1.0.5

Verfasst: 21.10.2010 09:46
von finsrok
Vielen Dank für die schnelle Hilfe es war wirklich die fehlende Klammer!