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 Mi Piace

Come parte del cambio di nome per il plugin Discourse Post Voting, abbiamo anche rinominato questo per completarlo. :partying_face: :slightly_smiling_face:

Quindi vi do ufficialmente il benvenuto a tutti nel plugin Discourse Topic Voting. :tada::balloon::champagne:

14 Mi Piace

Mi piace molto questo plugin. Lo uso per una categoria riservata agli articoli del blog. Quando si accede a una categoria con questo plugin abilitato, sarebbe possibile ordinare l’elenco degli argomenti per numero di voti decrescente?

grazie ancora!

1 Mi Piace

2 post sono stati divisi in un nuovo argomento: I voti non vengono restituiti alla chiusura dell’argomento

Noto che nell’animazione su

l’utente scopre solo che

  • ha in realtĂ  un numero limitato di voti
  • e ora gli rimangono solo xx voti

dopo aver cliccato per votare.

Forse dovrebbe scoprirlo tutto nel mouseover del pulsante di voto, prima di cliccare.

3 Mi Piace

2 post sono stati divisi in un nuovo argomento: ‘See who voted’ display issue

Per renderlo piĂš ufficiale, le tabelle del database di questo plugin sono ora migrate a topic_voting_ per corrispondere anche a quelle in post_voting_, insieme alle impostazioni del sito.

Quando i proprietari del sito aggiorneranno questo plugin, le query esistenti di Data Explorer che utilizzano le vecchie tabelle verranno automaticamente aggiornate per utilizzare i nuovi nomi delle tabelle.

6 Mi Piace

Come posso riattivare le reazioni di Discourse sul primo post di un argomento di voto?

Hai provato il suggerimento per riattivare i Mi piace?

2 Mi Piace

Ah scusa, l’avevo fatto ma pensavo non funzionasse finché non mi sono reso conto che stavo guardando i miei post, quindi non avrei dovuto aspettarmi di vedere un pulsante “mi piace” :laughing:

2 Mi Piace

È possibile aggiungere il pulsante di voto direttamente all’elenco degli argomenti?

1 Mi Piace

Penso che questo sia quello che stai cercando:

3 Mi Piace

C’è un modo per far votare automaticamente al creatore dell’argomento il primo voto per il suo post? Abbiamo un sacco di utenti che creano questi argomenti ma dimenticano di votare, ed è un piccolo fastidio doverglielo ricordare ogni volta. Mi stavo solo chiedendo :slight_smile:

Grazie per il plugin!

1 Mi Piace

Sono d’accordo. Senza che gli utenti sappiano che i voti sono limitati, non possono adeguare il loro comportamento, quindi l’obiettivo originale di incoraggiare gli utenti a votare in modo ponderato non viene raggiunto efficacemente.

È possibile disabilitare le votazioni degli argomenti per singolo argomento in una categoria? Vogliamo che la maggior parte degli argomenti nella categoria siano votabili, ma a volte vogliamo pubblicare argomenti non votabili. Vedo che c’è una proprietà su gli argomenti chiamata can_vote, ma non riesco a trovare da nessuna parte nell’interfaccia utente o in una chiamata API per aggiornarla. Sembra possibile dato che l’argomento “Informazioni sulla categoria XYZ” che viene creato inizialmente non è votabile.

@tyler.lamparter Forse questa impostazione nelle impostazioni della categoria?

@NateDhaliwal abbiamo questa opzione abilitata, ma mi chiedo se alcuni argomenti inseriti in quella categoria possano averla disabilitata. Quindi il 99% degli argomenti inseriti nella nostra categoria dovrebbe avere la votazione sull’argomento, ma alcuni pochi no.

Giusto. Non credo che sia possibile. Potresti essere in grado di nasconderlo con CSS, ma sarebbe difficile poiché queste modifiche sarebbero a livello di tutto il sito, non per argomento…

Il motivo per cui sembra possibile è che c’è un flag can_vote su ogni argomento che già determina ciò che viene visualizzato nell’interfaccia utente. Non vedo alcun modo per aggiornare questo flag tramite API o impostarlo tramite interfaccia utente.

L’argomento “Informazioni su questa categoria” che viene creato ogni volta che viene creata una nuova categoria:

Un argomento che uno dei nostri utenti ha pubblicato nella categoria:

1 Mi Piace

Per la categoria Feature qui le opzioni di voto e le informazioni sono nascoste con un piccolo CSS basato sul tag per gli argomenti feedback.

2 Mi Piace