The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Calculate Member Average Age?
I think this would be a fun hack for a simple stat.
Anybody know how? |
#2
|
||||
|
||||
well first you would have to query the database for all users with a birthday. then convert the xx/xx/xxxx to a unix timestamp then divide that by the number of seconds in a year and then add the year to variable. once all the ages are added to a variable then divide the variable by the number of users found having a birthday
|
#3
|
|||
|
|||
Oh geeeese. How about someone just convert this hack:
https://vborg.vbsupport.ru/showthrea...ight=User+Ages It's only 1 file |
#4
|
||||
|
||||
[sql]SELECT AVG( YEAR( CURDATE( ) ) - YEAR( birthday_search ) ) - ( RIGHT( CURDATE( ) , 5 ) < RIGHT( birthday_search, 5 ) ) AS avgage
FROM user WHERE birthday_search NOT LIKE '0000-%'[/sql] |
#5
|
||||
|
||||
Quote:
That would be great! Can anyone do it? :S |
#6
|
|||
|
|||
Quote:
Read Kirby's post above yours, he already did it more then 10 days ago! |
#7
|
||||
|
||||
w00t mines 22 lol
|
#8
|
||||
|
||||
ah cool... 25 for me.
|
#9
|
|||
|
|||
I don't think Andreas converted the mod. He just gave the query to get the average age. Anyone willing to convert the mod?
|
#10
|
|||
|
|||
Mine's 32.0978
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|