# Self Service Badges?

**URL:** https://meta.discourse.org/t/self-service-badges/124626
**Category:** Support
**Created:** [August 1, 2019, 3:52pm UTC](https://meta.discourse.org/t/self-service-badges/124626 "2019-08-01T15:52:09Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 3:52pm UTC](https://meta.discourse.org/t/self-service-badges/124626/1 "2019-08-01T15:52:09Z")

</div>

I’m trying to add self-service pronoun badges for my discourse, and not sure what the best way to go about it is. Seems like self-service badges don’t exist yet, so I’d have to hack something up.

Best idea from a UX point of view is maybe create a special post and people could reply to the post with the pronouns they prefer, and a sql query could then find the reply and assign the right badge?

Is there something simpler than that, that I haven’t thought of?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 1, 2019, 3:56pm UTC](https://meta.discourse.org/t/self-service-badges/124626/2 "2019-08-01T15:56:47Z")

</div>

I’m not quite sure exactly what you’re trying to accomplish, but you can create a custom user field and have people put their pronoun(s) there.

What do you mean by a “badge”? Discourse has Badges, but I don’t think that’s what you mean, or maybe it is. If you _do_ mean badges, then you can enable Badge SQL and have them be assigned when someone populates the pronoun field in their profile.

---

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 4:00pm UTC](https://meta.discourse.org/t/self-service-badges/124626/3 "2019-08-01T16:00:49Z")

</div>

Ahh, a custom pronoun field in profile is a good start. The problem is that I’m generally not going to go look at someone’s profile before responding to them.

The reason I was thinking of doing it as a badge is to make it so it’s more visible… There’s “Allow badge to be used as a title” … which I presume means you can have it shown up by someone’s name.. but maybe not?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 1, 2019, 4:04pm UTC](https://meta.discourse.org/t/self-service-badges/124626/4 "2019-08-01T16:04:04Z")

</div>

You can have the pronoun field show in their card, which is less of a drag than going all the way to the profile.

With some work you could have a theme component display their pronoun field . . . somewhere.

---

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 4:07pm UTC](https://meta.discourse.org/t/self-service-badges/124626/5 "2019-08-01T16:07:05Z")

</div>

Hmm, yeah, I tried it on the card, that’s not bad. I was thinking after the user’s primary group… but I worry that is making that line pretty busy. Also I don’t relish tweaking the theme.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 1, 2019, 4:12pm UTC](https://meta.discourse.org/t/self-service-badges/124626/6 "2019-08-01T16:12:25Z")

</div>

> [@natefinch](#):
>
> I was thinking after the user’s primary group… but I worry that is making that line pretty busy.

That’s my concern. Do all of your users really want to scream their pronouns on every. single. message? And coming up with groups has its own set of problems, as you’ll necessarily be limiting the set of pronouns that people can use. The CSS solution could stick the value from the custom field after their name and/or primary group. I don’t relish doing CSS stuff either, but my guess is that you can get someone here to tell you how to do it. Worst case, it’s a few hundred dollars, I’d think.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [August 1, 2019, 4:17pm UTC](https://meta.discourse.org/t/self-service-badges/124626/7 "2019-08-01T16:17:18Z")

</div>

> [@pfaffman](#):
>
> The CSS solution could stick the value from the custom field after their name and/or primary group. I don’t relish doing CSS stuff either, but my guess is that you can get someone here to tell you how to do it.

This topic shows how to add a user custom field after the poster’s name: [Ability to place custom fields in post header?](https://meta.discourse.org/t/ability-to-place-custom-fields-in-post-header/106928)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 1, 2019, 4:28pm UTC](https://meta.discourse.org/t/self-service-badges/124626/8 "2019-08-01T16:28:30Z")

</div>

> [@pfaffman](#):
>
> my guess is that you can get someone here to tell you how to do it.

Ha. I was right, and they didn’t even have to ask! 😉

---

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 4:31pm UTC](https://meta.discourse.org/t/self-service-badges/124626/9 "2019-08-01T16:31:04Z")

</div>

Thank you!!! 🙂

---

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 5:29pm UTC](https://meta.discourse.org/t/self-service-badges/124626/10 "2019-08-01T17:29:19Z")

</div>

Do I need to make a plugin to add that script?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 1, 2019, 5:57pm UTC](https://meta.discourse.org/t/self-service-badges/124626/11 "2019-08-01T17:57:11Z")

</div>

No, just create a theme component and add that code (modified for your custom variable) and add it to the `</head>` section of the theme component. Then add that theme component to whatever theme(s) you are using.

---

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 7:35pm UTC](https://meta.discourse.org/t/self-service-badges/124626/12 "2019-08-01T19:35:38Z")

</div>

For those, like me, who didn’t know how to make a theme component, you can do it right from your site, just go to Themes under settings, and click the component tab, click install, and then click create. Bam.

(Clicking install to create a new one was weird, but I figured it out).

---

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 8:40pm UTC](https://meta.discourse.org/t/self-service-badges/124626/13 "2019-08-01T20:40:50Z")

</div>

Ok, uh, is there a trick to get it to… work? It looks correct when I click `preview`, but it’s not taking effect on the site as a whole. I don’t know what the difference is? I created it and it says it’s enabled. I don’t see the actual script in the source of either page, but I presume that’s some html/javascript magic.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [August 1, 2019, 9:10pm UTC](https://meta.discourse.org/t/self-service-badges/124626/14 "2019-08-01T21:10:50Z")

</div>

> [@natefinch](#):
>
> It looks correct when I click `preview` , but it’s not taking effect on the site as a whole.

Make sure that you have added the component to your site’s theme. There are details about that here: [Installing a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682). You might also want to look at [Developing Discourse Themes & Theme Components](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648).

---

<div class="post-metadata">

### Author: ![natefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natefinch/32/107168_2.png) [@natefinch](https://meta.discourse.org/u/natefinch)
#### Post date: [August 1, 2019, 10:17pm UTC](https://meta.discourse.org/t/self-service-badges/124626/15 "2019-08-01T22:17:34Z")

</div>

That did it. Thanks, I didn’t realize I had to also add it to the theme, but that makes sense.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [August 1, 2019, 11:10pm UTC](https://meta.discourse.org/t/self-service-badges/124626/16 "2019-08-01T23:10:47Z")

</div>

Taking a leaf from social networks why not just add your preferred pronouns at the top of your profile?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 4, 2023, 3:58pm UTC](https://meta.discourse.org/t/self-service-badges/124626/17 "2023-02-04T15:58:58Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 4, 2023, 4:16pm UTC](https://meta.discourse.org/t/self-service-badges/124626/18 "2023-02-04T16:16:55Z")

</div>


