Hallo, Gast! (Registrieren)

Wir wünschen allen Besuchern frohe Ostern!

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
PWforen und Geschlossende Foren
#11
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.
... Fehler sind die wahre Perfektion.
Zitieren
#12
Dann hast du was falsch gemacht weil ich habs vorher getestet...
Kannst du mal Line 341 und Line 342 hier posten?
Gruß Manuel
Bitte erst die Suche und die Doku benutzen.
Zitieren
#13
Achso habe ich was falsch gemacht ich probiers nochmal! Wink
... Fehler sind die wahre Perfektion.
Zitieren
#14
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!
... Fehler sind die wahre Perfektion.
Zitieren
#15
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.
Gruß Manuel
Bitte erst die Suche und die Doku benutzen.
Zitieren
#16
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
    
);

Gruß Manuel
Bitte erst die Suche und die Doku benutzen.
Zitieren