Question Answer Plugin

No, it won’t affect page load speed.

Yes, this is a possibility with any plugin. If Discourse releases a core mechanism for up-voting posts then I will discontinue work on this and use that instead of this.

No, there isn’t yet. I could add this, but I strongly suggest you test this in a single category first, for at least a few weeks. This is a new plugin. I don’t use it in production myself yet.

[quote=“stantyan, post:37, topic:56032”]
As far as I understood, vote counts of each post are saved in a database and remain there even if I remove this plugin, is this correct?[/quote]

Correct.

The main question here is whether a future Discourse version will use the existing vote_count property of posts. If it does, then all votes made with this plugin will be picked up by the new core functionality.

Remember that vote_count is a property in the core Discourse code itself. It’s been there since the initial release of Discourse, i.e. 2013.

The alternative way of handling the storage of votes would have been to create a post custom field, i.e. post.custom_fields['vote_count']. The reason I chose not to do this was because it seemed redundant given there was an existing post property, and it would also make it harder to migrate the data created by this plugin if the core vote_count field were used in the future for a similar purpose. Also, I would have to re-create the front-end post-action UI and translations that already exist for voting.

I suppose there is a risk that vote_count could be used in the future in a such a way that does not conceptually relate to the way I am using it here, however I doubt it. Something called vote_count on a post object could only really be used for storing the count of how many people have voted for that post.

If you’re wondering whether this plugin conflicts with the poll plugin or the topic voting plugin, it doesn’t. Those plugins use different fields. All are about voting, but different kinds of voting…

image

3 Likes