Supiiiiii, das funktioniert wiederTheSteffen hat geschrieben:Ich habe zwar nicht viel Ahnung von dem Kram...habe aber eine Lösung gefunden...auf jeden fall läuft es![]()
in der portal.php suchenCode: Alles auswählen
...

Supiiiiii, das funktioniert wiederTheSteffen hat geschrieben:Ich habe zwar nicht viel Ahnung von dem Kram...habe aber eine Lösung gefunden...auf jeden fall läuft es![]()
in der portal.php suchenCode: Alles auswählen
...
Code: Alles auswählen
// CODE TAKEN FROM Birthday Mod Version 1.51 from Niels Chr. Rød Denmark http://mods.db9.dk/ START
$time_now = time();
$date_now = create_date('md', $time_now, $board_config['board_timezone']);
$date_forward = create_date('md',
$time_now+($board_config['birthday_check_day']*86400),
$board_config['board_timezone']);
Code: Alles auswählen
// CODE TAKEN FROM Birthday Mod Version 1.51 from Niels Chr. Rød Denmark http://mods.db9.dk/ END
Code: Alles auswählen
$sql = ($board_config['birthday_check_day']) ? "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username" :"";
if($result = $db->sql_query($sql))
{
if (!empty($result))
{
$time_now = time();
$this_year = create_date('Y', $time_now, $board_config['board_timezone']);
$date_today = create_date('Ymd', $time_now, $board_config['board_timezone']);
$date_forward = create_date('Ymd', $time_now+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
while ($birthdayrow = $db->sql_fetchrow($result))
{
$user_birthday2 = $this_year.($user_birthday = realdate("md",$birthdayrow['user_birthday'] ));
if ( $user_birthday2 < $date_today ) $user_birthday2 += 10000;
if ( $user_birthday2 > $date_today && $user_birthday2 <= $date_forward )
{
// user are having birthday within the next days
$user_age = ( $this_year.$user_birthday < $date_today ) ? $this_year - realdate ('Y',$birthdayrow['user_birthday'])+1 : $this_year- realdate ('Y',$birthdayrow['user_birthday']);
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 = '';
}
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
} else if ( $user_birthday2 == $date_today )
{
//user have birthday today
$user_age = $this_year - realdate ( 'Y',$birthdayrow['user_birthday'] );
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 = '';
}
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
}
$db->sql_freeresult($result);
}
Hallo,easygo hat geschrieben:Jo AWSW, was TheSteffen da hergenommen hat,
das ist der Code aus der index.php ^^
AWSW hat geschrieben:Hallo,
das Problem gab es schon mal vor langer Zeit... Damals lag es daran, dass man einen neueren Birthdaymod hatte, als der Code im Portal. Damals hat es geholfen, den php-Code aus dem Index in das Portal zu übernehmen. Die entsprechenden Bereiche sind dazu von mir damals im Portal markiert worden... Mehr kann ich dazu auch nicht mehr sagen...
HTH AWSW