UseBB Community

The official board for UseBB help and discussion

UseBB Community » Help & Support » Change how age/bday is displayed in profile

Change how age/bday is displayed in profile

Moderators: Gaia.

Page: 1

Author Post
Member
Registered: May 2005
Posts: 298
Location: 98671
I tried to add what image has to right of age, but was unsuccessful, so how do you change how age/bday is displayed in profile.

User posted image

Just like it to display whatever you enter for your birthday.

Thanks.
Member
Registered: May 2005
Posts: 298
Location: 98671
Anyone!

My reason for wanting this is so you can wish someone a happy birthday.
Developer
Registered: Apr 2004
Posts: 2224
Location: Belgium
Sorry for the delay.

The code to show the birthday is in profile.php at line 162. $profiledata['birthday'] contains an integer of length 8 (YYYYMMDD). An unix timestamp is not possible since it starts at 1970.

With a few processing you could print the exact date, or show an image when it's the current date
date('Ymd');
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: May 2005
Posts: 298
Location: 98671
Thanks Dietrich, no worries, well my 2nd post really should not have added anyway, knew eventually it would get a answer.

You kinda lost me, I do know PHP alitte more these days, I have no problem adding or manipulating code, but I still do not know enough, cannot even remember what I tried to do.
Developer
Registered: Apr 2004
Posts: 2224
Location: Belgium
Well, to get the full readable date you could use
$functions->make_date(mktime(0, 0, 0, 
substr($profiledata['birthday'], 4, 2),
substr($profiledata['birthday'], 6, 2),
substr($profiledata['birthday'], 0, 4)),
'F jS, Y');

You can append it to the value of $age at line 64 which currently reads
$age = $functions->calculate_age($birthday);
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: May 2005
Posts: 298
Location: 98671
Thanks again Dietrich, will see what happens soon, I'm in no rush on doing this, besides I will end up with a parse error, seems to happen more often with my fiddling. :lol:

Page: 1

UseBB Community » Help & Support » Change how age/bday is displayed in profile

UseBB Community is powered by UseBB 1 Forum Software