The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Code to output users age based on birthdate
This is most likely very simple and easy to do but I can't figure out how to output the users age in vbulletin based on their registration birth date. There does not seem to be a variable built in for it. Any help would be appreciated.
Thanks. --------------- Added [DATE]1207524531[/DATE] at [TIME]1207524531[/TIME] --------------- I think all the code needs to do is subtract the birth date year from the current year to get the age. Could anyone help me? --------------- Added [DATE]1207529081[/DATE] at [TIME]1207529081[/TIME] --------------- Oh, after much hunting and pulling my hair out I figured out how to get the age of the user. Hope other people searching around find this of help. The variable that holds the birthdate is $vbulletin->userinfo['birthday'] To then turn it into an age I used this function. PHP Code:
|
#2
|
||||
|
||||
Showing a user's age is already a feature. However, many members disable it for various reasons.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|