نموذج الرد

||||\n-|-|-|\n:discourse2: | الملخص | يتيح لك Reply Template إعادة استخدام جزء من منشور بسهولة في رد أو موضوع جديد.\n| :eyeglasses: | المعاينة | المعاينة على منشئ سمات Discourse\n:hammer_and_wrench: | رابط المستودع | \u003chttps://github.com/discourse/discourse-reply-template-component\u003e\n:open_book: |جديد في سمات Discourse؟ | دليل المبتدئين لاستخدام سمات Discourse\n\n[wrap=theme-install-button repoUrl="https://github.com/discourse/discourse-reply-template-component\" repoName="Discourse Reply Template"]\nتثبيت مكون السمة هذا\n[/wrap]\n[quote]\n\n:discourse2: نظرًا لأن هذا مكون سمة official تتم صيانته بواسطة فريق Discourse، يمكن تقديم طلبات Support أو Bug أو UX أو Feature في الفئات المعنية هنا على Meta، ووضع علامة عليها بالعلامة المناسبة لمكون السمة. انقر على أحد الروابط أدناه لبدء واحدة. :+1: \n\n\u003ckbd\u003e [:question:\u0026nbsp;الدعم](Discourse Meta "اطلب الدعم بشأن تكوين واستخدام قالب الرد") \u003c/kbd\u003e \u003ckbd\u003e [:bug:\u0026nbsp;خطأ](Discourse Meta "تقرير الخطأ يعني أن هناك شيئًا ما معطلاً، مما يمنع الاستخدام العادي/النموذجي لمكون السمة") \u003c/kbd\u003e \u003ckbd\u003e (Discourse Meta \“مناقشة حول واجهة مستخدم قالب الرد، وكيفية عرض الميزات (بما في ذلك اللغة وعناصر واجهة المستخدم)\”) \u003c/kbd\u003e \u003ckbd\u003e [:bulb:\u0026nbsp;**ميزة**](Discourse Meta \“مناقشة حول كيفية تحسين ميزات قالب الرد الحالية وتعزيزها، وكيفية عمل الميزات المقترحة الجديدة\”)\u003c/kbd\u003e\n\n[/quote]\n\n### الميزات\n\n **Reply Template** يتيح لك إعادة استخدام جزء من منشور بسهولة في رد أو موضوع جديد.\n\n### الاستخدام\n\n```\n[wrap=template key=\“template-name\”]\nمحتواي القابل لإعادة الاستخدام\n\n- [ ] المهمة 1\n- [ ] المهمة 2\n\n```\n\nلاحظ أنه إذا لم يكن المستخدم مسجلاً دخوله، فسيؤدي النقر على الزر إلى عرض نافذة تسجيل الدخول.\n\nالمفتاح إلزامي\n\n### خيارات أخرى\n\n- action=\"create\" سيؤدي هذا إلى فتح الزر لإنشاء موضوع جديد\n- action=\"create_pm\" سيؤدي هذا إلى فتح الزر لإنشاء رسالة خاصة جديدة\n- categoryId=\"2\" يمكن استخدامه فقط مع action=\"create\"، وسيحدد فئة المنشئ المفتوح\n- title=\"some title\" يمكن استخدامه فقط مع create و create_pm، عنوان الموضوع/الرسالة الخاصة\n- recipients=\"a@example.com\" يمكن استخدامه فقط مع create_pm، الأشخاص الذين سيتم إرسال الرسالة إليهم\n- usernames=sam يمكن استخدامه فقط مع create_pm\n- label=\"My button text\" نص الزر\n\n\n### العناصر النائبة\n\nيمكنك الحصول على مفاتيح خاصة في القالب الخاص بك سيتم استبدالها:\n\n- \$week_start -\u003e التاريخ في بداية الأسبوع\n- \$week_end -\u003e التاريخ في نهاية الأسبوع\n- \$prev_week_start -\u003e التاريخ في بداية الأسبوع السابق\n- \$prev_week_end -\u003e التاريخ في نهاية الأسبوع السابق\n- \$today\n- \$tomorrow\n- \$username -\u003e اسم المستخدم للمستخدم الحالي\n- \$name -\u003e اسم المستخدم الحالي \n\nلاحظ أنه سيتم استبدال هذا بالتواريخ المحلية.\n\nيتم أيضًا دمج العناصر النائبة الخاصة في title\n\n### قائمة العلامات\n\ntagsList=\":heart:,foo,#bar" سيعرض قائمة مربعات اختيار في نهاية القالب حتى يتمكن الأشخاص من وضع علامات على منشوراتهم بسهولة.\n\n

\n\n## مثال\n\n\nقائمة مهامي $week_end\n\n- [x] المهمة 1\n- [x] المهمة 2\n\n\n### الإعدادات\n\n| الترجمة | الافتراضي\n|-|-|\n| discourse_reply_template_component.use_template_reply | استخدام القالب كـ رد\n| discourse_reply_template_component.use_template_create | استخدام القالب كموضوع جديد\n| discourse_reply_template_component.use_template_create_pm | استخدام القالب كـ رسالة خاصة جديدة\n| discourse_reply_template_component.needs_key | كل قالب يحتاج إلى سمة مفتاح. مثال: [wrap=template key=\"weekly_status\"][/wrap]\n\n\u003cbr\u003e\n\n\u003e:discourse2: مستضاف من قبلنا؟ مكونات السمة متاحة للاستخدام في خططنا القياسية (Standard) والأعمال (Business) والمؤسسات (Enterprise).

43 إعجابًا

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

Ie bug reporting form?

3 إعجابات

Yes :arrow_down:

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

9 إعجابات

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 إعجابات

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 إعجابات

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 إعجابات

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)

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)

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 إعجابات

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

4 إعجابات

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 إعجابات

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

5 إعجابات

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)

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 إعجابات

مرحباً،

أواجه بعض المشاكل في تثبيت هذه المكونة. أنا جديد على Discourse وآمل أن يتمكن شخص ما من تأكيد ما إذا كانت الخطوات التي اتخذتها صحيحة.

لقد اتبعت الدليل هنا Installing a theme or theme component لتثبيت المكونة. لقد قمت بتضمين المكونة في جميع السمات الخاصة بنا.

ومع ذلك، عندما أقوم بإنشاء موضوع جديد وأضمّن

محتوى قابل لإعادة الاستخدام

  • مهمة 1
  • مهمة 2

لا يوجد زر لـ “استخدام القالب كـ رد”. مثال:

إنه يظهر فقط الغلاف حول القالب. هل فاتني خطوة ما؟ هل هناك شيء أحتاج إلى تخصيصه في الكود؟

أيضًا، يقول Discourse إن السمة بها أخطاء إما في CSS أو HTML أو YAML. لست متأكدًا مما إذا كان لذلك علاقة بسبب عدم عرض الزر؟

شكرًا لأي مساعدة.

سألقي نظرة غداً

إعجابَين (2)

شكراً لك. لقد تم إبلاغي بأن المشكلة قد تكون أيضاً في إصدار Discourse الذي نعمل عليه، ولكن سأعود إليك بشأن ذلك.