Also als Snipped:
includes/usercp_viewprofile.php
Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------
#
// Start add - Birthday MOD
if ($profiledata['user_birthday']!=999999)
{
$user_birthday = realdate($lang['DATE_FORMAT'], $profiledata['user_birthday']);
}
else
{
$user_birthday = $lang['No_birthday_specify'];
}
// End add - Birthday MOD
#
#-----[ REPLACE WITH ]-----------------------------------
#
// Start add - Birthday MOD
if ($profiledata['user_birthday']!=999999)
{
$user_birthday = realdate($lang['DATE_FORMAT'], $profiledata['user_birthday']);
$user_birthdate = realdate('md', $profiledata['user_birthday']);
$this_year = create_date('Y', time(), $board_config['board_timezone']);
$this_date = create_date('md', time(), $board_config['board_timezone']);
$user_age = $this_year - realdate('Y', $profiledata['user_birthday']);
if ( $this_date < $user_birthdate )
{
$user_age--;
}
}
else
{
$user_birthday = $lang['No_birthday_specify'];
$user_age = '';
}
// End add - Birthday MOD
#
#-----[ FIND ]-------------------------------------------
#
'BIRTHDAY' => $user_birthday,
#
#-----[ AFTER ADD ]-----------------------------------
#
'USER_AGE' => $user_age, Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_BIRTHDAY}:</span></td>
<td><b><span class="gen">{BIRTHDAY}</span></b></td>
</tr>
#
#-----[ REPLACE WITH ]-----------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_BIRTHDAY}:</span></td>
<td><b><span class="gen">{BIRTHDAY}</b> ({USER_AGE})</span></td>
</tr>