⚠️ Before we begin…
Pockets, and their associated widgets, represent our classic design experience. For a more streamlined experience, with deeper layout customization and expanded widget capabilities, we recommend upgrading to our Layout Editor.
📝 NOTE: Pockets only display in legacy layouts, and will not function in Layout Editor layouts.
This article describes adding and using the Leaderboard widget for Pockets. A more feature-rich version of this widget is available in Layout Editor:
Overview
The Leaderboard widget is a great way to showcase the top contributors in your Higher Logic Vanilla (Vanilla) community. These are the users who have earned the most activity-based points during a selected time period (daily, weekly, and monthly) as well as your all-time point earners!
✔️ TIP: This widget is a good tool for "nudging" other users to become more engaged in community activities.
📝 NOTE: The Leaderboard widget is available only if the Badges addon is enabled.
To learn about the Badges addon, see:
Earning points
Your Vanilla community members can earn points in a number of ways, including:
- positively reactions to their posts
- answering other members' questions
- having their answers accepted (if this option is enabled in Q&A settings)
- receiving badges
To learn about setting up a point-awarding program to reward your community's top contributors, see the knowledge base articles in:
Leaderboard widget settings
This widget can be used in a variety of places across your community site. Before placing a Leaderboard widget, it is important that you:
- Set the number of users to display and
- Choose which timeframe (daily, weekly, monthly, all-time) the widget displays.
Leaderboard list resets
The Leaderboard widgets check the database for users' point totals and then reset the lists in order to ensure that the leaderboards remain current. The resets occur every:
- Day for the Daily leaderboard,
- Monday for the Weekly leaderboard, and
- First day of the month for the Monthly leaderboard.
📝 NOTE: The All-Time leaderboard updates every time the page is loaded and displays the leader list accordingly.
Default Leaderboards on the Activity page
By default, two Leaderboard widgets ("leaderboards") display on your site’s Activity page.
- This Week's Leaders lists the users who have earned the most points in the past week.
- All Time Leaders lists the users who have earned the most points since the inception of your community.
⭐️ EXAMPLE: Members can see examples of these leaderboards on our Success Community, .
Leaderboard widgets on other pages
Leaderboard widgets can be placed on other pages in your community. How you do this depends on which theme you are using. Refer to the appropriate section below to learn how.
- Leaderboard Widgets in the Foundation Theme
- Leaderboard Widgets in Legacy Themes
Leaderboard widgets in the Foundation theme
In the Foundation theme, leaderboard widgets can be added via Pockets and have two view options: List and Grid.
List view
Grid view
To add and configure a Pocket:
1. Navigate to Dashboard > Settings > Pockets.
2. Click the Add Pocket button.
3. Specify a Name for your pocket.
4. Select either LeaderBoard (List) or LeaderBoard (Grid) as the Type.
5. Select a Timeframe and a Limit for the widget.
6. Click Save.
7. Click the Placement & Conditions tab to target an audience and/or area of the community as described in working with pockets.
✔️ TIP: Be sure to test the widget in various locations on your staging site to decide where it looks best; then set it up on your production site.
Leaderboard widgets in Legacy themes
Leaderboards can be added to other pages in your community using the module code:
{module name="LeaderBoardModule" SlotType="w"}
You can set the leaderboard for different timeframe with the SlotType
variable that is shown above.
SlotType="w"
produces the Weekly leaderboardSlotType="m"
produces the Monthly leaderboardSlotType="a"
produces the All Time leaderboard
The following code can be added right after {asset name="Panel"} in your theme:
{if !InSection ("ActivityList")}
{module name="LeaderBoardModule" SlotType="w"}
{/if}
Additional widget options
Exclude admins and moderators
You can choose to exclude administrators and moderators from your leaderboards so that they more accurately reflect user activity.
To set widget exclusions:
1. Navigate to Dashboard > Settings > Addons.
2. Scroll down to Badges and click the settings icon.
3. Make a selection from the Exclude users from leaderboards option.
4. Click Save.
Widget display settings
The widget and its contents inherit their properties from the Global Styles settings in Theme Editor. These settings determine the appearance of the widgets on your Vanilla community pages.
📝 NOTE: Currently, it is not possible to format (i.e., change the properties) the widget elements individually.
The widgets in your Vanilla community inherit most of their properties from the Global Styles settings. Some examples of this that are on several widgets are:
- Background color is inherited from the Background setting.
- Title, Description, and article link colors are inherited from the Text setting.
- View All link and username link colors are inherited from the Links setting.
- Subtitle and hover-over colors are inherited from the Brand Color setting.
Theme variables
If you have a technical resource to implement theme variables, you can customize other elements, such as:
- Borders and border radius
- Background color
- Title background color or image, font, spacing, and alignment
- Count color and font
- Item spacing
- Username color, alignment, and font
- Username margins
- Photo (avatar) size
Access the following article and click the Leaderboard dropdown to expand the section and access the variables.
https://success.vanillaforums.com/activity