Discourse Topic Voting

:discourse2: Summary Discourse Topic Voting gives the ability to vote on topics in a specified category.[1]
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Features

To enable it, edit any category, look on the settings tab for the “Allow users to vote on topics in this category” checkbox:

Once enabled, a “Votes” item is available in the top menu. The topics in that category can be voted on with the count of votes added next to the topic title.

The vote count is also included next to the title when scrolled.

To make it easier to see vote counts from a topic list, the vote count is also added under the topic titles.

Here are the views a user will see before and after voting in a topic:

Screenshot 2024-05-13 at 10.08.17 AM Screenshot 2024-05-13 at 10.10.13 AM

There is also a section in the user’s profile page that displays their active votes:

Active Votes

The term Active Votes refers to the votes a user has cast in topics that are currently available for voting. Limiting Active Votes encourages users to vote thoughtfully for the topics that matter most to them.

  • The number of Active Votes available to each user is configurable by Trust Level. Default values:

    • TL0: 2
    • TL1: 4
    • TL2: 6
    • TL3: 8
    • TL4: 10
  • Each user may cast only one vote per topic.

  • When a topic is closed or archived, the vote count on the topic remains unchanged. These votes are no longer considered Active. The users who cast these votes will have their one vote from that topic restored to their pool of available votes.

  • If a topic is re-opened or unarchived, the votes are reclaimed and applied back to the users’ Active Vote count.

  • If a topic reclaims the votes of a user, causing them to exceed their Active Vote limit, they simply need to wait until topics are closed or archived to allow them to vote again.

  • If an entire topic (Topic A) is merged into another Topic-Voting topic (Topic B), all the the following takes place:

    1. Unique votes from Topic A are added to Topic B.
    2. Duplicated votes (the same user voted in both topics) from Topic A will not be added to Topic B. Instead, the vote from Topic A will be restored to the user’s pool of available votes.
    3. Topic A’s vote count is set to zero and the topic is closed so that no further voting can take place in Topic A.

Settings

Name Description
topic voting alert votes left Alert user when this many votes are left
topic voting enabled Allow users to vote on topics?
topic voting show who voted Allow users to see who voted?
topic voting show votes on profile Allow users to see their votes in their activity feed?
topic voting tl0 vote limit How many active votes are TL0 users allowed?
topic voting tl1 vote limit How many active votes are TL1 users allowed?
topic voting tl2 vote limit How many active votes are TL2 users allowed?
topic voting tl3 vote limit How many active votes are TL3 users allowed?
topic voting tl4 vote limit How many active votes are TL4 users allowed?

Category Setting

topic voting category setting

EXTRAS

:information_source: In the categories where the Voting plugin is activated, Likes are automatically deactivated. Some sites may want to use both functions at the same time to like replies, see how to re-enable Likes.

Data Explorer Queries

List people who voted for a topic along with their email addresses:

--[params]
-- int :topic_id

SELECT
tvv.user_id,
email
FROM topic_voting_votes tvv
JOIN user_emails ue ON ue.user_id = tvv.user_id
WHERE topic_id = :topic_id
AND ue.primary = true

More explorer queries can be found in Data & reporting - Topics tagged topic-voting

:discourse2: Hosted by us? This plugin is available on our Business and Enterprise plans Topic Voting | Discourse - Civilized Discussion


  1. and is the result of this spec put together by @erlend_sh ↩︎

Last edited by @southpaw 2025-07-25T02:39:13Z

Check documentPerform check on document:
「いいね!」 128

Discourse Post Voting プラグインのリネームの一環として、こちらも補完するためにリネームしました。 :partying_face: :slightly_smiling_face:

つきましては、Discourse Topic Voting プラグインへ皆様を正式に歓迎いたします。 :tada::balloon::champagne:

「いいね!」 14

このプラグインは本当に気に入っています。ブログ記事専用のカテゴリに使用しています。このプラグインが有効になっているカテゴリに入るとき、トピックリストを投票数降順で並べ替えることは可能でしょうか?

重ねて感謝いたします!

「いいね!」 1

2件の投稿が新しいトピックに分割されました:トピッククローズ時に投票が返されない

Topic Voting | Discourse - Civilized Discussion のアニメーションで、ユーザーはクリックするまで以下のことを知りません。

  • 実際には投票数が限られていること
  • 残り投票数が xx になったこと

クリックする前に、投票ボタンのマウスオーバーでこれらすべてを学ぶべきではないでしょうか。

「いいね!」 3

2件の投稿が新しいトピックに分割されました:「投票者表示の問題」/t/see-who-voted-display-issue/306641

より公式なものにするため、このプラグインのデータベーステーブルは、サイト設定とともに post_voting_ のテーブルに合わせるために topic_voting_ に移行されました。

サイトオーナーがこのプラグインを更新すると、古いテーブルを使用している既存のデータエクスプローラークエリは、新しいテーブル名を使用するように自動的に更新されます。

「いいね!」 6

投票トピックの最初の投稿でDiscourseリアクションを再度有効にするにはどうすればよいですか?

「いいね」を再度有効にするヒントを試しましたか?

「いいね!」 2

ああ、すみません、やりましたが、自分の投稿を見ていることに気づくまで機能していないと思っていました。そのため、いいねボタンが表示されることを期待すべきではありませんでした。:laughing:

「いいね!」 2

投票ボタンをトピックリストに直接追加する方法はありますか?

「いいね!」 1

お探しのものはこれだと思います。

「いいね!」 3

トピックの作成者が自分の投稿に最初に投票するように自動化する方法はありますか?多くのユーザーがトピックを作成する際に投票を忘れてしまい、毎回リマインダーを送るのが少し面倒です。ただ気になっただけです :slight_smile:

プラグインありがとうございます!

「いいね!」 1

私もこれに賛成です。ユーザーが投票が制限されていることを知らなければ、行動を調整できません。したがって、ユーザーに投票を慎重に行うよう促すという当初の目的は、効果的に達成されません。

カテゴリ内のトピックごとに投票機能を無効にすることは可能ですか?カテゴリ内のほとんどのトピックは投票可能にしたいのですが、時には投票できないトピックを投稿したい場合もあります。トピックに対して can_vote というプロパティがあることはわかっていますが、UIまたはAPI呼び出しでこれを更新する方法が見つかりません。最初に作成される"XYZカテゴリについて"のトピックは投票不可であるため、可能であるように思えます。

@tyler.lamparter カテゴリ設定のこの設定でしょうか?

@NateDhaliwal 私たちはそれを有効にしていますが、そのカテゴリに入れられたトピックの中には無効にできるものもあるのではないかと思っています。つまり、私たちのカテゴリに入っているトピックの99%はトピック投票が必要ですが、ほんの一部はそうであるべきではありません。

了解です。そうはできないと思います。CSSで隠すことは可能かもしれませんが、それは難しいでしょう。なぜなら、これらの変更はサイト全体に適用されるものであり、トピックごとではないからです…

トピックごとに can_vote フラグがあり、UI が表示される内容をすでに制御しているため、可能に見える理由です。このフラグを API 経由で更新したり、UI 経由で設定したりする方法がわかりません。

新しいカテゴリが作成されるたびに作成される「このカテゴリについて」トピック:

カテゴリにユーザーが投稿したトピック:

「いいね!」 1

#featureカテゴリの投票オプションと情報は、#feedbackトピックのタグに基づくCSSによって非表示になっています。

「いいね!」 2