Template di Risposta

The Reply Template is a theme component and not connected to a topic template.

My suggested plugin would work in conjunction with reply templates.

Yep, got that. I was clarifying on the plugin. Basically, it places the desired reply template in the topic post of all topics in a specific category which has the Journal plugin enabled?

1 Mi Piace

It would be triggered independently of the journal plugin.

Here is my quick and dirty spec sheet:

  • Plugin settings:
    • checkbox: enable ā€œForce reply templateā€ plugin
    • tag picker: enable ā€œForce reply templateā€ for topics with this tag
  • Category settings:
    • checkbox: enable Force reply template in category
  • Condition:
    • If the above conditions are met AND if a reply template is found in first post, THEN enable fill the reply template into the composer after users hits the Reply button
    • Condition does not apply to reply buttons in individual posts
3 Mi Piace

When I click the button when not logged in:

You can test yourself here:

What can be the problem?

1 Mi Piace

@agligorijevic Are you on the latest version of Discourse, and of the Theme Component?

1 Mi Piace

The component needs an update. I will make a PR.


3 Mi Piace

There is a method to use the reply templates automatically (on specific categories)?

2 Mi Piace

AFAIK there isn’t. There are only category templates in core.

1 Mi Piace

I think that this TC does what you are looking for:

2 Mi Piace

Thanks Nat, from what I understand (please correct me if I’m wrong) the propose for this plugin is to change the Placeholder text on topics and -not expected- the text still remains in the textbox.

I tried it, and it’s currently not working. If it’s updated, it could work as a workaround, for sure!

1 Mi Piace

I believe this component is somewhat broken with the new composer since [wrap] is no longer supported, you get this error if you edit a topic that has used this: Token type ā€˜wrap_open’ not supported by Markdown parser

Is there any solution to this for existing topics? Our users often edit topics and this is really going to confuse them. I know you can just go to the Markdown view, but overcoming this is going to be a challenge.

Will this be updated to work with the new composer?

We’re planning to add support for [wrap] tokens in the rich text editor, but it will take us some time to implement this properly. At the moment, we don’t have an ETA. Please also keep in mind that the annual Discourse meetup is coming up soon, so many team members will be away, meaning work on this feature will be paused or slowed down over the next few weeks.

Until then, the best option is to switch back to the markdown composer.

3 Mi Piace

Wouldn’t it be quite easy to implement this? Maybe not in a 100% secure way, but more like a 80% solution, where the user does get the template filled in, as the user pressing ā€œreplyā€?

Or will that requires a backend plugin, which does provide the templates as extra context, if the user opened up the topic, and only have pot 40-45 in the viewpoint, resulting in the client haven’t and context about the ā€œalmost forced templateā€ for the topic? :slight_smile:

I’m asking here, as I’m not that familiar with the component structure, but it should be a great addition, as mentioned before.