Top Poster Statistics Widgets+Contest Winner+Page Of Day-Week-Month

Top Poster Statistics Widgets+Contest Winner+Page Of Day-Week-Month 2.1.0

No permission to download
Thanks I used this combination as it stands out

Code:
.userBanner.bannerStaff {
background-color: #f9ecb6;
border-color: #ffcb05;
color: #990000;
}

Capture87.webp
 
Last edited:
Would the following additions be possible.
  1. Exclude usergroup - All our members use the Registered Usergroup as their default including Admin. We would like to exclude admin from this as they would always be the top posters. This does not help promoting the members to post more to get this award.
  2. If possible it would be nice to be able to announce the winner each month in a selected thread.
 
Posts in forums with "Count messages posted in this forum toward user total" disabled seem to still be counting towards their total.

Take alook at my current top poster "Snake": http://appinvasion.com/forums/

You can see that in your widget it shows he has 800+ posts but if you click into his profile his actual total message count is only 100+.

This was a feature suggested a while ago but was never implemented.
 
Hello Gang,

I'm kind of losing patients with this add-on... The fist month I added this, it reset the count at an odd time on the last day of the month. @Aayush was kind enough to try to fix the problem in crons and we tested the servers local time and it is the same as my local time. Between then and the next month (April) I installed a new theme/style. On the last day of April it reset the count again at 5 PM PST (local time). I figured the crons got reset when I installed the new them so I went in and changed the crons. When I went in and changed the time in the crons I noted it didnt reflect the correct time in the "Cron Entries" list, so I adjusted the dials until the time was correct in the "Cron Entries" list. At 5 PM PST (local time) today it reset the monthly count again even though the "Cron Entries" list shows Top Poster Of Month Winner Declaration Next Run: Jun 1, 2014 at 12:01AM. It is currently 5:27 PM PST (local time), May 31, 2014.

This is a big problem when I'm running contests and the members are running a close race. When it ends too early it can cause a big problem when trying to decide the winner. Can someone please explain how I can get the counter to reset at my local time?

Many Thanks,
Nick

Cron Entries List Screen Shot
Screen Shot 2014-05-31 at 5.36.21 PM.webp


Edit Cron Entry: Top Poster Of Month Winner Declaration Screen Shot
Screen Shot 2014-05-31 at 5.36.00 PM.webp
 
I generally prefer the top 10, but my members are asking for a top 50 list for the prior month. I can set it to display 50 on the main page but not any previous months. Is there a way to get that setting to carry over?
 
I generally prefer the top 10, but my members are asking for a top 50 list for the prior month. I can set it to display 50 on the main page but not any previous months. Is there a way to get that setting to carry over?

You'll have to do a hard reset of cache. You can either unselect a user group checkbox and press save and then reselect it again and hit save again. This would reset all the cache from the previous months and you'll have your list of 50 users for all the months.
 
Hello Gang,

I'm kind of losing patients with this add-on... The fist month I added this, it reset the count at an odd time on the last day of the month. @Aayush was kind enough to try to fix the problem in crons and we tested the servers local time and it is the same as my local time. Between then and the next month (April) I installed a new theme/style. On the last day of April it reset the count again at 5 PM PST (local time). I figured the crons got reset when I installed the new them so I went in and changed the crons. When I went in and changed the time in the crons I noted it didnt reflect the correct time in the "Cron Entries" list, so I adjusted the dials until the time was correct in the "Cron Entries" list. At 5 PM PST (local time) today it reset the monthly count again even though the "Cron Entries" list shows Top Poster Of Month Winner Declaration Next Run: Jun 1, 2014 at 12:01AM. It is currently 5:27 PM PST (local time), May 31, 2014.

This is a big problem when I'm running contests and the members are running a close race. When it ends too early it can cause a big problem when trying to decide the winner. Can someone please explain how I can get the counter to reset at my local time?

Many Thanks,
Nick

Cron Entries List Screen Shot
View attachment 74892


Edit Cron Entry: Top Poster Of Month Winner Declaration Screen Shot
View attachment 74891

So there is no way to set the end/start time? The counter starts over at the same time every month regardless to the cron set time?
 
So does this mean I'm doing something wrong, being ignored, or asking for something that is impossible? Can we not agree that being able to set the start and finish time is important? Also I paid for the branding removal because I thought this add-on worked. Now after a few months I see that the cron entry doesn't control the start and finish time. What does? No matter what time it's set to it restarts the last day of the month at 5pm
 
How can I exclude a user?
I have Shoutbox user Bot that archive chat message every 6 hours.
Thanks!
 
Hopefully you can add a new feature that we can set a different limit for Number of Users in Leaderboard Widget and Number of Users in Leaderboard Full Page.
Thanks!
 
When a forum's "Count messages posted in this forum toward user total" option is disabled does the addon still count messages posted in that forum toward user's total?

Posts in forums with "Count messages posted in this forum toward user total" disabled seem to still be counting towards their total.

Take alook at my current top poster "Snake": http://appinvasion.com/forums/

You can see that in your widget it shows he has 800+ posts but if you click into his profile his actual total message count is only 100+.

This was a feature suggested a while ago but was never implemented.

For those of you who have that option disabled for that forum and don't want those posts to be counted towards the total, you need to change the sql query in the following file:

In file Model\PostOfMonth.php starting at Line 128 and Line 189, replace
Code:
$sql = "SELECT *, count(xf_post.username) as c
                        FROM xf_post
                        INNER JOIN xf_user
                        ON xf_post.username = xf_user.username
                        WHERE xf_post.post_date > '".$currentMonth."'
                            AND xf_post.post_date < '".$nextMonth."'
                            AND xf_user.user_group_id IN (".$sql_in.")
                        GROUP BY xf_post.user_id
                        ORDER BY c DESC
                        LIMIT ".$options->ls_number_of_leaderboard_users;

with

Code:
$sql = "SELECT xf_post.*, count(xf_post.username) as c
                    FROM xf_post
                    INNER JOIN xf_user ON xf_post.username = xf_user.username
                    INNER JOIN xf_thread ON xf_post.thread_id = xf_thread.thread_id
                    INNER JOIN xf_forum ON xf_thread.node_id = xf_forum.node_id
                    WHERE xf_post.post_date > '".$currentMonth."'
                        AND xf_post.post_date < '".$nextMonth."'
                        AND xf_user.user_group_id IN (".$sql_in.")
                        AND xf_forum.count_messages = 1
                    GROUP BY xf_post.user_id
                    ORDER BY c DESC
                    LIMIT ".$options->ls_number_of_leaderboard_users;

and on Line 254, replace
Code:
$sql = "SELECT *, count(xf_post.username) as c
                        FROM xf_post
                        INNER JOIN xf_user
                        ON xf_post.username = xf_user.username
                        WHERE xf_post.post_date > '".$currentMonth."'
                            AND xf_post.post_date < '".$nextMonth."'
                            AND xf_user.user_group_id IN (".$sql_in.")
                        GROUP BY xf_post.user_id
                        ORDER BY c DESC
                        LIMIT ".$number;

with

Code:
$sql = "SELECT xf_post.*, count(xf_post.username) as c
                    FROM xf_post
                    INNER JOIN xf_user ON xf_post.username = xf_user.username
                    INNER JOIN xf_thread ON xf_post.thread_id = xf_thread.thread_id
                    INNER JOIN xf_forum ON xf_thread.node_id = xf_forum.node_id
                    WHERE xf_post.post_date > '".$currentMonth."'
                        AND xf_post.post_date < '".$nextMonth."'
                        AND xf_user.user_group_id IN (".$sql_in.")
                        AND xf_forum.count_messages = 1
                    GROUP BY xf_post.user_id
                    ORDER BY c DESC
                        LIMIT ".$number;

If you want to exclude usergroups in the options, I believe you simply change the code above:

Code:
AND xf_user.user_group_id IN (".$sql_in.")

to

Code:
AND xf_user.user_group_id NOT IN (".$sql_in.")

Didnt test the exclude part though.

Then reset cache by saving the list of usergroups again in Options area and run the cron job manually. Enjoy =]
 
Last edited:
Top Bottom