ich bastel im Moment einen Mod, der Gruppen in verschiedenen Farben darstellt, nur nun komme ich nicht mehr weiter... Ich habe in der Tabelle "phpbb_groups" eine neue Spalte "group_color", inder die Farbe der Gruppe gespeichert wird (in RGB Codes). Um die User bei "Wer ist online" farblich darzustellen habe ich in der includes/page_header.php das
Code: Alles auswählen
$style_color = '';
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
Code: Alles auswählen
$sql = "SELECT group_id FROM " . USER_GROUP_TABLE . "
WHERE user_id = '" . $userdata['user_id'] . "'
AND user_pending = 0
AND group_id != 1
AND group_id != 2
AND group_id != 3";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Error');
}
while ( $row2 = $db->sql_fetchrow($result) )
{
$sql = "SELECT group_color FROM " . GROUPS_TABLE . "
WHERE group_id = '" . $row2['group_id'] . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Error');
}
while ( $row3 = $db->sql_fetchrow($result) )
{
$row['username'] = '<strong>' . $row['username'] . '</strong>';
$style_color = ' style="color:#' . $row3['group_color'] . '"';
}
}
Johannes