nodebb-plugin-category-sort-by-votes-next
v0.1.3
Published
Adds functionality to sort topics by votes in category list view
Downloads
2
Readme
Nodebb-Plugin-Category-Sort-By-Votes
Adds ability to sort topic by votes within a category to your NodeBB.
Installation
Install it from NodeBB Admin Panel, or
npm install nodebb-plugin-category-sort-by-votes
Usage
- Go to the ACP (Admin Control Panel).
- Activate plugin and reload NodeBB.
- Click Plugins -> Category Sort to go to the Plugin's settings.
- Click "Re Index" to index all topics (see below screenshot).
- Go to any category, select "Most votes" from the "Sort by" dropdown and it should work!
Notes
Feature of sorting by votes use cid:[cid]:tids:votes
as key, while it is not supported by NodeBB.So we must recreate the index to make it work.
If "reindex" is not applied before you use "Sort By Votes" option in the category page, the category page will be blank.
We also use action:post.downvote
, action:post.unvote
, action:post.upvote
hook to listen user actions and dynamically update the sortedSet which use cid:[cid]:tids:votes
as key.