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 😛
none that I know are that integrated
So there’s no way to sort posts except for going by most recent, without a lot of custom php?
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/
Thank you, will give it a go myself to begin with! Oh and of course, I meant sort threads.
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.
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
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.
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/