Geburtstage werden nicht im Index angezeigt
Verfasst: 11.02.2008 10:10
Habe gerade festgestellt, dass es nich mehr angezeigt wird, wenn ein User Geburtstag hat. Woran kann das liegen? Die Option im ACP ist aktiviert...
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST -->
<h3>{L_BIRTHDAYS}</h3>
<p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>
<!-- ENDIF -->
Code: Alles auswählen
// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'])
{
$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
$sql = 'SELECT user_id, username, user_colour, user_birthday
FROM ' . USERS_TABLE . "
WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
if ($age = (int) substr($row['user_birthday'], -4))
{
$birthday_list .= ' (' . ($now['year'] - $age) . ')';
}
}
$db->sql_freeresult($result);
}
Code: Alles auswählen
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
Code: Alles auswählen
'BIRTHDAY_LIST' => $birthday_list,
Eigentlich nichts außergewöhnliches...11-02-1974