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
Letzer Beitrag mit Farbe der Benutzergruppe
#11
Nun ist das Feld Moderiert von wieder vorhanden aber danach steht nur etwas wenn ich einen einzelnen Benutzer als Moderator festlege, lege ich eine ganze Gruppe fest steht nach Moderiert von nichts mehr.
Zitieren
#12
Nimm bitte die Änderung zurück und ersetze die Zeilen 163 - 188
PHP-Code:
        $donemoderators = array();
        
$parentlist explode(","$forum['parentlist']);
        
        foreach(
$parentlist as $fid)
        {
            if(
is_array($moderatorcache[$fid]))
            {
                foreach(
$moderatorcache[$fid] as $moderator)
                {
                    if(
in_array($moderator['uid'], $donemoderators))
                    {
                        continue;
                    }
                    
                    
$moderator['username'] = format_name($moderator['username'], $moderator['usergroup'], $moderator['displaygroup']);
                    
$moderator['profilelink'] = build_profile_link($moderator['username'], $moderator['uid']);
                    
                    
$moderators .= $comma;
                    
$moderators .= $moderator['profilelink'];
                    
                    
$comma ", ";
                    
                    
$donemoderators[] = $moderator['uid'];
                }
            }
        } 
durch
PHP-Code:
        $donemoderators = array(
            
"users" => array(),
            
"groups" => array()
        );
        
$parentlist explode(","$forum['parentlist']);
        
        foreach(
$parentlist as $fid)
        {
            if(
is_array($moderatorcache[$fid]))
            {
                foreach(
$moderatorcache[$fid] as $modtype)
                {
                    foreach(
$modtype as $moderator)
                    {
                        if(
$moderator['isgroup'])
                        {
                            if(
in_array($moderator['id'], $donemoderators['groups']))
                            {
                                continue;
                            }
                            
$moderators .= $comma.htmlspecialchars_uni($moderator['title']);
                            
$donemoderators['groups'][] = $moderator['id'];
                        }
                        else
                        {
                            if(
in_array($moderator['id'], $donemoderators))
                            {
                                continue;
                            }
                    
                            
$moderator['username'] = format_name($moderator['username'], $moderator['usergroup'], $moderator['displaygroup']);
                            
$moderator['profilelink'] = build_profile_link($moderator['username'], $moderator['id']);
                        
                            
$moderators .= $comma;
                            
$moderators .= $moderator['profilelink'];
                        
                            
$donemoderators['users'][] = $moderator['id'];
                        }
                        
$comma ", ";
                    }
                }
            }
        } 
Zitieren
#13
Danke für die Hilfe, nun funktioniert es so wie es sollte.
Zitieren


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Letzer Beitrag Button alexking 6 2.055 02.02.2008, 19:30
Letzter Beitrag: alexking