Sorting category by vote



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

    I saw the above post while searching the forum for information about upvoting. I'm trying to create a feature request category and sorting by vote would be great. The post above mentions this feature being included in core but I cannot find it anywhere.
    I'm running nodeBB v1.10.1

    Thanks in advance!


  • Admin

    Hi @broskmenmi if you head into a category and click on "Sort By" there should be a "Most Votes" option to sort that way



  • @psychobunny said in Sorting category by vote:

    Hi @broskmenmi if you head into a category and click on "Sort By" there should be a "Most Votes" option to sort that way

    I don't have any option like that in mine:

    Nyaste till äldst = newest posts first
    Äldst till nyaste = oldest first
    Flest inlägg = most post

    I'm running nodeBB 1.10.1.

    Maybe it is because of the theme?
    Using Slick theme with Dark skin



  • I just checked the sort.tpl in templates\partials\category and it was missing:

    Inside:

    <ul class="dropdown-menu pull-right">
    

    Append:

    <li><a href="#" class="most_votes" data-sort="most_votes"><i class="fa fa-fw"></i> [[topic:most_votes]]</a></li>
    


  • Now to another question, is there any way to make one specific categoy to be defaulted to "Most votes" but not the others? Since in admin settings i can set Default Topic Sorting to "Oldest to newest" and I want to keep it that way except for one category. Is that doable?



  • Here's another related question...

    When sorting by "Most Votes", is this sorting by the highest number of UP votes, or is this sorting by the highest number of TOTAL votes (both UP and DOWN)?

    This is a very important distinction... because we wouldn't necessarily want to show a post with 1,000 down votes to show up as #1 simply because it had the most votes. We would want to show the BEST reply, with the most UP votes.

    Does anyone know how NodeBB distinguishes this sorting functionality?



  • It sorts by total votes and the total is calculated by total = upvotes - downvotes. So a topic with 1000 downvotes won't show above a topic with 10 upvotes and 0 downvotes


Log in to reply
 

Suggested Topics

  • 5
  • 4
  • 1
  • 1
  • 1
| |