JrCore_list order with multiple facters
Using Jamroom
paul:You know, I now remember us talking about this a few months ago.
For MySong's (and my) benefits, what was the sub-query we need to put as the jrCore_list search parameter to do this?
It's not something you can put directly into a jrCore_list call - it needs to be setup as a db_search_params listener for the jrRating module. That listener will then:
- look for the special "order_by" param being passed in and if it finds it:
- run a query to get all ratings and counts and figure out the correct order for the items
- rewrite the order_by to use the new order
The subquery would come in step 2 - basically it would combine 2 result sets - the first being the the items as ordered by ratings (those with ratings) and the second set being unrated items.
So I need to play with that a bit and make sure it can do all that and remain performant.