Skip to:
Content
Pages
Categories
Search
Top
Bottom

Rating and Sorting plugin.


  • VSensational
    Participant

    @vsensational

    Could anyone recommend a rating and/or sorting plugin that will let me sort the threads on my bbpress forum by the highest voted and/or most replied to threads? I’m thinking Reddit here, i.e. upvotes and then shifting “sort by” to Top and so on.

    Unless this is built into bbpress default and I’m just being an idiot, in which case please point me in the right direction to set that up.

Viewing 9 replies - 1 through 9 (of 9 total)

  • VSensational
    Participant

    @vsensational

    Since I can’t edit my post, I should clarify, it needs to have the ability to sort the forum based on said rating system. Just a rating system alone, be it upvotes or stars or 5 out of 5 toasters, isn’t what I’m looking for 😛


    Robin W
    Moderator

    @robin-w

    none that I know are that integrated


    VSensational
    Participant

    @vsensational

    So there’s no way to sort posts except for going by most recent, without a lot of custom php?


    Robin W
    Moderator

    @robin-w

    Most replied to is already in the topics widget (as most popular), so it would be nicking that query code.

    It would not be tons of code to do a rating, as long as the rating system stores the score in post_meta, then a simple query with that meta would do it.

    Just that I haven’t got time to code it at the moment.

    suggest you

    a) look at bbpress rating plugins
    b) check that they store scores in post_meta
    c) either code yourself (see bbpress/includes/common/widgets) for the widget code,
    d) or pay someone to do it http://jobs.wordpress.net/


    VSensational
    Participant

    @vsensational

    Thank you, will give it a go myself to begin with! Oh and of course, I meant sort threads.


    Robin W
    Moderator

    @robin-w

    great -besy way to learn, I knew nothing of bbpress two years ago !

    Come back if you get stuck, and if I can help with quick pointers I will.

    In the spirit of community, it would also be great if you shard the solution if you get there, this is occasionally asked for, and I’ll add it to the codex.

    key bit is on the topics widget for most recent replies, which you would copy and use

    // Order by most recent replies
    case ‘freshness’ :
    $topics_query = array(
    ‘post_type’ => bbp_get_topic_post_type(),
    ‘post_parent’ => $settings[‘parent_forum’],
    ‘posts_per_page’ => (int) $settings[‘max_shown’],
    ‘post_status’ => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
    ‘ignore_sticky_posts’ => true,
    ‘no_found_rows’ => true,
    ‘meta_key’ => ‘_bbp_last_active_time’,
    ‘orderby’ => ‘meta_value’,
    ‘order’ => ‘DESC’,
    );
    break;

    that’s where the meta key bit is, so if your plugin stores as ‘_rating’, then that’s what would go in the meta_key line.


    Robkk
    Moderator

    @robkk

    you can fiddle with the bbPress views

    https://gist.github.com/ntwb/8167699

    sorting a thread by rating can be achieved exactly like how Robin said .

    plugins that might be able to do it are

    https://wordpress.org/plugins/wp-postratings/

    maybe polldaddy ratings or the rating widget might help by using their widgets

    this might help with finding the metakey for wp-postratings

    wordpress.stackexchange.com/questions/50524/how-to-order-results-by-date-and-meta-key


    VSensational
    Participant

    @vsensational

    Thanks so much guys, at least I now know that it’s potentially viable for me to get this in. I haven’t had time to even try it yet with uni and stuff getting in the way but I will definitely update if I get around to it soon.


    isavage
    Participant

    @isavage

    Here’s a link to an old plugin that may help get you started. Would love to see what you come up with!
    https://wordpress.org/plugins/buddypress-rate-forum-posts/screenshots/

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar