Discourse 政策

:discourse2: 摘要 Discourse Policy 允许您确认用户是否已查看或完成某项操作,并提供可选的提醒功能。
:open_book: 安装指南 该插件已随 Discourse 核心 bundled。无需单独安装该插件。

功能

Discourse Policy 与投票功能有很多相似之处,其目标是确保组成员通过点击按钮来接受某些政策。

它具有一些区别于投票的特定功能:

  1. 必须应用于某个组。

  2. 它可以可选地提醒组成员每周或每天点击接受某项政策。

  3. 其用户体验设计使得查看谁已接受、谁未接受某项政策变得非常容易。

配置

截图

点击接受之前

点击右上角的“灰色”人物图标之后

点击接受之后

创建政策

Discourse Policy 注册了一个自定义的 [policy] BBCode 元素。这意味着您需要在希望显示该政策的帖子中编写以下代码块。

[policy group=founders reminder=daily]
我接受此政策,它会在我每天点击接受之前不断打扰我
[/policy]

在此示例中,该政策适用于 founders 组,并且会向所有未接受该政策的用户每天发送提醒。

站点设置

policy_enabled:在站点上启用 Discourse Policy 插件。

policy_restrict_to_staff_posts:政策仅可出现在员工帖子中。

policy easy revoke:同时显示“接受”和“撤销”按钮。

BBCode 属性

[policy] 元素可接受以下属性:

  • group:政策适用的组名(必需
  • version:政策的版本号,增加版本号可要求所有用户重新接受政策
  • reminder:提醒组成员接受政策(每周或每天),可选,默认关闭
  • accept:接受按钮的文本,默认为“接受政策”
  • revoke:撤销按钮的文本,默认为“撤销政策”
  • renew:用户需要重新接受政策的间隔天数或描述周期的文本(每月、每季度或每年)
  • renew-start:开始进行续期的日期,例如:17-10-2017。如果您希望将续期频率设置为每半年一次(1 月和 6 月),此属性非常有用。
  • add-users-to-group:接受单个组作为输入;接受政策的用户将自动被添加到该组中(当政策被手动撤销或政策版本更新时,用户将从该组中移除)
  • private:隐藏已接受和未接受政策的用户列表

:information_source: 用于 检查政策提醒 的后台任务每 6 小时运行一次。如果 reminder 元素设置为每周或每天,则未接受政策的用户将收到提醒通知,但仅当他们在过去一周或一天内尚未收到过该政策的提醒通知时才会发送。

使用示例

基本政策:

[policy group="team" reminder="daily" accept="接受" revoke="忽略" version="1"]
我已阅读、理解并确认本政策。
[/policy]

提高版本号以要求所有人阅读更新:

[policy group="team" reminder="daily" accept="接受" revoke="忽略" version="2"]
我已阅读、理解并确认本政策。(最后更新时间 [date=2020-04-23 timezone="America/Los_Angeles"])
[/policy]

定期审计任务:

[policy group="audit_committee" reminder="weekly" renew="90" renew-start="01-07-2019" version="1" accept="任务完成"] 
我已确保有人被分配执行此项季度审计任务。
[/policy]

更新日志

待办事项

  • 为新政策提供可选的即时提醒
  • 可能允许特定组应用政策(在员工权限基础上扩展)
65 个赞
How to make users to explicitly agree to ToS
Have-to-read topics? (or RSVP topics)
Plugin to maintain group membership based on accepting a Policy
Ability to view if PM has been read (Moderation ability?)
Group Membership base on accepting a Discourse Policy
Force existing users to accept ToS
How to get email notifications when new users have signed up?
Improving Discourse Policy for large groups
Dashboard Report - Unaccepted Policies
Is there a plugin that helps with Age Verification on the site?
Restrict posting in a category until they "like" a topic
Restrict posting in a category until they "like" a topic
Topic should be a notification
Plugin or other option to require a post and a like?
Watching category mandatory
Policy reminder cannot be left empty
Bundling more popular plugins with Discourse core
Age prompt for NSFW catagories
Button to join group on post
Bump topic with API
Publish group read state
Delivered and read notifications?
Habit tracking within Discourse...is it possible?
Changing policy texts
Agree to additional terms before joining group
Know who has viewed your post
How can I compare arbitrary revisions of a post?
Require accepting new terms (after changes) as a modal inside forum
Tips into building a community aside a variety of already existing tools
How to force existing users to accept ToS
Plugin to gather approvals / signatures on an initiative?
Recommnded plugins for supporting a tech community run by a big enterprise?
AUP location
I can't display my policy
Best practices for communicating to user base

2 篇帖子已拆分到新主题:将策略创建限制为仅限员工?

4 个帖子已拆分为新主题:是否可以禁止撤销对某些策略的同意?

看起来此提交删除了 200 的限制和 policy_max_group_size。我是否遗漏了什么?

3 个赞

6 个帖子被拆分到一个新主题:即使接受了政策,人们仍收到提醒

当应用于大型群组的长按钮文本策略时,UI 会被破坏:在下面的屏幕截图中,我们可以看到头像形成了一个近乎无限的列,这有点尴尬。我将查看 CSS,看看是否可以轻松修复,但可能需要进行某种重新设计:

删除 .cooked .policy .user-lists 上的 display: flex 会使其在桌面上的显示效果正常:

我最终使用了以下 CSS:

/* 使策略用户列表不溢出 */
.cooked .policy .user-lists {
    display: block;
}
3 个赞

安装插件后出现错误。不知道为什么。似乎与“尝试加载 /admin/dashboard/general.json”有关。

服务器错误

尝试加载 [/admin/plugins] 时

错误代码:500 错误

糟糕

此论坛软件遇到了意外问题。我们对造成的不便深表歉意。

错误详情已记录,并已生成自动通知。我们将进行查看。

无需进一步操作。但是,如果错误状况持续存在,您可以通过在该网站的反馈类别中发布讨论主题来提供更多详细信息,包括重现错误的步骤。

您好,

如果策略位于不允许回复的“分类主题”中,是否还会显示“接受/撤销”按钮?

谢谢

我有一段时间没用过这个插件了,但我认为它将允许用户在主题关闭时接受/撤销,因为按按钮不算回复,而这正是关闭所阻止的。

1 个赞

嗨,我有一个问题:
我们想使用 Discourse Policy 插件来:强制首次用户接受服务条款 (ToS)。要求:

  • 如果他们不接受 → 他们不能使用论坛(只能看到 ToS 页面)
  • 当他们接受 → 他们可以使用论坛 + 获得一个 “ToS” 徽章

我的解决方案是创建一个新主题,并在其中添加了以下内容:
[policy group=trust_level_0 reminder=daily add-users-to-group=tos_accepted accept=“我接受条款” version=“1”]
点击“我接受条款”,我确认我已阅读并同意服务条款。
[/policy]

但是如果一个新用户登录,策略根本不显示,他可以做任何他想做的事情,我们希望只有在他点击“接受”后才能访问我们的页面。 如何做到这一点,谢谢

您可以使用自定义字段并链接服务条款和常见问题解答页面。用户阅读后将收到“已读指南”徽章。

2 个赞

感谢您的回复——它正如您所说的那样奏效了。但是,我真正想要的是在用户登录后显示此横幅,并且只有在用户单击“接受”后才允许访问该页面。如果用户不单击“接受”,横幅应保持可见,并且用户将无法与页面进行交互。

我现在拥有的是:


在此之后,用户可以正常访问我们的页面。

有什么方法可以做到这一点吗?谢谢。

:partying_face: 此插件现已作为 Bundling more popular plugins with Discourse core 的一部分,随 Discourse 核心一起提供。如果您是自托管用户并使用了此插件,则需要在下次升级前将其从 app.yml 中移除。

3 个赞

如果能添加在接受或拒绝移除用户组的功能就太好了。

目前此功能仅会(可选地)提醒用户,并且添加用户——除非我遗漏了什么。

谢谢!

2 个赞