自定义新用户信任等级提升信息

:bookmark: 本指南介绍如何为新用户设置自定义信任等级提升消息,以替代默认的 Discourse 叙事机器人欢迎流程。

:person_raising_hand: 所需用户等级:管理员

摘要

本指南将向您展示如何通过用个性化的信任等级提升消息替换默认的 Discourse 叙事机器人欢迎流程,来定制新用户的入职体验。您将了解到如何:

  1. 设置站点联系人用户
  2. 修改默认的 discobot 设置
  3. 自定义不同信任等级的系统消息
  4. 调整入职流程的时机

设置站点联系人用户

  1. 导航到您的站点设置
  2. 找到“site contact username”(站点联系人用户名)设置
  3. 将其设置为您喜欢的用户名(默认为空)

例如:

Screenshot showing site contact username setting

设置好用户名后,使用以下内容自定义用户个人资料:

  • 一个合适的头像
  • 全名
  • 组别和徽章
  • 联系选项

这是一个自定义的站点联系人用户示例:

修改默认 discobot 设置

  1. 在您的站点设置中,搜索“narrative bot”(叙事机器人)
  2. 确保欢迎帖子已禁用(这是默认设置)
  3. 考虑禁用公开回复

以下是推荐的设置:

自定义系统消息

Discourse 会为信任等级 1 和信任等级 2 的提升发送系统消息。要自定义这些消息:

  1. 前往 admin/customize/site_texts
  2. 找到并修改以下变量:
  • 信任等级 1 消息:
    • system_messages.welcome_tl1_user.text_body_template
    • system_messages.welcome_tl1_user.subject_template
  • 信任等级 2 消息:
    • system_messages.tl2_promotion_message.text_body_template
    • system_messages.tl2_promotion_message.subject_template

:information_source: 注意: 没有内置的信任等级 3 提升的系统消息。如果您想在用户达到 TL3 时通知他们,您可以使用 Automation 插件,通过授予“Regular”徽章或将用户添加到 trust_level_3 组来触发发送消息。

调整 discobot 教程(可选)

如果您仍希望用户能够访问 discobot 教程:

  1. 在 TL1 消息中提及用户可以通过回复 @discobot start tutorial 来触发教程
  2. 修改以下内容来调整初始机器人消息:
    • discourse_narrative_bot.new_user_narrative.hello.message
    • discourse_narrative_bot.new_user_narrative.hello.title

设定入职流程时机

要控制新用户何时收到第一条消息:

  1. 在您的站点设置中,找到“tl1 requires”(TL1 要求)
  2. 根据您的偏好调整设置

例如:

结果

实施这些更改后:

  1. 新用户注册后不会立即收到通知
  2. 他们收到的第一条消息将是来自您的站点联系人用户的 TL1 欢迎消息
  3. 该消息将包含您定制的内容,并来自您配置的站点联系人用户

这是可能的外观示例:

Screenshot of a custom welcome message notification

15 个赞

Why do we need to disable the welcome bot? Just so that users will not receive a message from discobot or is it really required in order for the custom contact to work?

1 个赞

You don’t disable the narrative bot with that specific setting. You disable the welcome post being sent by the bot. And yes, that’s sort of necessary if you don’t want to send out welcoming messages twice.

Disabling other bot features is not. If you want the bot to spell out what else it can do, you can always type @discobot display help in a message or post.

1 个赞

Hmm, do you mean the other welcoming message is the one for TL1? But usually users start from TL0, so they will not receive this message immediately.

2 个赞

Yes, that’s actually one of the two motivations for this set-up:

  • not having a bot welcoming new users
  • not sending out an immediate message that directs users away from your main forum content on signup

I should probably state that in the first post… @team, could this be a wiki post?

I think ideally these considerations wouldn’t be bundled and you could just pick a user that sends all welcoming/onboarding messages (tl0, tl1, tl2).

Another more ideal solution to welcome tl0 - but not direct them away from the main content - could actually be a “tl0 welcoming banner”. That’s a bit fiddly to setup as such… but could be a good use case for a simple component :bulb:

3 个赞

Got it - makes sense now :slight_smile:

3 个赞

How? By setting discourse narrative bot welcome post delay to 0?

2 个赞

When you filter settings for narrative bot then there’s a dedicated setting: disable discourse narrative bot welcome post.

3 个赞

我们可以预览消息吗?还是只能通过创建测试用户并授予用户信任级别来查看自定义消息?

3 个赞

是的,至少我只知道通过这种方式进行。您可以预览电子邮件模板,但似乎没有后端选项可以预览系统消息。

3 个赞

你好 @manuel,如果我禁用休息室会发生什么?我的社区成员无法使用该类别,因此这两个文本似乎无法自定义。这是否意味着在我的情况下,当成员达到 TL3 时,他不会收到欢迎消息?

1 个赞

这些真的存在吗?我找不到它们

4 个赞

我不确定他们是否这样做。 :baymax_no:


我认为它们很可能在不久前与预先播种“休息室”类别一起被移除。我认为它们是“休息室”类别“关于”主题的内容。

4 个赞

标题与 subject_templates 有何区别?我现在将它们保留为默认设置,但我想知道它们何时会被使用或看到。

1 个赞

您好,

我无法在站点文本中找到等级 2 或等级 3 的消息。它们还存在吗?

我非常确定信任等级 3 的消息及其相关文本不存在。我在 2024 中找不到它们,并且从那时起它们也未被添加。

system_messages.tl2_promotion_message.text_body_templatesystem_messages.tl2_promotion_message.subject_template 仍然存在

好的,谢谢,我现在将进行一级消息传递。

Lounge(休息室)以及针对 TL3 用户的那些 lounge_welcome 消息已不存在。OP(原帖)可能需要编辑了。

如果需要,您可以修改 TL3 的站点文本(Site Texts)来描述徽章:

badges.regular.description

badges.regular.long_description

您还可以发送一条消息,其中包含由常规徽章授予或用户被添加到 TL3 组触发的 automation 插件,但这与自定义现有晋升消息无关。

1 个赞

感谢 @Moin

一切都很有帮助!我昨天添加了 automations(自动化)插件,所以可以用它作为一种变通方法。我们有自定义徽章,所以我可以尝试用其中一个来实现与信任等级 2 和 3 类似的消息!