سياسة النقاش

:discourse2: Summary Discourse Policy gives the ability to confirm your users have seen or done something, with optional reminders.
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Features

Discourse policy shares much of its DNA with polls, it has the goal of ensuring members of a group accept certain policies by clicking a button.

It has some specific features that set it apart from polls:

  1. It must apply to a group.

  2. It can optionally nag members of a group either weekly or daily to click accept on a policy.

  3. The UX makes it very easy to see who accepted and who did not accept a policy.

Configuration

Screenshots

Before clicking accept

After clicking “grey” person on top right

After clicking accept

Creating a policy

Discourse policy registers a custom [policy] BBCode element. Which means you need to write this block of code in your post where you want to show this policy.

[policy group=founders reminder=daily]
I accept this policy will annoy me daily until I click accept
[/policy]

In this case the policy applies to the founders group and a reminder is sent daily to all users that did not accept the policy.

Site settings

policy_enabled : Enable the discourse policy plugin on the site.

policy_restrict_to_staff_posts: Policies may only appear on staff posts.

policy easy revoke: Show the accept and revoke buttons at the same time.

BBCode attributes

The [policy] element can accept the following attributes.

  • group: the group name that policy will apply to required
  • version: the version number of the policy, bump number up to require all users re-accept the policy
  • reminder: remind users of the group to accept policy (weekly or daily), optional, default off
  • accept: text used for accept button, default is “Accept Policy”
  • revoke: text used for revoke button, default is “Revoke Policy”
  • renew: number of days or text describing period (monthly, quarterly or yearly) after which a user needs to re-accept policy
  • renew-start: the first date renewals will start at Eg: 17-10-2017, useful if you want to set the renewal cadence so it happens every half-year (Jan,June)
  • add-users-to-group: accepts a single group as input; users who accept the policy will be automatically added into this group (when policy is manually revoked or if the policy version is updated, user(s) gets removed from group)
  • private: hide users who accepted/did not accept the policy

:information_source: The backend job to check for policy reminders runs every 6 hours. If the reminder element is set to weekly or daily, users who have not accepted a policy will be sent notification reminders to accept the policy only if they have not already received a reminder notification for the policy within the past week or day.

Usage examples

Basic policy:

[policy group="team" reminder="daily" accept="Accept" revoke="Ignore" version="1"]
I have read, understand and acknowledge this policy.
[/policy]

Bumping the revision number, to require that everyone reads the update:

[policy group="team" reminder="daily" accept="Accept" revoke="Ignore" version="2"]
I have read, understand and acknowledge this policy. (Last updated [date=2020-04-23 timezone="America/Los_Angeles"])
[/policy]

Periodic auditing task:

[policy group="audit_committee" reminder="weekly" renew="90" renew-start="01-07-2019" version="1" accept="Assignment Complete"] 
I have ensured that someone is assigned to this quarterly audit task.
[/policy]

CHANGELOG

TODO

  • Optional immediate reminder for new policies
  • Possibly allow certain groups to apply policies (expanding on staff)

Last edited by @david 2025-07-22T13:14:42Z

Check documentPerform check on document:
65 إعجابًا

تم تقسيم منشورين إلى موضوع جديد: هل يجب قصر إنشاء السياسات على الموظفين فقط؟

تم تقسيم 4 مشاركات إلى موضوع جديد: هل من الممكن منع إلغاء الموافقة على سياسات معينة؟

يبدو أنه تمت إزالة الحد 200 و policy_max_group_size مع هذا الالتزام. هل فاتني شيء؟

3 إعجابات

تم تقسيم 6 مشاركات إلى موضوع جديد: People receiving reminders even though they’ve accepted the policy

عند تطبيق سياسة ذات نص زر طويل على مجموعة كبيرة، تتشوه واجهة المستخدم: في لقطة الشاشة أدناه، يمكننا أن نرى أن الصور الرمزية تشكل عمودًا غير محدود تقريبًا مما يجعله غير مريح بعض الشيء. سألقي نظرة على CSS لمعرفة ما إذا كان يمكن إصلاح ذلك بسهولة، ولكن ربما يجب أن يكون هناك نوع من إعادة التصميم:

إزالة display: flex على .cooked .policy .user-lists يجعلها تبدو جيدة على سطح المكتب:

انتهى بي الأمر باستخدام CSS التالي:

/* اجعل قائمة مستخدمي السياسة لا تفيض */
.cooked .policy .user-lists {
    display: block;
}
3 إعجابات

حدث خطأ بعد تثبيت المكون الإضافي. لا أعرف السبب. شيء متعلق بـ “أثناء محاولة تحميل /admin/dashboard/general.json”.

خطأ في الخادم

أثناء محاولة تحميل [/admin/plugins]

رمز الخطأ: خطأ 500

عفوًا

واجه البرنامج الذي يشغل منتدى المناقشة هذا مشكلة غير متوقعة. نعتذر عن الإزعاج.

تم تسجيل معلومات مفصلة حول الخطأ، وتم إنشاء إشعار تلقائي. سنلقي نظرة عليه.

لا يلزم اتخاذ أي إجراء آخر. ومع ذلك، إذا استمرت حالة الخطأ، يمكنك تقديم تفاصيل إضافية، بما في ذلك خطوات لتكرار الخطأ، عن طريق نشر موضوع مناقشة في فئة ملاحظات الموقع.

مرحباً،

هل ستظهر أزرار القبول/الرفض إذا كانت السياسة ضمن موضوع فئة مغلق لا يسمح بالردود؟

شكراً

لم أستخدم هذه الإضافة منذ فترة، ولكن أعتقد أنها ستسمح للمستخدمين بالقبول/الإلغاء عند إغلاق موضوع، حيث أن الضغط على زر ليس ردًا، وهو ما يمنعه الإغلاق.

إعجاب واحد (1)

مرحبًا لدي سؤال:
نريد استخدام إضافة Discourse Policy لـ: إجبار المستخدمين الجدد على الموافقة على شروط الخدمة (ToS). المتطلبات:

  • إذا لم يوافقوا ← لا يمكنهم استخدام المنتدى (يمكنهم فقط رؤية صفحة شروط الخدمة)
  • عندما يوافقون ← يمكنهم استخدام المنتدى + الحصول على شارة “ToS”

كان حلي هو إنشاء موضوع جديد وأضفت فيه ما يلي:
[policy group=trust_level_0 reminder=daily add-users-to-group=tos_accepted accept=“أوافق على الشروط” version=“1”]
بالنقر فوق “أوافق على الشروط”، أؤكد أنني قرأت شروط الخدمة وأوافق عليها.
[/policy]

ولكن إذا قام مستخدم جديد بتسجيل الدخول، لا تظهر السياسة على الإطلاق ويمكنه فعل ما يريد، نريد فقط إذا نقر على “موافق” أن يتمكن من الوصول إلى صفحتنا. كيف نفعل ذلك وشكرا

يمكنك استخدام حقل مخصص وربط صفحة شروط الخدمة والأسئلة الشائعة. بمجرد قراءتها من قبل المستخدم، سيحصل على شارة “قراءة الإرشادات”.

إعجابَين (2)

شكراً لردك — لقد نجح الأمر تماماً كما قلت. ومع ذلك، ما أريده حقاً هو عرض هذه اللافتة بعد تسجيل دخول المستخدم، والسماح بالوصول إلى الصفحة فقط إذا نقر المستخدم على “قبول”. إذا لم يكن الأمر كذلك، يجب أن تظل اللافتة مرئية، ولا يجب أن يتمكن المستخدم من التفاعل مع الصفحة.

ما لدي الآن هو هذا:


بعد ذلك، يمكن للمستخدم الوصول إلى صفحتنا بشكل طبيعي.

هل هناك أي طريقة للقيام بذلك وشكراً.

:partying_face: تم تضمين هذه الإضافة الآن مع Discourse الأساسي كجزء من Bundling more popular plugins with Discourse core. إذا كنت تستضيف بنفسك وتستخدم الإضافة، فأنت بحاجة إلى إزالتها من app.yml قبل الترقية التالية.

3 إعجابات

سيكون من الجيد لو أضفت القدرة على إزالة المستخدمين من مجموعة عند قبولهم أو رفضهم.

حتى الآن، هذه الميزة تنبه المستخدمين فقط (اختياريًا) وتضيف - إلا إذا كنت أفوت شيئًا ما.

شكرًا!

إعجاب واحد (1)