MyBB-Plugins Forums

Full Version: New Points Statistics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
At the moment New Points will only tell you the richest users. Would it be possible to also find out the total amount of forum points in existence?
(09-16-2010, 04:24 PM)vash Wrote: [ -> ]At the moment New Points will only tell you the richest users. Would it be possible to also find out the total amount of forum points in existence?
Hi! If you want to sum all the user newpoints is very simple!
PHP Code:
$sum $db->query("SELECT SUM(`newpoints`) FROM `".TABLE_PREFIX."users`");
echo 
$sum
If you use a function (insert this in a function) you must use $db as global!
(09-16-2010, 04:24 PM)vash Wrote: [ -> ]At the moment New Points will only tell you the richest users. Would it be possible to also find out the total amount of forum points in existence?

What do you mean??
As Mihu says the sum of all the user points in existence. Will try his php code... Not sure where I should put it though... Will play with it!
(09-17-2010, 04:01 AM)vash Wrote: [ -> ]As Mihu says the sum of all the user points in existence. Will try his php code... Not sure where I should put it though... Will play with it!

Like, sum all of the points from all users??
Yep exactly. Its not crucial, but I thought it would be fun to celebrate milestones like a million currency points created and the like. More a stat to see in the Control Panel so I can announce it with great fanfare!
Oh, I guess you'd be the only one using it Tongue
Yep, probably... Would just quite like to see the stat in the stats page of the cpanel. Well that is if I can get NewPoints to work again!. But I think if I just create a php page as mihu suggested I can just look at that!