# Is it possible to display only one trust level badge on the user card?

**URL:** https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714
**Category:** Support
**Created:** [2015 年 4 月 17 日午後 9:33 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714 "2015-04-17T21:33:13Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2015 年 4 月 17 日午後 9:33 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/1 "2015-04-17T21:33:13Z")

</div>

If a user has TL4 badge, I’d like their user card to not also show the TL3, TL2, TL1 badges.  
If a user has TL3 badge, I’d like their user card to not also show the TL2, TL1 badges.  
If a user has TL2 badge, I’d like their user card to not also show the TL1 badges.

Is there a way to make this happen?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015 年 4 月 17 日午後 11:07 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/2 "2015-04-17T23:07:58Z")

</div>

Seems like a good idea, cc: @sam

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2015 年 4 月 22 日午前 4:42 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/3 "2015-04-22T04:42:45Z")

</div>

You know, I think this is pretty important to do - I was just on [another forum](http://forums.brck.com/t/brck-pricing-changes-in-2015/539/2) looking at a user card, and find seeing multiple TL badges is distracting and pushes other badges off the card. So you have to click through to see them. And in this case, it’s just more TL badges!

And while I’m at it - on my forums I have changed the TL names to TL0, TL1, TL2, TL3, TL4 which is how we have begun talking about them, which works better for us methinks than the names Basic, Member, Regular, Leader.

 ![](https://global.discourse-cdn.com/meta/original/3X/8/e/8e95cf046defe16f7dfc466b5c51761f2517b5a6.png) 

 ![](https://global.discourse-cdn.com/meta/original/3X/a/b/abdeb1c11a844cc54fa815e56af811174323de32.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015 年 4 月 22 日午前 4:46 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/4 "2015-04-22T04:46:02Z")

</div>

I definitely support this, it is up to @sam.

Also annoying: getting multiple trust level notifications on a new site, though I suppose this is a lament for the staff and admins only:

![](https://global.discourse-cdn.com/meta/original/3X/3/a/3acd3aef93aebb9f4570d2fa0f32ee8d2bc1c2e0.png)

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2015 年 5 月 27 日午後 10:14 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/5 "2015-05-27T22:14:47Z")

</div>

@sam could you implement this soonly?

Here’s how badges appear now on my site which, as you can see, is duplicative and crowds out more interesting info.

 ![](https://global.discourse-cdn.com/meta/original/3X/b/7/b7466243bc395b1f609043f1cb9860c4f1e9b758.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015 年 7 月 16 日午前 6:53 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/6 "2015-07-16T06:53:53Z")

</div>

Agree that we need special casing here, this is still in my bookmarks list.

---

<div class="post-metadata">

### Author: ![keith1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keith1/32/178982_2.png) [@keith1](https://meta.discourse.org/u/keith1)
#### Post date: [2016 年 9 月 5 日午前 5:12 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/7 "2016-09-05T05:12:28Z")

</div>

Just wanted to bump this subject, as it’s still a bit of an ear flick for me - I’d love to see the badge representation on profiles cleaned up a little bit to give them a more meaningful presence.

---

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [2016 年 10 月 27 日午後 2:49 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/8 "2016-10-27T14:49:20Z")

</div>

I’ve implemented this, and [submitted a PR](https://github.com/discourse/discourse/pull/4519).

Before:

 ![](https://global.discourse-cdn.com/meta/original/3X/9/3/9364ed10c1af85f882f47f290029701521b60fa1.png)

After:

 ![](https://global.discourse-cdn.com/meta/original/3X/9/6/96b544c61a95f0c8004417ef345ad647ee656330.png)

The one thing I wasn’t sure about is what to do when users _just_ have trust level badges, currently the following will happen:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/7/2725bba6f982aa69d49a57698da0ac4af4486af3.png)

I think it would make sense to make use of the space and display the rest of the trust level badges in a situation like this. However, I expect this is an incredibly rare occurrence (only found when a user has been granted trust levels rather then earned them), and I wonder if it’s therefore worth the added code complexity.

Speaking of code complexity, I spent a while staring at my screen trying to work out if I could make the `featured_user_badges` query more efficient, but didn’t come up with anything. We end up running the same subquery twice (to find the highest trust level badge a user has) and from what I can tell ActiveRecord doesn’t support `WITH` queries (which, if my understanding is correct, would mean the duplicated subquery is only ran once). I’m not sure how much of a performance impact this is, though. Again - some advice would be very welcome here.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2016 年 10 月 28 日午後 2:02 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/9 "2016-10-28T14:02:32Z")

</div>

Shweet. Many thanks! 🚀

I am loving the improvements to user cards you are doing. Much appreciated.

---

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [2016 年 11 月 18 日午後 3:12 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/10 "2016-11-18T15:12:11Z")

</div>

This was merged a few days ago:

[https://github.com/discourse/discourse/commit/784366f1a01ce2b257ce0f4347d69672e166592d](https://github.com/discourse/discourse/commit/784366f1a01ce2b257ce0f4347d69672e166592d)

Thanks @Falco!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2016 年 11 月 18 日午後 3:53 UTC](https://meta.discourse.org/t/is-it-possible-to-display-only-one-trust-level-badge-on-the-user-card/27714/11 "2016-11-18T15:53:37Z")

</div>


