MyBB-Plugins Forums

Full Version: Richest users not updating
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

For some reason the richest users only seems to update certain forum users.

I tried recounting points, nothing happened. I also tried giving all the users 1500 points to level the playing field, the richest users list didn't update; in fact it seems to keep the old totals for the top 3 users and doesn't reflect that everyone is the same.

Any advice, or is there anyway to refresh the richest users list?

Thanks

Steve
PHP Code:
    // get richest users
    
$query $db->simple_select('users'implode(','$fields), '', array('order_by' => 'newpoints''order_dir' => 'DESC''limit' => intval($mybb->settings['newpoints_main_stats_richestusers'])));
    while(
$user $db->fetch_array($query)) {
        
$bgcolor alt_trow();
        
        
$user['username'] = build_profile_link(htmlspecialchars_uni($user['username']), intval($user['uid']));
        
$user['newpoints'] = newpoints_format_points($user['newpoints']);
        
        
$plugins->run_hooks("newpoints_stats_richest_users");
        
        eval(
"\$richest_users .= \"".$templates->get('newpoints_statistics_richest_user')."\";");
    } 

Nothing is cached, thus everything's grabbed in real time. Unless you have some sort of caching system in your back-end which is caching the database, the values should be updated in real time.
(07-20-2012, 04:29 AM)Pirata Nervo Wrote: [ -> ]
PHP Code:
    // get richest users
    
$query $db->simple_select('users'implode(','$fields), '', array('order_by' => 'newpoints''order_dir' => 'DESC''limit' => intval($mybb->settings['newpoints_main_stats_richestusers'])));
    while(
$user $db->fetch_array($query)) {
        
$bgcolor alt_trow();
        
        
$user['username'] = build_profile_link(htmlspecialchars_uni($user['username']), intval($user['uid']));
        
$user['newpoints'] = newpoints_format_points($user['newpoints']);
        
        
$plugins->run_hooks("newpoints_stats_richest_users");
        
        eval(
"\$richest_users .= \"".$templates->get('newpoints_statistics_richest_user')."\";");
    } 

Nothing is cached, thus everything's grabbed in real time. Unless you have some sort of caching system in your back-end which is caching the database, the values should be updated in real time.

Thanks I'll maybe do a re-install see if that helps.