Is it possible to somehow manually reset or rewrite the Leaderboard URL? In our case we tested some leaderbaords, deleted them later.
E.g. /leaderboards/5 to /leaderboards/1.
Is it possible to somehow manually reset or rewrite the Leaderboard URL? In our case we tested some leaderbaords, deleted them later.
E.g. /leaderboards/5 to /leaderboards/1.
Is it possible to award points to a user as an extra reward? ![]()
You may want to see:
which has this curl request inside:
curl --location 'https://my.discourse.com/admin/plugins/gamification/score_events' \
--header 'Api-Key: <your key>' \
--header 'Api-Username: <your username>' \
--header 'Content-Type: application/json' \
--data '{
"user_id": "101",
"date": "2024-05-15",
"points": "-141",
"description": "Gamification point adjustment"
}'
I enabled this plugin in admin, but the leaderboard tab did not automatically appear. I also added new leaderboards, but they did not show up. Why is this happening? Where should I look for these leaderboards?
I think you have to add them to the sidebar yourself
. The leaderboards are at /leaderboard, /leaderboard/2, /leaderboard/3 etc.
Is it possible to create a leaderboard for a specific category or tag?
Leaderboards are tied to groups. But you can specify which categories affect all the leaderboards in the gamification settings. Seems like an interesting idea to move that to the leaderboard, to for example have a Support leaderboard here in this community.
2 posts were split to a new topic: Reducing points for flagged users
Is there a way for me to exclude myself from the rankings?
yes add yourself to a new group (call it ‘leaderboard-exclusion’ or something) and then exclude the group in the plugin settings.
edit: this will also easily allow you to exclude anyone else if you so wish at some point, by adding them to the same group. ![]()
Thank you so much. That makes sense.
After I upgraded to version 2026.1.0, I created a monthly leaderboard, and then accessing the following route caused an error:
http://localhost:4200/admin/plugins/discourse-gamification/leaderboards
The error is as follows:
assert.js:40
Uncaught (in promise) Error: Assertion Failed: You attempted to update `_value` on `TrackedStorageImpl`, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.
`_value` was first used:
- While rendering:
{{outlet}} for -top-level
-top-level
{{outlet}} for application
application
DiscourseRoot
{{outlet}} for admin
admin
{{outlet}} for adminPlugins
admin-plugins
{{outlet}} for adminPlugins.show
show
AdminPluginConfigPage
AdminPluginConfigArea
{{outlet}} for adminPlugins.show.discourse-gamification-leaderboards
adminPlugins.show.discourse-gamification-leaderboards
{{outlet}} for adminPlugins.show.discourse-gamification-leaderboards.index
discourse-gamification-leaderboards
DPageSubheader
(result of a `unknown` helper)
Stack trace for the update:
at TrackedArray._dirtyCollection2 (array.ts:163:13)
at Object.set (array.ts:126:15)
at Proxy.sort (<anonymous>)
at AdminPluginsShowDiscourseGamificationLeaderboardsIndexController.sortedLeaderboards (index.js:23:1)
at AdminPluginsShowDiscourseGamificationLeaderboardsIndexController.<anonymous> (handle-descriptor.js:67:17)
I located the problematic file as follows:
plugins/discourse-gamification/admin/assets/javascripts/discourse/controllers/admin-plugins/show/discourse-gamification-leaderboards/index.js
Specific code:
@discourseComputed("model.leaderboards.@each.updatedAt")
sortedLeaderboards(leaderboards) {
return (
leaderboards?.sort((a, b) => compare(b?.updatedAt, a?.updatedAt)) || [] // line 22
);
}
The reason for the error is:
Ember.js (or more accurately, the Glimmer tracking system) assertion error in reactive state management. The core reason is: within the same computation cycle, you first read a tracked (tracked state) value, and then attempt to modify that value. This “use then update” operation can lead to logical confusion, infinite loops, or performance issues, so Ember directly prohibits this behavior.
Key issue:
Array.sort() modifies the original array in place, which updates the @tracked leaderboards state.
The responsibility of a computed property (sortedLeaderboards) is to derive a new value, not to modify the original state; it should itself be a “pure function” (no side effects, does not modify the input source).
Here is the fix:
@discourseComputed("model.leaderboards.@each.updatedAt")
sortedLeaderboards(leaderboards) {
return (
//leaderboards?.sort((a, b) => compare(b?.updatedAt, a?.updatedAt)) || []
leaderboards?.slice().sort((a, b) => compare(b?.updatedAt, a?.updatedAt)) || []
);
}
Screenshot after fixing:
And this kind of similar issue doesn’t seem to be an isolated case. I suspect it’s an incompatibility issue caused by the emberjs upgrade. However, many places in plugins haven’t been modified to keep up with the upgrade, as this work is not as simple as it sounds.
Question: Is there a delay as to when points are awarded. For example, new users are doing point paying things, like posting a new topic or giving a like, but their scores don’t show up. I have trust level 0 included in the settings, so I am assuming it’s just a delay in assigning points? If so, how often does it calculate and update? Thank you!
I would like to revisit this idea. For now I’ve locked the leaderboards to 1 category but this being moved to an individual leaderboard would be better.
That is something we really wanna do, just a matter of finding time to do it or getting a customer to sponsor the effort.
Hi there,
I created a new leaderboard, but it wiped the settings from my original leaderboard.
Is there a way to see select which leaderboard my users see front end?
사용자가 직접 정의한 이벤트로도 포인트를 지급할 수 있으면 좋겠습니다. 예를 들어, 저는 Discourse Points Mall 플러그인을 저희 모더레이터, 그리고 어쩌면 커뮤니티 멤버들에게도 사용할 계획입니다. 이를 통해 Discord에서의 활동에 대한 보상을 지급하고, 향후에는 게임 내에서도 보상을 지급할 수 있을 것입니다.
수동으로 포인트를 지급하는 방식이거나, 사용자가 입력해야 하는 리디머 코드 형태로 작동할 수 있을 것 같습니다. 이 플러그인의 범위가 Discourse 내부의 상호작용에 더 초점이 맞춰져 있다는 점은 이해하지만, 그 범위를 넓힐 수 있다면 좋겠습니다. 제 사용 사례처럼 Discourse는 저희 생태계의 일부일 뿐, 유일한 목적지가 아니기 때문입니다.
수정: 위에서 언급한 기능들을 API를 통해 구현할 수 있는 방법들이 있다는 점은 알고 있습니다. 하지만 그러한 방식들은 외부 소스를 위해 더 최적화되어 있다고 생각하며, 포인트 지급이 가능할지라도 네이티브로 지원되는 기능이 있다면 더 좋다고 생각합니다 ![]()
외부 시스템과 Discourse 게이미피케이션 통합하기 (포인트 사용 및 부여) 글을 확인해 보셨나요?