The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Member's Age in Postbit & Getinfo Profile (automatically calculated from birthday) Details »» | |||||||||||||||||||||||||||
Member's Age in Postbit & Getinfo Profile (automatically calculated from birthday)
Developer Last Online: May 2013
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). 2) Getinfo Profile hack ---------------------------- This adds the member's age in their profile. I've added this to the installation text file. It's a matter of editing members.php and the getinfo template. Installation text file here: Show Your Support
|
Comments |
#22
|
||||
|
||||
Great, just installed it.
|
#23
|
|||
|
|||
Hmm.. i installed it, but nothing shows up. I've gone back over it 4 times to make sure its right. Still nothing.. any clue?
|
#24
|
||||
|
||||
Nice Work Erwin, thanks
|
#25
|
||||
|
||||
Quote:
|
#26
|
|||
|
|||
Not bad. Nice and simple. I will proble also install this one once i get my site back up and running.
|
#27
|
|||
|
|||
Quote:
|
#28
|
|||
|
|||
cann someone help me with this code?
i have this in my member.php to show the userage in members profile but when i view several profiles they are older than their birthday is --------------------------- // Set userage ! if ($bbuserinfo[birthday] == '0000-00-00') { $userage = "N/A"; } else { if (date("Y")<$bday[0] or $bday[0]<1901 or $bday[0]=='0000') { $userage = "N/A"; } } if ( ($userage!="N/A") ){ if (date("m")>=$bday[1] and date("d")>=$bday[2]) { $userage=(date("Y")-$bday[0]); eval("\$getinfo_userage = \"".gettemplate("getinfo_userage")."\";"); } else { $userage=(date("Y")-$bday[0])+1; eval("\$getinfo_userage = \"".gettemplate("getinfo_userage")."\";"); } } if ( ($userage!="N/A") ){ if (date("m")>=$bday[1] and date("d")<=$bday[2]) { $userage=(date("Y")-$bday[0]); eval("\$getinfo_userage = \"".gettemplate("getinfo_userage")."\";"); } else { $userage=(date("Y")-$bday[0])+1; eval("\$getinfo_userage = \"".gettemplate("getinfo_userage")."\";"); } } if ( ($userage!="N/A") ){ if (date("m")<=$bday[1] and date("d")<$bday[2]) { $userage=(date("Y")-$bday[0])-1; eval("\$getinfo_userage = \"".gettemplate("getinfo_userage")."\";"); } else { $userage=(date("Y")-$bday[0]); eval("\$getinfo_userage = \"".gettemplate("getinfo_userage")."\";"); } } -------------------------------------------- Birthday: 23.09.1982 Age: 20 ^^ you see? he is older but its still August right? anyone who knows how to fix this? |
#29
|
|||
|
|||
I found something wrong!
A user set his birthdate to be in 1969 and it says he's 84 in the postbit |
#30
|
|||
|
|||
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 |
#31
|
||||
|
||||
Code removed from this post, and added to the TEXT installation file.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|