Discourse Gamification

:discourse2: Summary Discourse Gamification adds customizable scoring (karma, kudos, points) and leaderboards to your instance.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-gamification
:open_book: Install Guide How to install plugins in Discourse

Features

While Discourse ships, out of the box, with gamification features (badges, trust levels) some communities want to take it to another level. That’s where GitHub - discourse/discourse-gamification comes in.

This plugin allows admins to easily create and tweak community scoring contests, where points are awarded by participating in the community.

Points are automatically updated every 5 minutes for events of the day, and we re-calculate scores from the last 10 days once a day.

Cheers

Users are awarded “cheers” by performing certain actions on the community. Each user cheer score appear on their user card, user profile and can be enabled on the user directory.

user card example with cheers

Like the plugin but the name cheers isn’t the best for your community? You can rename it to anything using Customize all text in Discourse.

Leaderboards

Admins can create multiple leaderboards, and each one can have a custom:

  • start date
  • end date
  • Competing users
  • Leaderboard privacy

By default, we ship with a default leaderboard at /leaderboard that will list all users from the first day where scores started to be awarded.

You can see a demo of it at Discourse Meta

Scorables

Currently, the following events award cheers:

See roadmap for upcoming scorables.

Score backfill

If you want to retroactively award scores you can run the following task:

rake gamification_scores:backfill_scores_from[2000-01-01]

This took under 1 minute to run on Meta for a 10+ years backfill, so it should be quite safe to run on large instances.

If you are using our hosted service for your community contact our support to run a backfill task for you.

Configuration

Global customizations are:

  • each action score multiplier
  • Restrict categories where points can be earned
  • enable and disable the plugin

Those plugin-level settings live at /admin/site_settings/category/plugins?filter=plugin%3Adiscourse-gamification.

To create, delete and update leaderboards, admins can visit /admin/plugins/gamification.

Changelog

  • 2022-05-02T03:00:00Z - Public Release
  • 2022-05-10T05:00:00Z - Update roadmap with recent changes

Roadmap

(roughly ordered)

  • Fix i18n table title in custom score column on user directory

  • Ignore staged users

  • Ignore anonymized users (email match @anonymized.invalid)

  • Style leaderboard edit form

  • Leaderboard “you” link needs a larger offset to accommodate floating header…

  • Fix highlight of own user on the leaderboard not working if own user position is > 100

  • Add i18n thousands separator to user card / profile cheer score

  • Make leaderboard respect prioritize usernames in ux being disabled

  • Add time period filters to leaderboards

  • Add default time period filter to leaderboard settings

  • Add excluded_groups_ids to leaderboard settings

  • Use higher resolutions avatars in leaderboard podium

  • Add custom per-badge scoring

  • Allow admins to award/remove arbitrary points to users to allow integration with out-of-Discourse scorable events

  • Add per-reaction score awarding (requires Discourse Reactions - Beyond Likes)

  • Add chat-events scoring (requires Introducing Discourse Chat (BETA))

  • Add poll events scoring (created poll, voted in poll)

  • Add media events scoring (posted image, posted video, posted onebox)

66 Likes

Hi, how are we with these two features? Anytime soon or not really?

An unrelated question: Is the Leaderboard easily accessible through a menu item and not just the url? I couldn’t find it.

3 Likes

Since there are no enterprise customers sponsoring those features they are in the back burner.

We plan to add it to the hamburguer menu soonish, but since we are redoing the whole Discourse hamburger menu soonish we may as well wait on it. In the meanwhile admins can make the leaderboard accessible via pinned topics or customizations.

3 Likes

When something is on the back burner how long does it take for it to be implemented?

2 Likes

There is no time limit can be a week or a decade. Depends on how many projects were working on.

6 Likes

Does “sponsoring” here mean paying extra for it? Asking for a friend… :joy:

6 Likes

I think you could add it to the menu using Custom Hamburger Menu Links.

5 Likes

Probably not. My guess is that an enterprise customer just needs to send an email supporting it.

3 Likes

Is there a way to customize the leaderboard? We’d like to see it without the top three as “bubbles” and just to see them in the list with everyone else.

2 Likes

It does mean paying for it, yes. We have a tonne of work on, so we prioritise anything that a customer financially sponsors. That jumps it to the front of the queue, otherwise it stays in place on the roadmap. In this particular case it’s in the bucket of “work that we will get to once we have the resources freed up” so we don’t have an ETA.

For full context, we also prioritise work that is frequently asked for by non-Enterprise customers, or by Enterprise customers that don’t have budget to sponsor. That doesn’t mean it gets to the front of the queue, just that it gets moved further up the list.

8 Likes

It would be cool if there was a bounty system with gamification similar to bounties on Stack exchange. I remember there being a topic about bringing attention to a topic and there was no solution to it for normal users but this could be the solution.

4 Likes

Sounds great. If possible, an HTML snippet to reproduce the leaderboard (like a list with 5 rows) in other contexts would be nice, like when using versatile banner or a sideblock component or left/right block themes… a bit similar to the campaign banner on the subscriptions plugin? Well, you can always wish. :sweat_smile:

5 Likes