Tag experts plugin

A bit of background first - I recently very radically restructured my 20+ year old forum to get rid of the 100-ish categories/sub-categories that had evolved over the years in favour of just 3 user-postable categories using tags to differentiate topics of interest. I think my users are currently wondering if I’ve lost my marbles :laughing:

One casualty of this that I didn’t think about until it was too late was category experts. I had this turned on for a couple of categories, but now I’ve made the experts from those specific categories experts for massive categories it doesn’t really make sense. In one respect it’s OK because the experts are good guys outside of their own field of expertise, but it is odd getting posts flagged as expert responses when you know the expert responding is really the expert in another field.

So, I’m wondering whether (1) a Tag Expert plugin would be achievable and (2) is it something that might be considered to be added in future?

Edit: I should add that this is a hobby board with zero income (apart from my pension) so I can’t offer any funding!

4 Likes

A “Tag Expert” plugin could absolutely be achievable. Given the complexity in the category expert plugin, I don’t think it would be a good idea to try to integrate into this plugin. A new plugin would probably be easiest.

There are certainly no plans to create this from the Discourse team but it’s a cool idea and it wouldn’t be too hard of a plugin to write (depending on feature set of course). You could try to work with AI to help you build something!

3 Likes

Starting from my current knowledge of Ruby (pretty limited) and a look at the Category Experts code on github which is full of mysterious things like controllers, models and serializers, I’m not sure I’d agree with that. I think I’d nead a crash course on how Discourse plugins work before even AI could help me!

3 Likes

Well if all you want is “posts in a topic tagged with X, created by users in GroupA are decorated differently”, you don’t need controllers/models. The change is much more simple. It would be a site setting to define the tag ↔ group configuration, and then an addition to the topic_list_item serializer, and post_serializer to have an attribute like tag_expert_post accessible.

(Sorry, I know this is very in the weeds)

5 Likes

If that would indeed be all, you’d have all selectors in the document already. So you can decorate with CSS, the pattern would be:

target the topic with a tag
  target the post by a member in a primary group
     decorate a part of the post

For example:

body.tag-expert-1 { 
  .topic-post.group-tag-experts-1  {
    .cooked {
      ...
    }
  }
}

This will only work for primary groups, as they are added to the post as a class selector.

Then you could get for example:

Or set slightly different styles for different Expert groups:

Had just done something similar recently:

5 Likes