diff --git a/phpBB/index.php b/phpBB/index.php
index 0830dd0686..e5dceeacf2 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -96,12 +96,20 @@ if ($config['load_birthdays'] && $config['allow_birthdays'])
while ($row = $db->sql_fetchrow($result))
{
- $birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
+ $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
+ $birthday_list .= (($birthday_list != '') ? ', ' : '') . $birthday_username;
+ $birthday_year = (int) substr($row['user_birthday'], -4);
+ $birthday_age = $now['year'] - $birthday_year;
- if ($age = (int) substr($row['user_birthday'], -4))
+ if ($birthday_year)
{
- $birthday_list .= ' (' . ($now['year'] - $age) . ')';
+ $birthday_list .= ' (' . $birthday_age . ')';
}
+
+ $template->assign_block_vars('birthdays', array(
+ 'USERNAME' => $birthday_username,
+ 'AGE' => ($birthday_year) ? $birthday_age : '',
+ ));
}
$db->sql_freeresult($result);
}
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index 539c851d1d..b183cf4372 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -35,9 +35,9 @@
{L_LEGEND}: {LEGEND}
{L_CONGRATULATIONS}: {BIRTHDAY_LIST}{L_NO_BIRTHDAYS}
+{L_CONGRATULATIONS}: {birthdays.USERNAME} ({birthdays.AGE}), {L_NO_BIRTHDAYS}
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html index e52e357564..100199c209 100644 --- a/phpBB/styles/subsilver2/template/index_body.html +++ b/phpBB/styles/subsilver2/template/index_body.html @@ -50,7 +50,7 @@{L_CONGRATULATIONS}: {BIRTHDAY_LIST}{L_NO_BIRTHDAYS}
{L_CONGRATULATIONS}: {birthdays.USERNAME} ({birthdays.AGE}), {L_NO_BIRTHDAYS}