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

DemptD
#1 2009-08-08 00:25
After i updated to 0.6.1 my team plugin set all ages to 39 and it doesnt change when you edit it in the profile. Im sure its something easy, heres team.php:

Trustmaster
#2 2009-08-08 18:17
Modify it a bit:
while($urr=sed_sql_fetcharray($sql)) {
$urr['birthdate'] = sed_date2stamp($urr['birthdate']);
May the Source be with you!
Dave
#3 2009-08-09 16:50
hey DemptD, could u pleas send me tpl of ur team plugin? i made clan roster based on it with more "teams" and it aint showing at all
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl
DemptD
#4 2009-08-21 22:15
# Trustmaster : Modify it a bit:
while($urr=sed_sql_fetcharray($sql)) {
$urr['birthdate'] = sed_date2stamp($urr['birthdate']);

Umm, where do i put that?

Dave: heres the tpl:

Trustmaster
#5 2009-08-22 00:23
You see this line in that code you have pasted in the first post:
while($urr=sed_sql_fetcharray($sql)) {
Right after it add another one:
$urr['birthdate'] = sed_date2stamp($urr['birthdate']);
That is all you need to do and it should work fine with dates again.
May the Source be with you!
DemptD
#6 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
This post was edited by DemptD (2009-08-30 21:44, 14 years ago)
Dave
#7 2009-09-20 00:58
$urr['user_birthdate'] = sed_date2stamp($urr['user_birthdate']);

and

"TEAM_BIRTHDATE" => ($urr['user_birthdate']!=0) ? @date($cfg['formatyearmonthday'], $urr['user_birthdate']) : '',

??? :/
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl