This extension makes it possible to find the top points earners in a given period of time.
Admins can find the top users for any period of time on the WordPoints » Top Users admin screen. The top users for a period can also be displayed on the front end of the site using widgets or shortcodes.
The extension comes with two different widgets: one for fixed periods, and the other for dynamic periods.
The widget for fixed periods allows you to choose a date in the past, and display the users who earned the most points between then and the present (or between that first date and a second date that you choose). The date is fixed, meaning it will not update automatically, you would need to change it manually. This can be useful for displaying the top users from last month, for example. Or to display the users that have earned the most points since a specified date.
In many cases though, you want the start and end of the period to automatically update as time goes by. This feature is provided by a second widget, that displays the top users for a dynamic period.
Using this widget, you can, for example, show the top 5 users in the last hour. Or, you could display the top users in the last two months.
You also have the option of having the period be calculated relative to the calendar, instead of relative to the present. Displaying the users from the last hour relative to the present means that the top users will be displayed from the last 60 minutes. But you could also show the top users from the current hour relative to the clock, so that if it was 4:35, only points earned since 4:00 would be counted, instead of points earned since 3:35, one hour ago. The same thing can also be done with other period lengths (weeks/months/etc.). You can display the top users from the last month, which would be the last 30 days. But you could also display the top users from the current calendar month, so that if it was April 9th, the points earned since the start of April 1st would be counted, instead of the points since March 9th, one month ago.
The extension also includes two shortcodes, so that you can display the same thing within any post or page. The shortcodes have all of the same features as the widgets.
This will show top 5 users from the current calendar day:
[wordpoints_top_users_in_period units=days length=1 relative_to=calendar users=5 points_type=points]
This will show the top users 5 in the last 2 weeks:
[wordpoints_top_users_in_period units=weeks length=2 relative_to=present users=5 points_type=points]
As you can see,
relative_to can be either
units can be
Also, for a fixed period between two dates:
[wordpoints_top_users_in_fixed_period from=2017-01-01 to=2017-03-01 users=5 points_type=points]
You can also use
to_time to give the hours. For example,
from_time=07:00, for 7 o’clock in the morning.
- WordPoints: 2.3.0+
PHP version 5.5+ is also highly recommended, for proper handling of timezones.