I am new to the Ask Fedora Discourse instance and as such realized that Discourse by itself provides the users with Discourse badges. Since these badges are also kind of achievement based in nature, I couldn’t help but wonder if these badges are somehow connected to the Fedora Project Badges (https://badges.fedoraproject.org)?
If yes:
Where can I find the details about this?
If no:
Why not? Wouldn’t it be better to be able to track all types of badges in a single place?
I think that someone should study Discourse badges implementation, study how Fedora Badges work, and find a way to bridge these systems.
And nobody volunteers to accomplish this task.
I can volunteer to look into it as I already have some understanding of how Fedora Badges work. However, I would still have to look into how Discourse badges work to check if this is feasible to be done.
Please also note that we do not host Discourse and so cannot make additions to it to emit signals/messages that are generally required for automation in Fedora badges.
Apart from @FranciscoD point out, automatic discourse Badged are disable by default and only can be enable by discourse staff, because Discourse leave in a container, is a bad SQL is executed, that affect the performance off all discourse instance in the same Container…
Apart from this too… we suppose we are a GOOD SQL person… and a GOOD Ruby Developer…
PROS Althought Discourse has a good gamification system but a plus is always Welcome
CONS That all, is nothing to mention
By Group
Custom Badged (Injecting SQL Queries) :
Manual
PROS Obviosly
CONS
For Technical decision discourse voted for disable this option by default in Hosting service by upstream but is still available for Hosted by your own. Why this decision? because Discourse live on a Container if you execute a BAD SQL stament affect the performance for all forum in the same container.
In our Case, if We would like to extrapolate Some badged from Fedora Badged System:
1 your first accept answer
10 your 10 accept answer
40 your 40 accept answer
100 your 100 accept answer
500 your 500 accept answer
Need to Contact Discourse Support badge-sql-can-no-longer-be-edited-by-default and procedure How to Enable, if you a set of three commands, and You can safely disable badge SQL after authoring your required badges for extra safety.
Example of Step 2.
> # A badge for 10 accepted answers
SELECT id user_id, current_timestamp granted_at
FROM users
WHERE id IN (
SELECT p1.user_id
FROM post_custom_fields pc
JOIN badge_posts p1 ON p1.id = pc.post_id
JOIN topics t1 ON p1.topic_id = t1.id
WHERE p1.user_id <> t1.user_id AND
name = 'is_accepted_answer' AND
value IS NOT NULL AND
p1.user_id IN (
SELECT user_id
FROM posts
WHERE :backfill OR p1.id IN (:post_ids)
)
GROUP BY p1.user_id
HAVING COUNT(*) > 9
)
Show badge on the public badges page and Enable badge
You can test it in SQL Data Explorer Plug-in… and test the performance
Need someone from Fedora Project to contact Discourse Support, and talk about it.
In general, if it isn’t something we admins can do using the admin panel, we’re probably not going to do it. We want to avoid contacting discourse support and working with sql etc on the server side. That was one of the primary reasons that we decided to pay for a hosted solution rather than hosting it ourselves on Fedora infrastructure (askbot was on Fedora infra for a long time and it’s maintenance frankly took more work than the community could manage).