Open mcdeimon opened 6 years ago
rows=50
is default. Are you seeing more than that? Unless you added rows=1000
then it should not be doing this.
Oh if you are using some weird theme with bootstrap... Then try bootstrap=yes
Hi! I'm talking about [vyps-pb pid = 2] not [vyps-pl]
[vyps-pb pid=3]
has a default of 50 rows. It's called pb for public balance but it sorts so its functional as a leaderboard.
Does not work "rows = 25" or "bootstrap = yes" and the rank numbers are not right.
Hrm... Let me investigate
BTW... If you copy your site... and just remove your theme and use something generic, does it have same issue?
I have a clone of my web and in the web of tests I do not have this failure ... I am going to try and disable some new plugins.
Ok... I was posting image to see if you see this or its out of order?
I forgot I don't think you have to log on to see leaderboards so feel free to post screenshot or link to it.
So I can see if plug in issue doesn't work.
Hrm... Have you ever edited your points_log table manually with php_admin before?
The order is right as far as in order... But has gaps from users that had amounts but no longer do.
Ah. I have an idea. When you ban a user, do you ban but keep the account or do you ban and delete the account? It's possible the table still sees the points but it knows the user is not there so it skips them.
I realize is that on my test site... No one who ever earned points was banned as only the spam accounts were the ones I deleted and they never earned points.
I think it's that. How can it be solved?
Ok. I think its on me then, I just need to check if the user id exists in the WP user table and if it doesn't then skip that one when doing rankings.
Which looking at this... I just need to do an SQL join between the point_log and wp_users
But give me a few hours or so... As have to step out and SQL problems never seems to be as simple as I think it will be.
Ok!!! Thanks!!!
Ok. It might be a bit longer. I am running into a issue with the select between two tables that are not the same makeup, but I can solve soon.
@mcdeimon Ok... I realized I was doing the wrong thing. I didn't need a UNION just an EXISTS on the other table... I did a quick test on my test clone and deleted a user without deleting points and it seems to work. Please test the 1.7.3 on the Github and let me know if it works as you have more users than I do in my test server.
Now the numbers of the rank are shown well!!!
The rows and the bootstrap still do not work. All users with points appear on the same page.
And with [vyps-pl rows = 25] it works perfectly. The problem is only with pb
Ok. Good to hear it fixed the rank numbers.
Actually, I see why its not limiting. I commented out the pagenation part for some reason. I'll have to figure out why I did that and see if I can get it working again. Or at least show the top 25 etc.
I've messing around with rows=3
and it does not work at all. Investigating why.
I think I know the issue. We are looking at $rank_order_array_count
rather than $table_row_limit
For some reason I had commented out the following:
//for ($x_for_count = $table_range_start; $x_for_count >= $table_range_stop; $x_for_count = $x_for_count - 1 ) { //I'm counting backwards. Also look what I did. Also also, there should never be a 0 id or less than 1
I got this work (somewhat). At least the rows=something
works now. By default its 50 but its better than 5,000 on a leaderboard. I feel this is worth a push to the WP SVN repo rather than just GitHub
Hi Felty!
I have used this shortcode [vyps-pb pid=2] and the numbering of the users in the list is not correct.
The first user starts with the number 7, the next 8, 9, and we jump to 18
It would also be nice to be able to limit the number of users in the list. For example 25 or 50.