Forums / Cotonti / Extensions / Support / Team plugin and age, set to 39 after 0.6.1 update

DemptD
#16362 2009-08-22 00:33
I did it like this:

while($urr=sed_sql_fetcharray($sql)) {
$urr['birthdate'] = sed_date2stamp($urr['birthdate']);
$urr['user_text'] = sed_build_usertext(sed_cc($urr['user_text']));
$urr['user_website'] = sed_build_url($urr['user_website']);
$urr['user_age'] = ($urr['user_birthdate']!=0) ? sed_build_age($urr['user_birthdate']) : '';
$urr['user_birthdate'] = ($urr['user_birthdate']!=0) ? @date($cfg['formatyearmonthday'], $urr['user_birthdate']) : '';
$urr['user_gender'] = ($urr['user_gender']=='' || $urr['user_gender']=='U') ?  '' : $L["Gender_".$urr['user_gender']];
$urr['user_journal'] = ($urr['user_jrnpagescount']>0 && $urr['user_jrnupdated']>0) ? "<a href=\"journal.php?id=".$urr['user_id']."\"><img src=\"skins/$skin/img/system/icon-journal.gif\" alt=\"\" /></a> ".date($cfg['formatyearmonthday'], $urr['user_jrnupdated'] + $usr['timezone'] * 3600) : '';

Still shows all ages as 39.

Added 8 days later:

OMG i actually fixed something myself! xD

i went and had a look at users.inc.php and searched for birthdate, found this:

$urr = sed_sql_fetcharray($sql);
$urr['user_birthdate'] = sed_date2stamp($urr['user_birthdate']);

$urr['user_text'] = sed_build_usertext(htmlspecialchars($urr['user_text']));
$urr['user_website'] = sed_build_url($urr['user_website']);
$urr['user_age'] = ($urr['user_birthdate']!=0) ? sed_build_age($urr['user_birthdate']) : '';
$urr['user_birthdate'] = ($urr['user_birthdate']!=0) ? @date($cfg['formatyearmonthday'], $urr['user_birthdate']) : '';
$urr['user_gender'] = ($urr['user_gender']=='' || $urr['user_gender']=='U') ?  '' : $L["Gender_".$urr['user_gender']];

Took "$urr['user_birthdate']" and "$urr['user_birthdate']" and replaced it with what was in team.php and now it shows the correct age :D

Dit bericht is bewerkt door DemptD (2009-08-30 21:44, 15 jaren ago)