User Reputation Next To Username (Junior Member, Senior Member, etc)

Hi Everyone,

We were trying to build a plugin which would show the trust level of the user next to their name within topics. So that all users have a sort of reputation badge next to their name.

Since there is already the title field available which lets the user select the badge, one solution would be to select an option by default (and the highest ranked badge if there is more than one option).

So a basic member would have the title selected by default and have a ‘basic’ next to their username. Which brings me to my questions:

  1. How can I expose the trust_level attribute of a user to the attributes in the post widget?

  2. Can I programmatically set a title field based off the trust level?

Thanks!

3 Likes

The Custom Groups have a setting which allows us to automatically add users who register with an email from a domain name that you can specify as an admin. Since many don’t use this setting, I wanted to add a plugin that uses this job to instead sync the group with a related trust level group. For example, the ‘Basic’ group would check for users from the ‘trust_level_1’ group.

Having groups synced like this would allow us to set them as primary, which would let the users be styled within topics (Senior Member, Junior Member, etc). Are we approaching this the right way?

The code is at:

https://github.com/discourse/discourse/blob/9d8db11cf3162241d9828b8fd48cce96854f8863/app/jobs/regular/automatic_group_membership.rb

This is much required. On every post we can show the trust level or reputation of the user. This is very helpful to improve engagement on the forum as most of all other forum have this system.

I would be first to install your plugin. Keep up the good work.

2 Likes

Plugin created - See:

2 Likes