Usercard: toon ranglijst

AI-generated summary

The discussion revolves around a theme component called ‘Usercard: show leaderboard rank,’ which adds the leaderboard rank to the usercard, complementing the existing cheers display. chapoi introduced the component, providing a repository link and installation instructions, noting it’s a minimal addition that mirrors the global leaderboard rank. The component includes three settings, with a default rank of 1 if no ID is specified. jrgong suggested integrating the rank into the same section as cheers, formatted like ‘Cheers: 1234 (:military_medal: #3),’ but chapoi explained this isn’t feasible due to differing data connectors in core. NateDhaliwal commented on a related discovery about URL parameters, and chapoi offered help with CSS workarounds for the suggested layout.

:information_source: Summary Tiny component to add the Leaderboard Rank to the usercard
:hammer_and_wrench: Repository repo
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

The usercard already shows the amount of cheers, so this component makes a small addition to also show the rank:

The word “Rank” is taken from the leaderboard itself, so if you change it globally it will reflect so here.

Settings

Only three settings:

If no ID is chosen it will default back to 1.

Hoping this wins the award for “Lowest Impact Theme Component Ever” :trophy:

8 likes

That was fast :smiley:

What are you thoughts to display it inside the same div as the “Cheers” score instead of a separate div?

so that it looks like this:

Cheers: 1234 (:military_medal: #3)

(As Icon, maybe something FA5 more related to the leaderboard + the content inside () links to the leaderboard as well)

2 likes

Cool gedachte, maar volgens mij een heel ander verhaal. Nu plaats ik het via een connector, terwijl de cheers vanuit een andere connector in de core komen. Voor zover ik weet niet mogelijk, tenzij we het via de core in dezelfde connector doen.

Ik heb vandaag ook iets nieuws geleerd - dat de periode kan worden gewijzigd door argumenten aan de URL toe te voegen.

Geweldige TC!

1 like

thx for the explanation!

Then I guess, I will have another round of CSS workarounds then :smiley:

Let me know if you need help, I’m reasonably sure it’s doable

2 likes