Highlight OP in a discussion

AI-generated summary

The discussion revolves around highlighting the original poster (OP) in a discussion, a feature found on platforms like Reddit and Facebook. iamntz shares a CSS code snippet to achieve this in Discourse, adding a mini-badge to the OP’s username in replies. JammyDodger notes that there’s an existing feature request for this and links to a relevant topic on meta.discourse.org. Don mentions having an updated code and considers creating a theme component. Jagster finds the code useful but suggests an alternative to “OP” as it’s not well understood in Finland and is also the name of a bank. JammyDodger argues that a theme component would be beneficial for updates and ease of use. A theme component has since been created, as announced by JammyDodger, allowing for easier installation and customization.

One thing that Reddit does nicely (and I think FB too) is that they highlight the topic owner in discussions.

You can achieve the same thing with a little CSS added in your theme:

.topic-post.topic-owner .topic-meta-data .username:after {
  content: "OP";
  font-weight: 600;
  color: #fff;
  background: #14aeea;
  padding: 3px;
  font-size: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-left: 5px;
}

Every replies added into a topic by its author will have this mini-badge :sunglasses:

The result:

Nice :slight_smile:

I think we have an open Contribute > Feature request for this too -

I think there’s an extra snippet in there as well in case you want to exclude the first post.

Oh yeah :sweat_smile: Thanks Jammy for linking this old topic. I have an updated code for this. I will post it and I think I will move that topic to Development as well. :+1: Or maybe making a theme component from this would be a better idea. :thinking:

There is no need for a component. I already copy&pasted :rofl:

All I need is solving out better expression than OP because finns don’t understand it and up here in north it is name of one bank too. Facebook has quite nice way actually. And yes, I know - off topic again :man_facepalming:

I think having a theme component is useful as it can pick up any updates to the code if there ever are any. It’s also easy to find and install for anyone not familiar with creating their own. :+1:

I agree. It was just bad joke, because I’m bored (because of my client is late big time).

A component could give easier option choose location too, I reckon. Because I would like to see it under name, on second line.

Cross-linking the new theme component :partying_face: