Plugin Setup

Author: Noor 147 views

Plugin Setup

Once the plugin is installed and enabled, you will need to go through and save your desired setup. To do this, you need to go to your BuddyPress Settings page in your wp-admin area. Here you will find a new “Leaderboard” tab which will take you to the plugins settings page.

Default Setup

There is two ways the plugin can operate. You can either enforce one setup on all groups or let your BuddyPress Group admins setup leaderboards themselves. In either case, you are required to set a default setup.

This includes what point type or types to create leaderboards for, the size of the leaderboard, the option to append the current user and the leaderboard type (as of version 1.1).

Sizes

The size of the leaderboard refers to the number of users to include in the leaderboard. The larger the size, the more resources will be required in order to query the leaderboard. For this reason, the plugin, by default has a limit of maximum 50 users being shown in a leaderboard. You can change this using the MYCRED_BP_GROUP_LEAD_MAX_SIZE constant.

 

Appending Users

If the user viewing the leaderboard is not in the size you set, you can select to append them to the end with their position.

 

This will only be applicable to those who are a member of the group, are logged in and are not excluded from the point type the leaderboard is based on.

Leaderboard Types

As of version 1.1 you can select what type of leaderboard you want to generate. The plugin supports 6 different types of leaderboards:

This is what previous versions were offering and is based on members current balance.

This will generate a leaderboard based on a users total balance. Total balances are calculated by adding up all point gains a user has then deducting any manual adjustments an admin might have made.

This will generate a leaderboard based on members total accumulated points today. This is done by adding up all point gains and losses from the beginning of each day until now.

This will generate a leaderboard based on members total accumulated points this week. This is done by adding up all point gains and losses from the the start of each week until now. Resets each week.

This will generate a leaderboard based on members total accumulated points this month. This is done by adding up all point gains and losses from the start of each month until now.

This option allows a leaderboard creation between two dates. When this option is selected, two hidden fields will become available where you can set the start and end date. These dates must be well formatted either YYYY-MM-DD or MM/DD/YYYY.

Override

Once you have selected the leaderboard type, you need to decide if these settings should be applicable to all groups or if you want to let admins create their own setups.

 

If admins are allowed to setup their own leaderboards, they will be able to do this in their Groups admin area in BuddyPress.

The Menu

Finally we need to setup the BuddyPress navigation. This includes the title shown in the menu, the URL slug for the leaderboard page and the menu position. The URL slug must be unique to prevent conflicts with other BuddyPress group pages!

 

Remember to always save!