Excellent info, thanks for writing up a detailed description @angus I feel much more comfortable utilizing the plugin after understanding sort_order.
Plugin-builder newbie question - is there a significant time implication to altering the UI for this plugin (moddifying core, etc.)? Happy to help contribute, I just wanted to understand the complexity in altering the UI to look something like this:
I really need to let my users vote more than once per topic (e.g. for different responses).
Would it be possible to allow for this? e.g. with an opt-in setting like:
qa number of votes per user per topic e.g. ā5ā - (default ā1ā, ā0ā- unlimited) - how many responses a user can vote for.
Overall, I have to give my apologies in terms of doing new work on this plugin. Iām happy to fix bugs with the existing functionality (I just fixed an issue with time-gaps), but for new features this plugin is near the bottom of my priority list.
If you want to add more features / customisations here your best bet is to get someone with some standard frontend skills. If that someone gets stuck with the logic of the plugin itself Iām happy to help them out understanding it.
@dalerka Those changes the voter list are possible, but are slightly harder than they may first seem as this plugin uses an existing structure in Discourse called āPost Actionsā to display the voter list. So it would require some JS changes as well.
@supernaturally The UI part of the change to the vote buttons would not be that hard to do, but down-voting would be a new feature.
It should support anonymous answers (I havenāt tested it with anonymous users extensively though), as it has all the features of a normal Discourse topic, which allows a user to post anonymously if the āallow anonymous postingā site setting is turned on.
Does this pluginās vote count carry over to comments embedded into a wordpress site via the WP Discourse plugin? Does the resorting of comments based on votes impact order of comments embedded in wordpress site? I am thinking not. I imagine once comments are resorted per votes in the forum, the comments could be manually reimported to wordpress.
Iāve never used the WP plugin before, but in theory the only thing youād need to do to get a āread onlyā version within Wordpress (i.e. you canāt vote, or clicking a āvote buttonā would send you to the discourse topic itself) would be to customise the WP comment template to support the QA styles.
The key bits would be:
1 - If a topic has qa enabled and the post is not the first post, itās a ācommentā if itās a reply to a post and itās an āanswerā if its not. This is the version of this logic in the Discourse client customisations in this plugin:
2 - Display the property topic.vote_count alongside answers.
The posts should already be in the right order as this plugin changes the sort_order of posts in a topic, which should be respected regardless of what client is consuming the server endpoints (i.e. the Discourse client, or the Wordpress plugin).
Sounds like you are onto other things now. Good for you. Have you ever considered programming the plugin so members can change their vote to another answer if a better answer comes along as the discussion on a topic grows over time? Kinda like how you can unlike content by clicking on the heart icon a second time?
Actually, this might work too:
P.S. I will be using wp discourse and the q/a plugin together and will report in here to let you know how it goes. I imagine the prioritization of order of content based on membership consensus would be a nice complement to the settings in the wp discourse plugin where you can set the criteria in a number of ways for what gets embedded from the topic into wordpress blogs.
You can change your vote by clicking āUndo voteā on a post youāve voted for
.
This behaviour is actually part of core Discourse itself, itās just not currently used. This plugin uses the latent voting logic in core Discourse where it can, this being one instance.
As @McBlu noted, you can see this plugin in action on my sandbox, e.g
Ah yes, thereās a time limit to undoing post actions (āvotingā is a type of āpost actionā, like ālikingā). I canāt check the code right now (it may be something like 5 minutes). Increasing this limit wonāt be too hard, so if it helps Iāll add this in as a setting tomorrow.
Awesome, Angus. Thanks. That would be great. In my scenario, I accidentally deleted a post when I went to try and undo a vote so I can imagine people accidentally voting and just wanting to undo it in the moment for which, being able to immediately undo it would be great.
I saw in an earlier post that you were toying with having a setting that lets you set how many votes per topic a member can do (sorry if I misunderstood). Is that right?
I get the impression you are done working on this plugin and moving onto other things. Of all the plugins, this is the one Iād fund changes to if I had the dinero. Itās fantastic and a great complement to the WP Discourse plugin that embeds comments in blogs per the criteria you set. With your plugin, members get to weigh in on what gets to the top of the comments in an impactful way.
P.S. The undo function isnāt working for votes that happened yesterday. I have a message into Communiteq (formerly DiscourseHosting) to see what version of the q/a plugin is installed. It says 2.0 in my settings and was very recently installed so likely we are up to date.
This is quite possible to do, but as Iām trying to not do any new work on this plugin I have to draw the line somewhere Iām afraid.
Iām not done forever, but I wonāt be doing serious work on it for a while (i.e. months). I will fix existing functionality if it breaks however.
I donāt take paid gigs (at the moment), but if you do decide you want to fund further development of this plugin, there are some good plugin authors here on meta that could handle it. You could post it in the marketplace.
Wow, thank you, Angus! I like how in a growing discussion people can change their vote for the best answer so the posts bumped to the top are an even better concensus of what people want. I am not sure why we were barred from changing our vote hours after voting, but Iāll be sure to set the setting to zero.
Forgive me for my obtuseness, but do we download an update to get this setting?
P.S. I tried the sandbox. Canāt wait to try it in our forum. Thanks again.
No worries. To upgrade a plugin go to yoursite.com/admin/upgrade and click āUpgrade To the Latest Versionā next to the plugin you want to upgrade (i.e. the Question Answer Plugin).