CZ Points Module - Bug/Fix?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   CZ Points Module - Bug/Fix?
ZardozZ
CZ Super Newbie
 Codezwiz Site Donator
ZardozZ has been a member for over 19 year's 19 Year Member
usa.gif california.gif
Occupation: Chief Wizard
Age: 74
Gender: Male
Website:
Status: Offline
Joined: Sep 04, 2005
0.00 posts per day
Posts: 34
Points: 2,381
   
I have been searching the archives on the site and have not found any info related to this minor sorting problem in the CZ Points Module.

Observation: Seems like the User with the most amount of POINTS is being dropped off the list when you click on the Points link in the Navigation block.

I was able to verify this by changing the points manually for the top user to fall below the second highest user. When I did that the second higher user was not shown but the previous highest user was. In other words ALL members show EXCEPT the very highest member with the highest Point score. (not post score). Since the sort appears to be done in DECENDING ORDER on the POINTS column, the error must be in the way the sort is initiated. I am not an expert coder but perhaps a < might need to be a < = somewhere since the highest value is being lost in the sort.

THe problem is in the index. p h p file in the CZ Points Module. (Which otherwise has been excellent since I loaded it last evening. If there was a patch to the bug please advise...




_________________
ZZ Bachman / [ Register or login to view links on this board.]
Have a Blog? Ring Surf it @ [ Register or login to view links on this board.]
Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
I will try to do version 2.0. I have a few other things I want to add to it too.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: CZ Points Module - Bug/Fix?
ZardozZ
CZ Super Newbie
 Codezwiz Site Donator
ZardozZ has been a member for over 19 year's 19 Year Member
usa.gif california.gif
Occupation: Chief Wizard
Age: 74
Gender: Male
Website:
Status: Offline
Joined: Sep 04, 2005
0.00 posts per day
Posts: 34
Points: 2,381
   
Hi Telli ---

I think I isolated the problem and corrected it for you.

Module: CZ Points v.1.0.0

Corrected code in / around line 232 in the index. p h p file :


/* Top Points */
      $sql = "SELECT * FROM ".$prefix."_users ORDER BY points DESC limit 0,$toshow";


I changed the limit value from 1 to 0. When I did this the HIGHEST point user was now listed in the number 1 spot instead of being left off the table all together.

Check and see if it makes sense. I have not experianced any error since making the correction. You can use in your 2.0 release when you get to it.

Cheers.... hope this helps you in a small way. Thanks for all the great stuff you guys do .... icon_smile.gif

ZZ



_________________
ZZ Bachman / [ Register or login to view links on this board.]
Have a Blog? Ring Surf it @ [ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum