Discourse Voting

Summary: This plugin is the result of the spec put together by @erlend_sh. It gives you the ability to vote on topics in a specified category.

:link: GitHub: GitHub - discourse/discourse-voting: Adds the ability for voting on a topic within a specified cat
:arrow_right: Install: Follow the plugin installation guide.

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, 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 you’ll see given different states of the user and topic:

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

Configuration

A few points about the backend:

  • The number of active votes is configurable and defaults to 10.
  • If the topic is closed or archived, the votes are released to the users and can be applied to other topics but the vote count on the topic remains.
  • 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 and they go over their limit, they simply need to wait until topics are closed or archived to allow them to vote again.

CHANGELOG

TODO

  • Create a section for the user to see their active and archived votes.
  • Allow moderators/staff/admins to see who has voted on a topic.

NOTES

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.

EXTRAS

Data Explorer Queries

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

--[params]
-- int :topic_id

SELECT
dvv.user_id,
email
FROM discourse_voting_votes dvv
JOIN user_emails ue ON ue.user_id = dvv.user_id
WHERE topic_id = :topic_id
AND ue.primary = true
102 Likes
Suggestion: display vote/like counter in main page
Displaying "Likes" more prominently
Plugin: Feature voting separated from Likes
Building an Amazon Discourse pilot, planning for scale
Two new plugin outlets - user_activity_bottom and user_menu_glyphs
Overwriting controllers in plugin
Are there Upvotes/Downvotes, Score for the Posts?
Voting vs Likes for feature requests
How can I make a Discourse forum as "reddit like" as possible
Poll in restricted topic where users can’t reply
Alternative Voting Category Style
Sort topics on frontpage daily by Votes
Thoughts on a plugin which turns discourse into stackoverflow
A new versioned API for client side plugins
Mounting widget in raw template?
Question Answer Plugin
Liking own posts — a specific use case of discourse
UserVoice vs Discourse
Votes not being released after close
Show votes in post list "totals" columns
Multiple Choice Poll questions
Is Decision Making Possible on Discourse?
Advice for getting my little game dev community "out there?"
I need someone who can install a voting plugin
Looking to switch from Vanilla, and have a few questions
Comment on a question instead of answering it
Ranking of post, based on user upvotes
Notice: testing Discourse Reactions here on meta for 1 week!
Views counter specification
Excluding Suspended, Silenced and Suspect Users When Exporting
Additional Appreciation buttons next to "Likes": "Insightful", "Actionable"
Topic Voting plug-in
Marked as solved, Vote Replenishing & Querying
'How's my driving' plugin?
Delegate poll votes to another person/persons
Can posts be rated or voted on?
Unable to see 'Like' button in the first post/topic
Customize # of Votes per User
Ratings instead of Hearts for Likes
Show total votes next to total replies, views and activity columns
Why do official plugin topics auto-delete responses?
Muted topics still notifying me on Meta
Hook for a topic's category id?
Multiple topics in single API request
Some plugins not working after upgrade
A tour of how the Widget (Virtual DOM) code in Discourse works
Plugin: Feature voting separated from Likes
Wanted: Discourse Hacker News Plugin
Restricting poll creation to Trust Levels
Prospective Feature: Highlight Posts That Surpass Defined "Likes" Threshold
Is it possible to do Uservoice style voting with the voting plugin
Question Answer Plugin
Approach to a Nominate Post Button?
Is there any plugin for downvoting questions and replies in Discourse
Feature request: Poll with ability for user to add their own options
ProCourse Support
Some things I've built which you can use
Topics that were voted on disappear from user profile after being closed
Discourse as a Virtual Conference Platform
Voting/ideation feature
Introducing ProCourse
Promote or demote suggestions
Rake task for merging users

I can’t see whether this question has been asked before, since replies are deleted after a month.

Has it been considered to add an optional feature for downvotes to the voting plugin, as well as upvotes as supported today? This is a feature that has been requested several times by our community. We are using the voting plugin for feature requests for our software, and this would give us better data to help decide whether a feature request is controversial.

It is been asked before many times but we feel pretty strongly that downvoting isn’t conducive to healthy online behaviour.

You could consider sponsoring the work to build a plugin if it’s important to you. Alternatively, some people use Discourse Reactions - Beyond Likes (the thumbs down emoji) for something similar.

3 Likes

It’s the same reason why Facebook Inc. also don’t include the dislike button on facebook & instagram.

If you dislike the post, skip it. move on. don’t interact. simple

This makes a lot of sense for normal posts (where I agree we definitely shouldn’t add a “negative” reaction), but maybe not so much for feature requests. If I don’t care one way or the other whether a feature request is implemented, then I’ll just skip it and move on. On the other hand, if I have a good reason to think that a feature request would be harmful, then the downvote is useful. This would also be useful for us as maintainers to have a data-driven way to assess whether a given feature is universally accepted or more likely to cause problems.

It seems to me like this would be best done as an enhancement to the existing voting plugin, or a separate plugin which complements the voting plugin. How would we go about obtaining proposals for this work?

One way to mitigate the social impact of downvoting would be to treat it like Stack Overflow does: the number displayed to most users is an aggregate, and you need a certain level of permissions to see the number of upvotes vs. downvotes.

1 Like

Generally we’d encourage discussion around concerns with a feature rather than a downvote but I accept that not all communities are alike!

Voting is an official plugin that we maintain so it isn’t likely to be added to that anytime soon.

Your best way forward is to find a freelancer who can build you something by posting in the #marketplace stating your specs and budget.

3 Likes

Yep, after thinking about it some more, I agree with this too.

1 Like

By the way, this question is probably going to come up again - why not split it out into a separate thread so that others can find it later?

Or maybe just don’t auto-delete replies to plugin topics where the discussion might prove useful in the future? I am still unclear on why this is the policy, and I’ve asked before with no clear response. :confused:

1 Like

The questions were not in this topic. Did you search first?
https://meta.discourse.org/search?q=downvoting

Because these plugin topics are intended to be documentation for the plugin – they are the source of truth. Having very long discussion history makes for a pretty awful experience for people coming to this topic for the first time, simply to find out how the plugin works. If you want to ask a question or start a discussion about a topic, it makes more sense to create a new linked topic, to keep that discussion separate.

This topic is about the Voting plugin – it is not a discussion topic about why we don’t offer downvoting. That should be a separate discussion. :slight_smile:

1 Like

Perhaps open a new topic about it if there is none, no point in me answering here, it will be deleted.

1 Like

Hi, and thanks for the great plugin!

I was experimenting with archiving topics when I noticed two things:

  • You can vote on open but archived topics
  • Closing → Archiving → Opening in that order causes the vote to be reclaimed while it is still archived

I’ve found a solution for the second one by unarchiving then rearchiving, or alternatively Closing → Opening → Archiving. However I wasn’t able to find one for the first one.

I apologize if the plugin wasn’t meant to be used that way :sweat_smile:, I had to re-open the posts to separate archived and closed topics.

Just dropping this here, though I don’t really mind since they’re small issues.

Keep up the great work, cheers!

Is there an easy way to make it so “0 votes” isn’t displayed in the category listing, but that indicator shown only when there is at least 1 vote? For a busy category with the “distribute votes to your top concerns” model, there will always be a lot of zeroes and that doesn’t look great.

1 Like