Version: 1.00, by Erwin
Developer Last Online: May 2013
Version: 2.3.x
Rating:
Released: 08-07-2002
Last Update: Never
Installs: 64
No support by the author.
Member's Age in Postbit & Getinfo Profile - by Dr. Erwin Loh
--------------------------------------------------------------------------
I requested this a while back. Since no one has released a hack like this, I worked out how to do it.
NOTE: This hack automatically shows the age of the person calculated from the birthday entered (it's not a separate input). If there is no birthdate or birthyear, the age doesn't show up automatically.
1) Postbit hack
-------------------
This hack basically places the member's age underneath his join date (or wherever you want) in the postbit, like this:
Registered: July 2000
Age: 18
Location: USA
Posts: 102
If the member has not entered his birth-year, then the age will NOT show up at all, like this:
Registered: July 2000
Location: USA
Posts: 102
This hack requires 1 file edit (functions.php), and 1 template edit (postbit).
Originally posted by Tha Rock ok Very strange I just checked his full profile in adminCP:
1918-06-12
That's what's set for his birthdate which means the 84 is RIGHT but in his PROFILE it says 1969, why does it say that
That's weird, and has nothing to do with my hack. Looks like somewhere along the line something went wrong. My hack just displays the member's age - it doesn't touch the database or make a query.
Just noticed that after installing this I had to move the admin/functions.php to a different area within as i lost the profile option in my postbit. No bigee, works great! Thanks
Originally posted by PHiXTiT Just noticed that after installing this I had to move the admin/functions.php to a different area within as i lost the profile option in my postbit. No bigee, works great! Thanks
I have no idea what you just said there, but whatever it is, it's not because of this hack - this hack is placed in the place in functions.php that decides what to put in the postbit - the code of the hack itself is just a simple mathematical calculation that uses up no database query and does not interfere with any other lines of code in functions.php - unless you have another hack in functions.php that uses the same variables.
Bottom line - this hack works fine with no problems - the problem you had (whatever it is) is not because of this hack.
Well this was the first hack I installed on a clean 2.2.7 board and when modifying the admin/functions.php I lost the profile button on my postbit. I retried it a couple times and same thing.
So I bumped the area to be pasted a couple lines up and all is working great now.
Just so you know my postbit template is highly modified just for looks.
I was just pointing this out so that if others are having any problems in 2.2.7 to try what i did.
Great hack though, comes in handy.