Antwortvorlage

||||\n-|-|-|\n:discourse2: | Zusammenfassung | Reply Template ermöglicht es Ihnen, einfach einen Teil eines Beitrags in einer Antwort oder einem neuen Thema wiederzuverwenden.\n| :eyeglasses: | Vorschau | Vorschau im Discourse Theme Creator\n:hammer_and_wrench: | Repository-Link | \u003chttps://github.com/discourse/discourse-reply-template-component\u003e\n:open_book: |Neu bei Discourse Themes? | Anfängerleitfaden zur Verwendung von Discourse Themes\n\n[wrap=theme-install-button repoUrl="https://github.com/discourse/discourse-reply-template-component\" repoName="Discourse Reply Template"]\nDiese Themenkomponente installieren\n[/wrap]\n[quote]\n\n:discourse2: Da dies eine #offizielle Themenkomponente ist, die vom Discourse-Team gepflegt wird, können #support-, #bug-, #ux- und #feature-Anfragen in den entsprechenden Kategorien hier auf Meta gestellt und mit dem entsprechenden Tag der Themenkomponente versehen werden. Klicken Sie auf einen der unten stehenden Links, um eine zu starten. :+1: \n\n\u003ckbd\u003e [:question:\u0026nbsp;Support](Discourse Meta "Support bei der Konfiguration und Verwendung von Reply Template anfordern") \u003c/kbd\u003e \u003ckbd\u003e [:bug:\u0026nbsp;Bug](Discourse Meta "Ein Fehlerbericht bedeutet, dass etwas kaputt ist und die normale/typische Nutzung der Themenkomponente verhindert") \u003c/kbd\u003e \u003ckbd\u003e [:eyes:\u0026nbsp;UX](Discourse Meta "Diskussion über die Benutzeroberfläche von Reply Template und wie Funktionen präsentiert werden (einschließlich Sprache und UI-Elemente)") \u003c/kbd\u003e \u003ckbd\u003e [:bulb:\u0026nbsp;Feature](Discourse Meta "Diskussion darüber, wie bestehende Funktionen von Reply Template verbessert oder erweitert werden können und wie vorgeschlagene neue Funktionen funktionieren könnten")\u003c/kbd\u003e\n\n[/quote]\n\n### Funktionen\n\nReply Template ermöglicht es Ihnen, einfach einen Teil eines Beitrags in einer Antwort oder einem neuen Thema wiederzuverwenden.\n\n### Verwendung\n\n\n[wrap=template key=\"template-name\"]\nMein wiederverwendbarer Inhalt\n\n- [ ] Aufgabe 1\n- [ ] Aufgabe 2\n[/wrap]\n\n\nBeachten Sie, dass beim Klicken auf die Schaltfläche das Anmelde-Modal angezeigt wird, wenn der Benutzer nicht angemeldet ist.\n\nSchlüssel ist obligatorisch\n\n### Weitere Optionen\n\n- action=\"create\" dies bewirkt, dass die Schaltfläche einen Composer zum Erstellen eines neuen Themas öffnet\n- action=\"create_pm\" dies bewirkt, dass die Schaltfläche einen Composer zum Erstellen einer neuen PN öffnet\n- categoryId=\"2\" nur verwendbar mit action=\"create\", legt die Kategorie des geöffneten Composers fest\n- title=\"some title\" nur verwendbar mit create und create_pm, Titel des Themas/der PN\n- recipients=\"a@example.com\" nur verwendbar mit create_pm, an wen dies gesendet werden soll\n- usernames=sam nur verwendbar mit create_pm\n- label=\"Mein Schaltflächentext\" Der Text der Schaltfläche\n\n\n### Platzhalter\n\nSie können spezielle Schlüssel in Ihrer Vorlage haben, die ersetzt werden:\n\n- \$week_start -\u003e Datum zu Beginn der Woche\n- \$week_end -\u003e Datum am Ende der Woche\n- \$prev_week_start -\u003e Datum zu Beginn der letzten Woche\n- \$prev_week_end -\u003e Datum am Ende der letzten Woche\n- \$today\n- \$tomorrow\n- \$username -\u003e Benutzername des aktuellen Benutzers\n- \$name -\u003e Name des aktuellen Benutzers \n\nBeachten Sie, dass dies durch lokale Daten ersetzt wird.\n\nSpezielle Platzhalter werden auch in title interpoliert\n\n### Tags-Liste\n\ntagsList=\":heart:,foo,#bar" zeigt eine Liste von Kontrollkästchen am Ende der Vorlage an, sodass Personen ihr Thema einfach mit Tags versehen können.\n\n

\n\n## Beispiel\n\n\nMeine To-Do-Liste $week_end\n\n- [x] Aufgabe 1\n- [x] Aufgabe 2\n\n\n### Einstellungen\n\n| Übersetzung | Standard\n|-|-|\n| discourse_reply_template_component.use_template_reply | Vorlage als Antwort verwenden\n| discourse_reply_template_component.use_template_create | Vorlage als neues Thema verwenden\n| discourse_reply_template_component.use_template_create_pm | Vorlage als neue PN verwenden\n| discourse_reply_template_component.needs_key | Jede Vorlage benötigt ein Schlüsselattribut. z.B.: [wrap=template key=\"weekly_status\"][/wrap]\n\n\u003cbr\u003e\n\n\u003e:discourse2: Bei uns gehostet? Themenkomponenten können auf unseren Standard-, Business- und Enterprise-Plänen verwendet werden.

43 „Gefällt mir“

I was wondering can this be used in a specific category/sub?

Ie bug reporting form?

3 „Gefällt mir“

Yes :arrow_down:

E.g.
[wrap=template key="bug-report" action="create" categoryId="your-bug-category-id"]

9 „Gefällt mir“

Thank you will need to explore this more.

This is the best. Thank you!! I use this to create checklist templates that can be created anytime we’re doing a repetitive project. Before, our instructions would have been “copy and paste everything below” instead of having this very elegant button to create a topic for people.

5 „Gefällt mir“

Is there a plan to make this functionality accessible in the composer window? To me the most logical place being where things like Hide Details and Build Poll live.

3 „Gefällt mir“

I just updated the component, see OP for usage but a quick note:

  • placeholder dates are now replaced by local dates
  • you can now define a tagsList

8 „Gefällt mir“

Thank you for a great component!

It’s impossible to add a poll in the wrap. Can you add this functionality?

[wrap=template key="template-name"]

[poll type=regular results=on_vote chartType=bar]
# Who will join?
* 1
* 2
* 3
[/poll]

[/wrap]

I added more locales to your component and created a PR. Please, check.

1 „Gefällt mir“

How can i install this component?

In my opinion it’d be more helpful to have an example for the reply case (without action=create) because this is probably the reason, the majority is searching for since creating a topic is already possible via URL

My try:

  • ok
  • fail
2 „Gefällt mir“

Would it be possible to use a template to create a new personal message?

Also, when someone is not signed in, clicking on “Use template as reply” does not result in any action. Could you add functionality where if a user is not logged in, something happens to nudge them to log in or create a new account?

4 „Gefällt mir“

Great suggestion, it’s done, I updated the OP.

4 „Gefällt mir“

Is there a way to pre-populate the title of a new topic?

Is there a way to automatically add tags instead of having just the tag list?

4 „Gefällt mir“

No, but that’s reasonable feature request for sure. I’m kinda full ATM but making a note of this, thanks.

5 „Gefällt mir“

Is there any possible way to modify the stock reply button in a topic with such a template?
That would be a gamechanger for specific structured conversations in the forum. Especially for contests etc where users have to submit content in a structured manner.

1 „Gefällt mir“

Hi, sorry I don’t understand your request, can you be more specific please ?

Currently the user can access the reply template only via the button in the first post generated by the theme component.
What I would like to achieve is to enable the template for the stock reply buttons in the topic as well (reply button below the timeline and reply button below the last post)

Edit: One prolific use case is a topic where users can leave feedback like bug reports etc. If we could add per-topic post templates just like for per-category templates for new topics, that would lead to less incomplete reports and hence save our staff a lot of time.

5 „Gefällt mir“

Hallo,

Ich habe einige Probleme bei der Installation dieser Komponente. Ich bin neu bei Discourse und hoffe, dass jemand bestätigen kann, ob die von mir unternommenen Schritte korrekt sind.

Ich habe die Anleitung hier Installing a theme or theme component befolgt, um die Komponente zu installieren. Ich habe die Komponente in allen unseren Themes enthalten.

Wenn ich jedoch ein neues Thema erstelle und Folgendes einfüge:

Mein wiederverwendbarer Inhalt

  • Aufgabe 1
  • Aufgabe 2

Gibt es keine Schaltfläche für “Vorlage als Antwort verwenden”. Beispiel:

Es wird nur der Wrapper um die Vorlage angezeigt. Habe ich einen Schritt übersehen? Muss ich etwas im Code anpassen?

Außerdem meldet Discourse, dass das Theme Fehler in CSS, HTML oder YAML hat. Ich bin mir nicht sicher, ob das etwas damit zu tun hat, warum die Schaltfläche nicht angezeigt wird?

Vielen Dank für jede Hilfe.

Ich werde es mir morgen ansehen

2 „Gefällt mir“

Danke. Mir wurde mitgeteilt, dass es sich auch um ein Problem mit der von uns verwendeten Discourse-Version handeln könnte, aber ich werde mich dazu noch einmal melden.