Seite 1 von 1

colorgroups und junior admin im Bezug auf birthday

Verfasst: 30.06.2005 16:50
von mr.no-name
Für die beiden Mods color groups und junior admin gibt es jeweils Erweiterungen für den Birthday Mod, sodass die Junioradmins bzw. die color groups auch im Geburtstagsbereich entsprechend angezeigt werden.
Nun habe ich folgendes Problem:
junior_birthday.txt hat geschrieben:#-----[ ÖFFNE ]-----
#
# index.php
#
#-----[ FINDE (2x) ]-----
#
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}

#
#-----[ jeweils MIT FOLGENDEM ERSETZEN ]------------------------------------------
#

$style_color = '';
if( $birthdayrow['user_level'] == ADMIN )
{
$birthdayrow['username'] = '<b>'. $birthdayrow['username'] .'</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if( $birthdayrow['user_id'] == $jr_admin_userdata['user_id'] )
{
$birthdayrow['username'] = '<b>'. $birthdayrow['username'] .'</b>';
$style_color = 'style="color:#FF0000"';
}
else if( $birthdayrow['user_level'] == MOD )
{
$birthdayrow['username'] = '<b>'. $birthdayrow['username'] .'</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
color_birthday.txt hat geschrieben:#
#-----[ ÖFFNE ]-----
#
# index.php
##-----[ FINDE (2x) ]-----
#
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}

#
#-----[ jeweils MIT FOLGENDEM ERSETZEN ]-----
#
$birthdayrow['username'] = color_group_colorize_name($birthdayrow['user_id']);
Im Klartext: Ich soll zweimal die selbe Codestelle ersetzen ;)
Wie kann ich nun dafür sorgen, dass beide Änderungen funktionieren?
Wäre super, wenn hier jemand etwas dazu wüsste.

Verfasst: 01.07.2005 20:28
von mr.no-name
Ach kommt schon - hier gibt's bestimmt Leute, die da ne Lösung wissen :)

Verfasst: 02.07.2005 15:29
von mr.no-name
Mir fiel gerade etwas dazu ein:
Wenn ich nur die Sache für den Colorgroups Mod übernehme, müssten die Anzeigen ja nach den Gruppen sein und daher ausreichen, oder?

Verfasst: 02.07.2005 21:13
von Supersonic
Stimmt. Hab ich bei mir auch so gemacht.