Idee/Suggestie voor een optie: toon ook de huidige ranglijstpositie

AI-generated summary

In a feature discussion titled ‘Idea/Suggestion for an option: Display additionally current Leaderboard Rank’ under the gamification category, jrgong proposed enhancing the leaderboard plugin to show users’ current rank in their user card, with an optional setting to only display top X users to avoid discouraging lower-ranked participants. They also suggested adding customizable CSS classes for user profiles. NateDhaliwal noted that this could be implemented via a Theme Component, referencing the JSON endpoint for leaderboard data (e.g., https://meta.discourse.org/leaderboard/1.json). NateDhaliwal later shared a working solution at https://meta.discourse.org/t/usercard-show-leaderboard-rank/378735. chapoi joked about Nate’s speed, then chapoi confirmed they also built the same solution, calling it potentially overkill but useful for now, while keeping the feature request open for possible future core integration. NateDhaliwal responded with enthusiasm, calling the related images ‘really great!’ The discussion reflects community collaboration to implement a gamification enhancement via theme components while leaving room for future official support.

Hallo jongens,

We testen de leaderboard-plugin en tot nu toe is hij erg netjes!

Maar op basis van onze feedback en die van gebruikers, wilden gebruikers hun huidige leaderboard-ranglijst in hun gebruikerskaart zien.

Om gebruikers met lagere rangen niet te ontmoedigen, moet er ook een optie zijn om alleen de ranglijst van de top X-gebruikers weer te geven, waarbij X kan worden geconfigureerd in de plugin-instellingen.

Bewerken: het zou ook fijn zijn om extra CSS-klassen te hebben in de HTML-uitvoer voor aanpassing in gebruikersprofielen, net als in de gebruikerskaarten. Cheers HTML-uitvoer.

Gedachten?

1 like

This may be able to be done via a Theme Component.

Leaderboard data can be grabbed as a json. For example, https://meta.discourse.org/leaderboard/1.json returns the top 93 users by the ‘Monthly’ period; the default for this leaderboard (the one excluding Discourse Staff is defaulted to ‘Today’).

@jrgong Made here:

How on earth are you faster to post this than me posting it?! :sweat_smile:

3 likes

:sparkles: Related topics is really great!

Anyway, came here to say, yes I made it (Usercard: show leaderboard rank) but it’s probably a bit overkill, and we could keep the feature topic open in case we just allow this via core at some point later.

But, best I could do! Hope you like it (and that it works hehe)

3 likes