# Discourse 主题投票

**URL:** https://meta.discourse.org/t/discourse-topic-voting/40121
**Category:** Plugin
**Tags:** official, topic-voting, included-in-core
**Created:** [2016年二月24日 20:59 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121 "2016-02-24T20:59:09Z")
**Posts on this page:** 19
**Page:** 2

<div class="post-metadata">

### Author: ![nivshah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nivshah/32/120679_2.png) [@nivshah](https://meta.discourse.org/u/nivshah)
#### Post date: [2025年五月20日 12:43 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/305 "2025-05-20T12:43:39Z")

</div>

我非常喜欢这个插件——感谢开发者们为它所付出的努力，它对我的Discourse社区帮助很大。

我很好奇用户在用完所有投票后是否会获得额外的投票额度。我曾多次增加用户投票的上限，因为我们一些最活跃的社区成员会对许多话题进行投票。我在想是否可以随着时间为特定用户重新生成投票数，直到达到上限，或者是否有其他方式来奖励用户额外的投票。似乎授予投票的主要机制是为整个信任层设定一个静态数字，但我可能遗漏了某些东西。

谢谢！

---

<div class="post-metadata">

### Author: ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)
#### Post date: [2025年五月25日 06:33 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/306 "2025-05-25T06:33:59Z")

</div>

嘿 nivshah 👋

> [@nivshah](#):
>
> 社区成员对许多主题进行投票

如果我必须猜测，你可以限制投票的原因是让你的成员明智地使用它们，而不是投票给所有东西，否则投票就会贬值。

* * *

> [@nivshah](#):
>
> 选票可以重新生成

目前，用户可以通过关闭主题来收回选票。假设你决定在游戏中实现投票功能，你可以关闭该主题，这将退还用户的选票（如果你愿意的话），他们将能够将其用于另一个主题。

---

<div class="post-metadata">

### Author: ![nivshah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nivshah/32/120679_2.png) [@nivshah](https://meta.discourse.org/u/nivshah)
#### Post date: [2025年五月25日 13:27 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/307 "2025-05-25T13:27:10Z")

</div>

结束一个话题正是我在这里所需要的。谢谢你。

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2025年七月22日 13:14 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/308 "2025-07-22T13:14:29Z")

</div>

🥳 此插件现已作为 [Bundling more popular plugins with Discourse core](https://meta.discourse.org/t/bundling-more-popular-plugins-with-discourse-core/373574?u=tobiaseigen) 的一部分，与 Discourse 核心捆绑在一起。如果您是自托管用户并使用了此插件，则需要在下次升级前将其从您的 `app.yml` 中移除。

---

<div class="post-metadata">

### Author: ![Michelle\_B](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michelle_b/32/506005_2.png) [@Michelle\_B](https://meta.discourse.org/u/Michelle_B)
#### Post date: [2025年八月27日 18:09 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/309 "2025-08-27T18:09:59Z")

</div>

我可能错过了，但是一旦提交了投票，是否可以更改投票？例如，如果用户不小心投票给了错误的主题，或者改变了主意——他们是否会一直错下去？

---

<div class="post-metadata">

### Author: ![twofoursixeight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/twofoursixeight/32/574822_2.png) [@twofoursixeight](https://meta.discourse.org/u/twofoursixeight)
#### Post date: [2025年九月13日 16:57 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/310 "2025-09-13T16:57:16Z")

</div>

根据我所在的论坛上的一个帖子，他们现在似乎可以被点赞了：[Suggestion Topics can be liked now - Not Terraria Related - Dark Gaming](https://forum.dark-gaming.com/t/suggestion-topics-can-be-liked-now/35743?u=twofoursixeight)

我不确定这是否是故意的，但我想让你知道。

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2025年九月13日 17:26 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/311 "2025-09-13T17:26:31Z")

</div>

我认为这是因为启用了 reaction 插件。来自隐藏点赞按钮的主题投票插件的代码没有隐藏 reaction 按钮。

> <https://github.com/discourse/discourse/blob/ed6beea336f0f75fbfa40a778cd35730573a55bb/plugins/discourse-topic-voting/assets/stylesheets/common/topic-voting.scss#L67-L72>

你需要一些 CSS 来隐藏 reaction 按钮和现有的 reactions。类似这样：

```css
.topic-post.voting-post {
  .discourse-reactions-actions,
  .discourse-reactions-actions-button-shim {
    display: none;
  }
}

```

---

<div class="post-metadata">

### Author: ![evenlo](https://avatars.discourse-cdn.com/v4/letter/e/4bbf92/32.png) [@evenlo](https://meta.discourse.org/u/evenlo)
#### Post date: [2025年十一月13日 08:59 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/312 "2025-11-13T08:59:47Z")

</div>

您好，

我们注意到以下控制每个信任等级（Trust Level）的活跃投票限制的站点设置：

- `topic voting tl0 vote limit`

- `topic voting tl1 vote limit`

- `topic voting tl2 vote limit`

- `topic voting tl3 vote limit`

- `topic voting tl4 vote limit`

我们希望有效地 **移除或禁用** 所有或大部分信任等级（TLs）的投票限制，允许用户拥有无限数量的活跃投票。

您能否就实现此目标的推荐方法提供建议？

这些设置是否存在一个特定的值（例如，设置为 `0` 或 `-1`）来表示 **无限投票** ？

谢谢。

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [2026年一月9日 02:07 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/313 "2026-01-09T02:07:01Z")

</div>

> [@unknown\_error](#):
>
> ……自动让主题创建者为他们的帖子投下第一票？

这在您的情况下听起来很方便——但主题创建者不一定_总是_想为该主题投票。我在别处发表的评论：

> [@Self voting on topics](https://meta.discourse.org/t/self-voting-on-topics/127280/7?u=toddz):
>
> When votes are a limited commodity it seems appropriate to let the topic author decide whether to spend one of their own votes on their own topic. A staff member might, for instance, post a feature suggestion that they don’t personally care about, just to gauge community interest.

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [2026年一月9日 02:12 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/314 "2026-01-09T02:12:53Z")

</div>

您可以随时取消对主题的投票。每位用户可用的投票数量有限，因此这是必要的。

---

<div class="post-metadata">

### Author: ![unknown\_error](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@unknown\_error](https://meta.discourse.org/u/unknown_error)
#### Post date: [2026年一月28日 20:31 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/315 "2026-01-28T20:31:58Z")

</div>

说得好。不过，我希望它能成为一个可配置的选项。

---

<div class="post-metadata">

### Author: ![Zanbabe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zanbabe/32/300386_2.png) [@Zanbabe](https://meta.discourse.org/u/Zanbabe)
#### Post date: [2026年三月16日 12:04 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/316 "2026-03-16T12:04:03Z")

</div>

有没有一种方法可以配置高级搜索并按主题投票？我看到了这篇帖子，但它已关闭：[https://meta.discourse.org/t/is-there-a-way-to-filter-serach-results-based-on-voting/272279，我的用户很想知道。我们只有少数几个可以投票的地方，所以如果能限制高级搜索中的搜索结果并按投票数排序就太好了。](https://meta.discourse.org/t/is-there-a-way-to-filter-serach-results-based-on-voting/272279%EF%BC%8C%E6%88%91%E7%9A%84%E7%94%A8%E6%88%B7%E5%BE%88%E6%83%B3%E7%9F%A5%E9%81%93%E3%80%82%E6%88%91%E4%BB%AC%E5%8F%AA%E6%9C%89%E5%B0%91%E6%95%B0%E5%87%A0%E4%B8%AA%E5%8F%AF%E4%BB%A5%E6%8A%95%E7%A5%A8%E7%9A%84%E5%9C%B0%E6%96%B9%EF%BC%8C%E6%89%80%E4%BB%A5%E5%A6%82%E6%9E%9C%E8%83%BD%E9%99%90%E5%88%B6%E9%AB%98%E7%BA%A7%E6%90%9C%E7%B4%A2%E4%B8%AD%E7%9A%84%E6%90%9C%E7%B4%A2%E7%BB%93%E6%9E%9C%E5%B9%B6%E6%8C%89%E6%8A%95%E7%A5%A8%E6%95%B0%E6%8E%92%E5%BA%8F%E5%B0%B1%E5%A4%AA%E5%A5%BD%E4%BA%86%E3%80%82)

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [2026年三月16日 16:30 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/317 "2026-03-16T16:30:10Z")

</div>

高级搜索目前无法实现，但链接帖子中提到的过滤参数可能比乍一看更有用。虽然不如高级搜索选项方便，但可能聊胜于无：

您可以根据几种不同的投票因素进行过滤：

 ![我输入“votes”的过滤条目窗口，下拉菜单显示了可用的参数。](https://global.discourse-cdn.com/meta/original/4X/c/5/f/c5fe942c090e76b99169f1570ebf15cb8e2799f8.png)

根据您跟踪事物的方式，您可以：

- 添加 `status:open`
- 使用“-”前缀排除标签，例如 `-tag:completed`

因此，您可以使用如下过滤器查看最受欢迎的开放请求：

- **category:feature status:open order:votes**
- **category:feature -tag:completed order:votes**

然后，对于您的用户，您可以将过滤后的 URL 保存到侧边栏链接中：

- `/filter?q=category%3Afeature%20status%3Aopen%20order%3Avotes%20`
- `/filter?q=category%3Afeature%20-tag%3Acompleted%20order%3Avotes%20`

当打开一个过滤后的视图时，会显示过滤参数，用户可以添加额外的关键字以进一步缩小范围：  
 ![带有添加到现有参数的关键字的过滤条目窗口。](https://global.discourse-cdn.com/meta/original/4X/f/2/c/f2cb048d6747049a6a602e166402f7a244a19185.png)

---

<div class="post-metadata">

### Author: ![Zanbabe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zanbabe/32/300386_2.png) [@Zanbabe](https://meta.discourse.org/u/Zanbabe)
#### Post date: [2026年三月17日 12:41 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/318 "2026-03-17T12:41:52Z")

</div>

不是很完美，但看起来比我最初意识到的有更多的可能性。谢谢你。

---

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [2026年五月22日 13:47 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/319 "2026-05-22T13:47:27Z")

</div>

在我刚刚运行的更新中，那个写着 **投票** 的大按钮不见了，现在只剩下一支小箭头，很容易被人忽略。  
我的用户大多不太懂技术，他们不会知道点击那支箭头就是投票。

有没有办法恢复成旧的视觉布局？

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [2026年五月28日 18:44 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/320 "2026-05-28T18:44:51Z")

</div>

嗨，今天早上，我网站上的投票功能和投票按钮完全消失了……🙄

完全不知道发生了什么……Topics 投票插件有什么更新吗？

我在控制台中看到了这些错误，会不会是相关的？

另外，这种情况只发生在我三个 Discourse 站点中的一个上。

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/5/a/e5a4ca0ecb1863342637fb2d3e80e74f369df711.png)

谢谢。

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [2026年五月29日 21:18 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/321 "2026-05-29T21:18:16Z")

</div>

你好，我想我已经找到问题的根源了：未被标记为「创意」的类别无法显示投票按钮。我已从所有类别中移除了「创意」类型——当然，除了那些我打算作为创意建议的类别。这些类别仍然保留着投票按钮，但其他仅用于讨论的类别则失去了该按钮。我认为这是一个故障。

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [2026年六月5日 01:23 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/325 "2026-06-05T01:23:12Z")

</div>

> [@patrickemin](#):
>
> 那些分类仍然有投票按钮，但其他仅用于讨论的分类已经失去了它们的投票按钮。

你能稍微详细说明一下吗？如果你移除了“想法”（Ideas）分类类型（该类型控制分类主题是否可投票），那么无法再对这些主题进行投票是合乎逻辑的。

或者你的意思是，你以前可以投票的分类中的主题现在无法再投票了？如果是这样，请提供一些示例分类及其 ID。在你的站点 Rails 控制台中，你可以运行 `Category.can_vote?(cat.id)` 来查看某个分类是否应该允许投票。

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [2026年六月5日 01:44 UTC](https://meta.discourse.org/t/discourse-topic-voting/40121/326 "2026-06-05T01:44:53Z")

</div>

早在为类别分配不同类型（如支持、创意或讨论）的功能出现之前，投票功能就已经存在了。因此，我的网站被配置为在几乎所有类别中启用投票，仅排除了少数几个类别。

当为类别引入“创意”类型时，如果我的记忆没错，它会自动应用到我的所有类别，而无需我进行任何操作。当时我觉得这有点奇怪。当然，在那时，由于我的所有类别都被分配了“创意”类型，我仍然可以像以前一样进行投票。

当我意识到“创意”类型按定义仅适用于创意，并排除了其他类型的主题时，我决定做出一些调整。由于我不希望人们仅对创意进行投票，也希望他们对讨论或支持等其他类型进行投票，因此我从大多数类别中移除了“创意”类型——当然，那些专门用于创意的类别除外。

然而，在我看来合乎逻辑的操作却导致我在所有移除了“创意”类型的类别中无法再进行投票。我完全没有意识到，未设置为“创意”类型的类别会禁止投票。在我的理解中——这一点至今未变——我们应该能够对不仅仅是创意的主题类型进行投票。

我理解得有点晚，意识到这并不是平台开发者设计“创意”类别的初衷。因此，我随后在所有类别中重新添加了“创意”类型，并在适用的情况下同时保留“讨论”或“支持”类型，从而解决了我的问题。不幸的是，这耗费了大量时间，因为我不得不逐个类别手动恢复设置。

是的，需要明确的是，在更新过程中自动应用到我的所有类别（我推测是那些我启用了投票的类别）的“创意”类别类型，虽然保留了投票功能，但同时也为我的所有类别添加了“创意”类别类型，而这完全不是我想要的，因为大多数类别根本不是创意……看到这种情况后，我从几乎所有类别中移除了“创意”类型，但这同时也禁用了投票功能。而我花了相当长的时间才弄清楚这一点。

[上一頁](https://meta.discourse.org/t/discourse-topic-voting/40121.md?page=1)
