トピックにクイック追加タグ

:information_source: Summary Add tags to a topic with a click of a button
:hammer_and_wrench: Repository GitHub - NateDhaliwal/quick-add-tags
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

This is a component that adds tags to a topic with a button in the topic footer. It also provides the option to auto-close the topic after x days (minimum 0).

Admins can configure what tag(s) to add to the topic with the quick_add_tags setting.

Admins can also configure the button label, text and success message text.

Once the tag is added successfully, an success message is displayed:
image

If the adding of tag fails, there’ll be an error message displayed:
image

If you enable auto_close_topic, the add tag button will be visible only to admins/moderators/TL4s (because they have the permissions to set the topic timer). You can change the auto_close_topic_days to any value. This closes the topic in that many days.

Inspiration came from this when I saw this post. Hope this helps someone!

「いいね!」 18

This PR replaces all previous settings with the new quick_add_tags_buttons setting.

This adds the functionality to add more that 1 button, and also provides the option to limit each button by category.

Furthermore, you can now change the button label and title for each button.

For example, you can have the following setup:

Button 1:

  • Tags to add: Tag A, Tag B, Tag C
  • In categories: ABC, DEF
  • Auto close: Yes
  • Close in how many days: 2
  • Button label: Add A, B, C
  • Button title: Add tags A, B and C

Button 2:

  • Tags to add: Tag A, Tag D
  • In categories: DEF, XYZ
  • Auto close: No
  • Button label: Add A, D
  • Button title: Add tags A and D

Thanks to @tobiaseigen for the inspiration for this feature!

「いいね!」 3

Hi, I am testing your TC for that use case: A list of topics awaiting answers and solutions? - #6 by patrickemin

  • First question, from what date the auto close is counted ?
  • Second question: it seems specifying categories is compulsory, but in my use case, I do not want to specify categories, is it possible ?

Also the button is oversized, would you know why?

Thanks.

It’s counted from the moment you press the button.

I’ll see if I can make it optional behind a checkbox, or perhaps by leaving it blank.

IIRC that’s due to the amout of text in the button. Less characters are fine. I’m using DButton and have no idea why this occurs. I’ll see if I can apply some CSS on it.

「いいね!」 2

Thanks, leaving it blank would be better I think.

「いいね!」 2

And while you are at it :wink: a checkbox to hide this buttons to non staff users would be good, independently of the topic closing setting.

「いいね!」 2

Yep, I was already thinking of limiting it by groups as well. Thanks.

「いいね!」 3