• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

[nodebb-plugin-category-sort-by-votes] Sort topics by votes within a category!

Scheduled Pinned Locked Moved NodeBB Plugins
2 Posts 2 Posters 1.6k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • wktangW Offline
    wktangW Offline
    wktang
    wrote on last edited by wktang
    #1

    Nodebb-Plugin-Category-Sort-By-Votes


    Description

    NodeBB allows you to sort posts by votes in a topic, but within a category you can't sort topics by votes.

    This plugin allows you to sort topics by votes within a category. See screenshot below, you get a little "Most votes" selection from the "Sort by" dropdown menu.

    As requested here and here. Developed and maintained by @xidui and @wktang.

    image

    Installation

    • Install it from NodeBB Admin Panel, or

        npm install nodebb-plugin-category-sort-by-votes
      

    Usage

    1. Go to the ACP (Admin Control Panel).

    2. Activate plugin and reload NodeBB.

    3. Click Plugins -> Category Sort to go to the Plugin's settings.

    4. Click "Re Index" to index all topics (see below screenshot).

      image

    5. 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.

    GitHub | Bugs & Suggestions

    1 Reply Last reply
    5
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by baris
    #2

    Just an FYI we are building this into core https://github.com/NodeBB/NodeBB/issues/6158, it will deprecate this plugin and 2 forks https://github.com/dangerusslee/nodebb-plugin-category-sort-by-votes-next and https://github.com/jimmykane/nodebb-plugin-category-sort-by-votes-next

    1 Reply Last reply
    1

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development