- Code: Select all
#
#-----[ OPEN FILE ]------------------------------------------
#
include/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
if ($profiledata['user_birthday']!=999999)
{
$user_birthdate=realdate('md', $profiledata['user_birthday']);
$i=0;
while ($i<26)
{
if ($user_birthdate>=$zodiacdates[$n] & $user_birthdate<=$zodiacdates[$i+1])
{
$zodiac = $lang[$zodiacs[($i/2)]];
$u_zodiac = $images[$zodiacs[($i/2)]];
$zodiac_img = '<img src="' . $u_zodiac . '" alt="' . $zodiac . '" title="' . $zodiac . '" align="absmiddle" border="0" />';
$i=26;
} else
{
$i=$i+2;
}
}
}
#
#-----[ REMPLACE WITH ]------------------------------------------
#
$this_year = create_date('Y', time(), $board_config['board_timezone']);
$this_date = create_date('md', time(), $board_config['board_timezone']);
if ( $profiledata['user_birthday'] != 999999 )
{
$poster_birthdate=realdate('md', $profiledata['user_birthday']);
$n=0;
while ($n<26)
{
if ($poster_birthdate>=$zodiacdates[$n] & $poster_birthdate<=$zodiacdates[$n+1])
{
$zodiac = $lang[$zodiacs[($n/2)]];
$u_zodiac = $images[$zodiacs[($n/2)]];
$zodiac_img = '<img src="' . $u_zodiac . '" alt="' . $zodiac . '" title="' . $zodiac . '" align="absmiddle" border="0" />';
$n=26;
} else
{
$n=$n+2;
}
}
$poster_age = $this_year - realdate ('Y',$profiledata['user_birthday']);
if ($this_date < $poster_birthdate) $poster_age--;
$poster_age = $poster_age . ' ' . $lang['Years'];
include($phpbb_root_path . 'includes/chinese.'.$phpEx);
$chinese = get_chinese_year (realdate('Ymd', $profiledata['user_birthday']));
$u_chinese = $images[$chinese];
$chinese_img = ($chinese=='Unknown') ? '' : '<img src="' . $u_chinese . '" alt="' . $lang[$chinese] . '" title="' . $lang[$chinese] . '" align="absmiddle" border="0" />';
} else
{
$zodiac = '';
$u_zodiac = '';
$zodiac_img = $lang['No_birthday_specify'];
$poster_age = $lang['No_birthday_specify'];
$chinese = '';
$u_chinese = '';
$chinese_img = $lang['No_birthday_specify'];
}
#
#-----[ FIND ]------------------------------------------
#
'L_BIRTHDAY' => $lang['Birthday'],
#
#-----[ BEFORE, ADD ]------------------------------------------
#
'L_AGE' => $lang['Age'],
#
#-----[ FIND ]------------------------------------------
#
'BIRTHDAY' => ($profiledata['user_birthday']!=999999) ? realdate($lang['DATE_FORMAT'], $profiledata['user_birthday']) : $lang['No_birthday_specify'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POSTER_AGE' => $poster_age,
#
#-----[ OPEN FILE ]------------------------------------------
#
templates/your_template/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_BIRTHDAY}: </span></td>
<td><b><span class="gen">{BIRTHDAY}</span></b></td>
</tr>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_AGE}: </span></td>
<td><b><span class="gen">{POSTER_AGE}</b></span></td>
</tr>
#
#-----[ OPEN FILE ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Age'] = 'Age';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Years'] = 'years';
#
#-----[ OPEN FILE ]------------------------------------------
#
language/lang_french/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Age'] = 'Age';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Years'] = 'ans';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Enjoy


