MyBB.de Forum

Normale Version: PWforen und Geschlossende Foren
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
Parse error: syntax error, unexpected T_ELSE in /home/www-data/htdocs/g/germanen/www/Forum/inc/functions_forumlist.php on line 342

Das funktioniert gar nicht.
Dann hast du was falsch gemacht weil ich habs vorher getestet...
Kannst du mal Line 341 und Line 342 hier posten?
Achso habe ich was falsch gemacht ich probiers nochmal! Wink
Nachdem Upgrade ist diese Funktion defekt:

Code:
PHP-Code:
// Fetch the last read date for this forum
        
if($forum['lastread'])
        {
            
$forum_read $forum['lastread'];
        }
        else
        {
             
$forum_read my_get_array_cookie("forumread"$forum['fid']);
        }

        if(!
$forum_read)
        {
            
$forum_read $mybb->user['lastvisit'];
        }
        
         
// If the lastpost is greater than the last visit and is greater than the forum read date, we have a new post 
        
if($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != && empty($forum['password']))
        {
            
$unread_forums++;
            
$folder "on";
            
$altonoff $lang->new_posts;
        }
        
// PW with new posts
        
elseif($forum['password'] != "" && $lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != 0)
        {
            
$unread_forums++;
            
$folder "pwon";
            
$altonoff $lang->forum_pw;
        }
        
//PW without new posts
        
elseif($forum['password'] != "")
        {
            
$folder "pwoff";
            
$altonoff $lang->forum_pw;
        } 
        
// Otherwise, no new posts
        
else
        { 
Habe den Code wieder hinzugefügt!
Weiteres:
Habe Cache und Historie geleert!
Hast du den Code auch wirklich 1:1 übernommen? Denn eigentlich wurde diese Datei gar nicht verändert von 1.4.1 zu 1.4.2 also sollte die Modifikation immer noch funktionieren.

Versuche es nochmal und mach ganz langsam, damit sich keine Fehler einschleichen.
Also da ich jetzte keine große Lust habe, das ausgiebig zu erklären, hier einfach die komplette Funktion. Ist getestet und sollte genau so funktionieren.

PHP-Code:
function get_forum_lightbulb($forum$lastpost$locked=0)
{
    global 
$mybb$lang$db$unread_forums;

    
// This forum is closed, so override the folder icon with the "offlock" icon.
    
if($forum['open'] == || $locked && empty($forum['password']))
    {
        
$folder "offlock";
        
$altonoff $lang->forum_locked;
    }
    else
    {
        
// Fetch the last read date for this forum
        
if($forum['lastread'])
        {
            
$forum_read $forum['lastread'];
        }
        else
        {
             
$forum_read my_get_array_cookie("forumread"$forum['fid']);
        }

        if(!
$forum_read)
        {
            
$forum_read $mybb->user['lastvisit'];
        }
        
         
// If the lastpost is greater than the last visit and is greater than the forum read date, we have a new post 
        
if($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != && empty($forum['password'])) 
        {
            
$unread_forums++;
            
$folder "on";
            
$altonoff $lang->new_posts;
        }
    
// PW with new posts
        
elseif($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != && $forum['password'] != ""
        {
            
$unread_forums++;
            
$folder "pwon";
            
$altonoff "Passwortgeschützter Bereich";
        }
    elseif(
$forum['password'] != "")
    {
            
$unread_forums++;
            
$folder "pwoff";
            
$altonoff "Passwortgeschützter Bereich";
        }
        
// Otherwise, no new posts
        
else
        {
            
$folder "off";
            
$altonoff $lang->no_new_posts;
        }
    }

    return array(
        
"folder" => $folder,
        
"altonoff" => $altonoff
    
);

Seiten: 1 2