Discourse 年度回顾

:discourse2: Summary Discourse Yearly Review creates a topic on January 1st that summarizes the previous year’s forum activity. (See our examples here on Meta - year-in-review)
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-yearly-review
:open_book: Install Guide How to install plugins in Discourse

Initial Setup

Head to your /admin/plugins page to click the discourse-yearly-review :gear: Settings button:

Yearly Review settings

  1. Enter categories to pull data from into the yearly review categories setting. If left blank, it will default to the top 5 public categories.

  2. Using the yearly review publish category setting, choose a destination category for the review to be posted.

    :bulb: It is highly recommended to set the yearly review publish category to the staff or other private category so that you can view the topic before making it public. You might also like to edit it first.

  3. Then, enable the plugin using the yearly review enabled setting.

Features

As you can see at 2022: The Year in Review, data is displayed in two sections - users and topics.

The users section includes:

  • Most Time Reading
  • Most Topics Created
  • Most Replies Created
  • Most Replied to
  • Most Likes Given
  • Most Likes Received
  • Most Visits
  • Users who have been granted a featured badge (the badge is set by the yearly review featured badge Site Setting

The topics section includes:

  • Most Read
  • Most Liked
  • Most Replied to
  • Most Popular
  • Most Bookmarked

Generating the Yearly Review

The plugin sets thresholds for deciding which topics to display. There need to be a minimum of 10 likes or replies, 5 bookmarks, a score of 10, or one hour’s read time before a topic will be displayed. The topic is published automatically through a background job. The job checks that the plugin is enabled and that it is within the first 31 days of the first month of the year. It then checks to see if a topic with the title yearly_review.topic_title has already been published by the system user. If all checks pass, the topic is published to the category set in the yearly review publish category setting. If this is not configured, the topic will be published to the Uncategorized category.

Extra Options

Yearly review categories

Categories used in this section are those set in the yearly review categories Site Setting. If this setting is not configured, the 5 best public categories from the forum will be chosen. “Best” is determined by the category topics_year count.

Sub-categories of any categories specified in the yearly review categories Site Setting will not be included in the yearly review report. If you want sub-categories to be included in the yearly review report, you will need to explicitly specify them in the yearly review categories Site Setting.

Yearly review exclude staff

The plugin has a yearly review exclude staff setting. It is enabled by default so that staff members are excluded from the users section and topics created by staff are excluded from the topics section.

Yearly review featured badge

A featured badge can be set via the yearly review featured badge setting. A maximum of 15 badge users are displayed. If more than 15 users have been granted this badge, a link to the badge’s page is displayed. If the yearly review featured badge is not configured, this section will not be displayed.

Running the Yearly Review manually

If you don’t want to wait for the background job, you can publish the topic from the rails console with:

Jobs::YearlyReview.new.execute(force: true)

If you want to generate a report for a specific year just add review_year: 'year', e.g.:

Jobs::YearlyReview.new.execute(force: true, review_year: '2021')

:discourse2: Hosted by us? If you would like to run the Yearly Review manually you can contact us at team@discourse.org and we’ll be happy to arrange that for you.

Settings

Name Description
yearly review enabled Enable the yearly review.
yearly review categories Public categories to pull topics from. The top 5 categories from this group will be selected. If left blank will default to the top 5 public categories.
yearly review exclude staff Exclude Staff from user stats.
yearly review include user stats Add user-identifying stats to the first post of the review topic.
yearly review include private categories Include user activity from private or read-restricted categories in the review.
yearly review publish category The category the review will be published in.
yearly review featured badge Enter the full badge name. Can be left blank.

:discourse2: Hosted by us? This plugin is available on all of our hosting tiers Yearly Review | Discourse - Civilized Discussion


Known Issues

  • The data is displayed in HTML tables. Tables are wrapped in div tags that have data-review-topic-users="true' and data-review-featured-topics="true" attributes. This allows the tables to be styled when they are displayed on Discourse. The styles are not copied when emails for the topics are created. Emails sent out for the topic don’t look great.

  • The first post in the generated topic is ≈ 40,000 characters due to using HTML. As a result, it cannot be edited unless you first increase the body character limit above this (see Body is limited to 32000 characters; you entered 43659)

  • emojis in titles are not rendered in the featured topic links

Last edited by @nathank 2025-01-06T21:23:15Z

Check documentPerform check on document:
88 个赞

这个插件可以做一些不错的改进,希望我分享的地方是对的?如果不对请告诉我。

  • 能够从用户列表中排除员工,但仍然包含他们创建的主题
  • 能够从用户列表中排除TL4(和上面一样,仍然包含他们创建的主题)
  • 能够创建多个审核帖子,这样我们就可以有一个用于TL4(我们将其用于员工)和员工成员,然后有一个仅限社区成员的帖子
5 个赞

您好!
我今年安装了该插件,但即使它已启用,我也不知道评论何时发布,或者我是否需要做其他事情来发布它。
有人能告诉我吗?
非常感谢!!

2 个赞

您好 @Ayelen_Rives

在检查管理控制台时,您将看到以下可视化辅助工具:

在名为“plugin:discourse-yearly-review”的插件中进一步仔细检查,会发现另一个说明性示例:

在配置设置时,您必须将年度审查的发布类别指定给员工或其他受限类别。这可确保在允许更广泛的可见性之前进行初步审查。

6 个赞

非常感谢你,Aaron!

出乎意料的是,我在管理控制台或设置中都看不到这些消息:

发布类别是 Staff,所以要到 1 月 1 日我才能知道它是否已创建。

再次感谢,节日快乐!

2 个赞

新年快乐!:partying_face:

该插件在我的两个论坛中均未运行。现在显示的是2025年1月1日的消息。奇怪。

我在一个论坛的rails控制台中手动运行了它,它返回的是英语,而不是论坛的语言德语。

这里有些东西有问题/曾经有问题。

2 个赞

它在这里的元(meta)上还没有到达。我遵循了建议,并将其设置为先发布到“Staff”,我认为这与去年唯一的区别?

我曾希望它能随着一点耐心神奇地出现,但我可能过于乐观了。

2 个赞

我没有更改任何配置,甚至没有更改论坛,以便我作为工作人员先检查它,然后再移动它。

在我的第二个论坛里仍然什么都没有。现在这里是上午 11:24。

看起来有些东西坏了。

手动运行它时是否需要语言标志?我也不想在第二个论坛里翻译所有内容。:wink:

1 个赞

我可能会犹豫一下,想再等一会儿,看看后台作业是否会有延迟,但我也不确定为什么手动触发它会与后台作业自行运行产生不同的结果?

我们可能需要一个更有知识的人来帮忙。

3 个赞

它没有自动运行,但我刚刚手动运行了它,似乎运行正常,尽管我并不想要它变成另一种语言。

1 个赞

今天早上,sidekiq 告诉我年度审查将在 50 分钟后安排,目前大约是当地时间上午 11 点。我没有等待,而是手动完成了。没有问题,语言也是正确的。

之后,我被迫降级了我的版主并再次运行 sidekiq,因为他们非常生气——我排除了员工……我不能包含员工,因为那样我作为一名非常活跃的管理员将完全主导列表,所以我选择了最快的路线。

嗯,那是另一回事了,但我们能否在包含或排除组方面有更多的自由?

2 个赞

我的天……在另一个论坛上,2023 年的帖子在那里……当地时间下午 2:31。而且是德语。所以,仍然是个谜……

1 个赞

我最终从 Sidekiq 触发了我们的。 :rocket:

2 个赞

在我的网站上,主题是在我无需手动运行 sidekiq 的情况下生成的。

这些都是很棒的建议。谢谢!很高兴听到这个插件有更多的用例。我们将根据今年的经验对此进行更仔细的研究,看看我们可以在明年之前做些什么来改进它!

与此同时,这一次,您可以在帖子发布后根据需要进行编辑。

我注意到一个有趣的现象是,如果您删除生成的主题,它会在第二天创建一个新主题,只要插件已启用。因此,您可以调整设置并生成年度审核主题的多个版本,复制其中的文本,然后根据需要自行发布新主题。如果您可以访问 /sidekiq,您可以在那里找到该作业并立即运行它。

2 个赞

因此,建议先在更私密的类别(例如“员工”)中发布评论,然后再移至公开类别,这个建议其实不太好 :wink: 除非管理员想保留两个版本。

不过,问题不大。

1 个赞

您好!幸运的是,该插件已于1月1日自行触发,没有任何问题!:raised_hands:

我现在有一些关于它是如何工作的问题,因为一些报告(如“最多主题”和“最多点赞”)显示的结果与同一时期的“用户”页面不同。

例如,对于“最多主题”,用户页面显示用户“S”排在第一位:

而“年度回顾”显示用户“C”排在第一位,并且在表格中从未显示用户“S”:

(抱歉,我必须为公司保密而模糊图片,但我认为添加它们会更清楚。另外,表格坏了,您可以忽略它 :upside_down_face:)

有人知道为什么会发生这种情况吗?其他报告显示的信息完全相同,但“最多主题”和“最多点赞”显示的用户不同。

非常感谢您的帮助!:100:

1 个赞

哇,我之前不知道会发生这种情况。我刚测试了一下,你说得对!这是一个 bug。如果已经存在一个年度审查主题,它不应该再创建一个。

重现步骤:

  1. 一旦创建了年度审查主题,将其移至其他类别。
  2. 通过 /sidekiq 触发创建年度审查主题。
  3. 会创建第二个年度审查主题。

如果你遇到了这个问题,我建议禁用该插件。我们很快就会审查这个插件,在明年之前修复 bug 并对其进行改进。

1 个赞

:thinking: 它有多持久?如果我一直删除它,我们会在六月份还在跳这个舞吗? :joy:

这是否意味着我不需要联系支持部门来为我的网站追溯生成帖子?它会在明天某个时候出现吗?

1 个赞

确实如此。它每天通过 Sidekiq 运行。

1 个赞

我希望它会在一月底停止。

2 个赞