DOB to Age

Hi everybody,

i wanted to change the Date of Birth in profile to the Age. It was a bit complicated to solve this in other previous versions of Dolphin. But now im trying to fix it for 6.1.1.

Does anyone know how i can change it?

Greets,

Jerry

Quote · 22 May 2008

Do you want the code change or the admin panel way?

I have video tutorials to help you mrpowless.com
Quote · 22 May 2008

The code has to be changed.

There is a function named age(). Use that to display the age in profile.

----
Quote · 22 May 2008

Hi guys thanks for reply!

Hmm, i would take any solution if it is working ;)

But mrpowless gave me something to think about it, maybe i can find it in admin panel by myselfe, hold on ;)

Quote · 22 May 2008

Ok, i tried it now. Setting it in Admin panel to Number will show only the year, also you have to enter only the year in Join Form.

I just wanted that the age is displayed as ie 29 or 35.

But entering the whole date in Join Form should stay, cause you could need it for happy birthday stuff etc.

@praveenkv1988

Cheers, ill try this way now.

Quote · 22 May 2008

No, you have to bring light in this situation. Tried to check the profile pages and some others, but im not really sure where to write this code.

Quote · 22 May 2008

Open the file templates/base/scripts/BxBaseProfileView.php

This was the file to be edited in dolphin 6.0.0005

but now it may be changed.

The function I told is there in profiles.inc.php

----
Quote · 23 May 2008

Cheers,

yeah i knew it from previous version, but im looking for the actual version. I tried it also but was not lucky to get it done...

Quote · 23 May 2008

I have to check the files, before I give you a solution.

----
Quote · 23 May 2008

I have to check the files, before I give you a solution.

Yeah would be cool! Thank you!

Quote · 24 May 2008

I think it should be added in inc/classes/BxDolProfileView.php

----
Quote · 24 May 2008

Yeah this is what ive tried, but didnt worked for me.

Quote · 24 May 2008

plz. post the code what you have tried.

----
Quote · 25 May 2008

Hmm, this what you gave me: age() ;)

Quote · 25 May 2008

Thats wrong.

You have to program similar to this.

$res = db_res("SELECT `Birthday` FROM `Profiles` WHERE `ID` = `$id`");

echo getage($res['Birthday']);

----
Quote · 25 May 2008

Ok, thanks for you hint, but it seems that im not able to make this ;)

Quote · 26 May 2008

Maybe another one some other news for this? ;)

Quote · 28 May 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.