Discourse帖子投票

|||
-|-|-|
:discourse2: | 概要 | Discourse Post Voting 允许创建带有可投票帖子的主题。
:open_book: | 安装指南 | 此插件已与 Discourse 核心捆绑。无需单独安装插件。

功能

要创建带有可投票帖子的新主题,请打开撰写器左上角的菜单,然后选择“切换帖子投票”:

在帖子投票模式下,有一个过滤器可以按投票数或活动量对答案进行排序。以下是一个实际示例:

配置

站点设置

安装后,该插件默认启用,可用的管理员设置如下:

设置 站点描述
post voting enabled 启用帖子投票插件
post voting undo vote action window 用户在帖子投票主题中撤销投票的允许时间(分钟)(输入 0 表示无限制)
post voting comment limit per post 每个帖子允许的评论数
post voting enable likes on answers 在帖子投票主题的回复中启用点赞按钮
min trust to flag posts voting comments 标记帖子投票评论的最低信任级别

特定于类别的设置

有两个类别设置可用。在类别页面上使用扳手并访问设置以查看这些:

:discourse2: 由我们托管? 此插件在我们的 Business 和 Enterprise 套餐中提供 Post Voting | Discourse - Civilized Discussion


致谢

此插件的灵感来自 Pavilion 在 Question Answer Plugin 上所做的出色工作。一如既往,感谢您对 Discourse 项目的持续贡献。 :medal_sports: :slight_smile:

63 个赞
Thoughts on a plugin which turns discourse into stackoverflow
Question Answer Plugin
Plugin: Ask me anything or Q&A format (threaded replies)
Any forum using the Q&A plugin?
How to get answer's comments? (stackoverflow-like & tiny)
A reddit-ish theme for Discourse
Voting Up the Best Answer!
Multiple Choice Poll questions
A case for downvotes and different ordering of replies
Post Voting comments ignore the Discourse Translator plugin
Points based currency to reward quality
Looking for a plugin for upvote/down votes
Building a plugin to add Stack Exchange features
Grow my community
But I didn't click Answer, I clicked Edit
Showing replies "in-place" like Reddit, instead of show 'em at the bottom
Badge Query (SQL)
Topics vs Posts vs Replies
Topic Ratings Plugin
Topic Ratings Plugin
Reordering a topic by ‘most liked’ or threaded replies
Renaming Discourse Upvotes [Post Voting]
- 1 like feature
How to simplify the forum? (couple of needs listed)
What Will be Best theme for a site like ecommerce
Is there any plugin for downvoting questions and replies in Discourse
Feedback on Our Community
'I have same question' theme/plugin
Journal Plugin
Looking for a plugin for upvote/down votes
Some users get javascript errors when trying to load our Discourse
Creating an Analytical Hub using Categories, Approval Process and Upvoting
Ordering replies by most liked
Custom embedded replies
No indication on post voting "Votes" tab that whispers exist
Nested comments feature
Whispers disappear from the display but still are in the database
No indication on post voting "Votes" tab that whispers exist
Whispers cannot be seen in Post Voting enabled categories
Bundling more popular plugins with Discourse core
Sort answers by number of likes in topic
How to make our forum looks like Q&A community than a forum?
Photo Competition or Contest - Do We Have Anything?
Admin setting for activity default sort order for Discourse Post Voting plugin
What would be the best plug-in for Contest with public voting in two categories?
Looking for a way to set the post section
Integrating Discourse and Stackoverflow?
Integrating Discourse and Stackoverflow?
Question Answer Plugin
Discourse Topic Voting
How do I get users to reply to each other? This doesn't appear on my site
Need a developer to get over the last couple of humps to launch our community
Question Answer Plugin
How to mention in Discourse comments, or disable commenting?
Journal Plugin
Community Notes in Discourse to Combat Misinformation
An error occurred while restoring from a backup: discourse_functions.raise_discourse_voting_category_settings_readonly() does not exist
Topic/replies structure
Referencing types of review items created by plugins
Debate / deliberation plugin
Question Answer Plugin
Customize new topic button text
A reddit-ish theme for Discourse

我有点像一个问答狂热者,所以我很高兴能在 Discourse 中看到这种新的帖子格式,并且对它看起来……如此熟悉……感到很有趣!我对它的功能以及它的可定制性有一些疑问。其中很多问题可能在插件包中已经得到了解答,但我想在这里也有帮助……

  1. 是否内置了针对该插件的教育内容,教用户了解该功能、如何/何时使用它等?我喜欢 @discobot——也许有一个问答的教程/入门模块?
  2. 您说管理员可以在某个类别中将默认设置为问答——如果他们这样做,帖子是否必须是问答,还是它们只是默认为问答?
    • 如果是默认设置,是否有选项可以强制要求?问答是否也可以按类别禁用?
  3. 如果一个类别被设置为默认问答,用户是否能注意到这一点?我看到帖子创建按钮会显示它是问答,但我可以想象一个经验丰富的用户第一次使用新添加的功能可能会让他们在提交之前忽略文本,而没有一些东西引起对帖子类型的注意。

感谢您让这个很酷的功能正式化!

3 个赞

是的,OP 需要更新,这些是类别设置中的当前选项

用户将在撰写器中看到一个不同的按钮。您可以通过文本自定义来更改按钮文本。

4 个赞

帖子已拆分为新主题:帖子投票的投票/回复是否可以通过 API 访问?

是否有人能够限制每个用户每个主题的投票数量?在我们的案例中,我们正在运行摄影比赛,我们希望每个用户每个主题最多只能投票 5 次。

2 个赞

您好,

此帖子中,我被引导到这里发布问题以提供反馈。


在上面链接的 OpenStreetMap 论坛的帖子中,该插件在某些类别中使用,讨论了该插件的用户界面方面的不足。

简而言之,存在以下问题:

此插件禁止回复回复。这是否应该强制执行,还是可以根据实例进行配置,这一点有待商榷,但如果启用,则会发生以下情况:

  • 用户可以选择一些文本并引用。用户可以输入回复。只有在最后发送回复时,才会出现错误消息并中止:

    发生错误:不允许您回复另一篇帖子。

    这个消息确实没有帮助。它没有说明哪里出错了。事实上,如果不允许回复,它就不应该允许“引用回复”。

  • 当通过电子邮件发送回复时,电子邮件会消失,而发件人不会收到通知。应该有一个退信,并附有说明错误的解释性消息。

  • 只允许评论。但是它们会吞噬一些格式(例如引用,请参阅此帖子上的评论),并且它们的字符数也有限制,禁止更复杂的想法。

此致!

4 个赞

一个帖子被拆分到一个新主题:如何隐藏“添加评论”选项

@Discourse

回复中的评论在5条后隐藏

如何移除5条评论的限制,并仅在显示评论选项时才出现?

我一直在寻找同样的东西,并惊讶于之前没有提出过这个问题。允许用户总是陷入错误状态(引用)并且评论中没有标记选项,这提供了非常不连贯的体验。此外,当用户尝试直接回复帖子时,错误消息不清楚。

我绝对希望看到改进,以帮助完善这种用户体验。

1 个赞

5条评论后,其他评论将被隐藏
如何设置成1条或2条评论后隐藏其他评论

关于这个很棒的插件,有几个问题:

  1. 第一个帖子(OP)为什么会有投票选项?这应该是问题,所以不应该像答案一样被投票吧?
  2. 有没有什么徽章 SQL 的提示,我可以用它来根据这些创建徽章?例如,在投票帖子主题中获得 10 票等……?
1 个赞

我发现了一个关于话题投票的,也许可以修改用于帖子投票?

此插件是否可以限制用户在一天内跨所有主题可以投出的反对票数量?

是否可以将此功能移至其他位置?我们希望将其放置在当前双按钮样式按钮的位置。

1 个赞

回复投票帖子中的用户时,我无法@用户。这是故意的还是一个bug?

1 个赞

是在评论中而不是在“正式”回复中?如果是这样,我认为这是故意的,以使评论比完整的编辑器体验更轻量级。这之前有人问过(https://meta.discourse.org/t/how-to-mention-in-discourse-comments-or-disable-commenting/314645),但我认为最终没有提交功能请求。

2 个赞

我认为也是这样。:slight_smile: 但Sam坚持认为这是网站的偏好设置:

看起来还没有关于这个的徽章。

如果你有具体的徽章标准,想要创建的话,应该为每一个在 Data & reporting 主题下提出。:+1:

我认为可以举几个例子:

在一个投票帖回复中获得10票

SELECT p.user_id, p.created_at AS granted_at, p.id AS post_id
FROM post_voting_votes pvv
  JOIN posts p ON p.id = pvv.votable_id
WHERE pvv.direction = 'up'
  AND p.post_number <> 1
  AND (:backfill OR p.id IN (:post_ids))
GROUP BY p.user_id, p.id
HAVING COUNT(*) >=10

或者一个更细致的例子,考虑“赞成票 - 反对票”的总数:

WITH vote_totals AS (

SELECT
    p.user_id,
    p.id AS post_id,
    p.created_at AS granted_at,
    (COUNT(*) FILTER (WHERE pvv.direction = 'up') - COUNT(*) FILTER (WHERE pvv.direction = 'down')) AS total
FROM post_voting_votes pvv
  JOIN posts p ON p.id = pvv.votable_id
WHERE p.post_number <> 1
GROUP BY 1, 2

)

SELECT *
FROM vote_totals
WHERE total >= 10
  AND (:backfill OR post_id IN (:post_ids))

:red_exclamation_mark: 这些需要进一步测试,以确保它们按预期工作。:slight_smile:

不过要考虑的一点是,总数是动态的,今天的“10”明天可能会变成“5”,如果添加了更多的反对票(对于第二个例子)。如果徽章只是基于赞成票,就像第一个例子一样,那么你可能获得了10票,但当计算了反对票后,UI只显示5票。

5 个赞

您好,刚刚在一家法国网站上启用了该插件,注意到分类设置中的第二个选项的法语翻译错误

Les nouveaux sujets ne peuvent être que des sujets postérieurs au vote dans cette catégorie.

应该为:

Les nouveaux sujets ne peuvent être que des sujets de vote de message dans cette catégorie.

解释:在“可以作为帖子的帖子”和“之后”的“之后”之间混淆。

你好,是否也可以为发布的帖子的主题激活投票?谢谢

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

1 个赞