MyBB-Plugins Forums

Full Version: NewPoints 1.9.9
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i love new points, but atm i cant install files to right place on cpanel Sad
After installing new points 1.7 it does not show points in user cp..
what should i do?
i have downloaded and installed new points 1.7 then too y it is giving option to upgrades to 1.1 and 1.2.....wats dis.
(01-18-2011, 05:23 AM)architbakliwal Wrote: [ -> ]After installing new points 1.7 it does not show points in user cp..
what should i do?
i have downloaded and installed new points 1.7 then too y it is giving option to upgrades to 1.1 and 1.2.....wats dis.

NewPoints is not supposed to show up in the user cp.
In statistics, the Last lottery winner is not the last lottery winner.

I won the lottery and its saying someone else did, even though on the lottery page it says me, and i got the money.


(01-21-2011, 12:53 AM)BleepyEvans Wrote: [ -> ]In statistics, the Last lottery winner is not the last lottery winner.

I won the lottery and its saying someone else did, even though on the lottery page it says me, and i got the money.

Hmm, not sure how that's possible.
Could you please check the NewPoints log and check the username in the last row whose data field is 'lottery_winner' ?
It says Deadlycode. Not BleepyEvans
Any ideas?

Has anyone else completed a lottery? xD
Hmm, interesting. Well the winner on the log should be the actual winner. What makes you believe that he's not the winner?
Edit:
I just found the problem, please replace:
PHP Code:
        if($term_id 1)
        {
            
$last_term $db->fetch_array($db->simple_select('newpoints_lottery_term','*','term_id='.($term_id-1)));
            
            if(
$last_term['winner_uid'])
            {
                
$last_winner_user get_user((int)$last_term['winner_uid']);
                
$last_winner $lang->sprintf($lang->newpoints_lottery_last_winner$last_winner_user['uid'], $last_winner_user['username'], newpoints_format_points($last_term['money']));    
            }
        } 
With:
PHP Code:
        if($term_id 1)
        {
            
$last_winner $db->fetch_array($db->simple_select('newpoints_log','*','action=\'lottery_winner\'', array('order_by' => 'date''order_dir' => 'desc''limit' => 1)));
            
            if(
$last_winner['uid'])
            {
                
$data explode('-'$winner['data']);
                
                
$last_winner $lang->sprintf($lang->newpoints_lottery_last_winner, (int)$last_winner['uid'], htmlspecialchars_uni($last_winner['username']), newpoints_format_points($data[2]));    
            }
            else 
$last_winner '';
        } 

Does it fix it?
I have had 3 lottery runs & all work & reset works fine. On the lottery page it has always showed the correct winner although the log in acp it always list the winner as "guest"

outside of that it is working fine & love it
(01-22-2011, 08:14 AM)taBoo Wrote: [ -> ]I have had 3 lottery runs & all work & reset works fine. On the lottery page it has always showed the correct winner although the log in acp it always list the winner as "guest"

outside of that it is working fine & love it

But in the screenshot you showed me in the other page, it has two pictures. Do they look the same now?