nodecomment+fivestar sort by vote with threaded comments

Mershin - June 14, 2009 - 23:34
Project:Node comments
Version:6.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:minor
Assigned:Unassigned
Status:active
Description

Ok so I have nodecomments and fivestar 'per comment'. This works.

I've modified the view nodecomments:
- ddeda relationship node: voting results (node relationship)
- added a sort by voting api results (value).

So this successfully returns my comments sorted by the fivestar average voting value per comment.

When I try the same thing with the 'threaded' version... I hit a roadblock where the returned items are sorted by their 'threaded' nature. If I try to add the sorting by vote instead of the node:thread sort, I get my items returned by the vote but the threads are not correct. It returns the items in the rating order, but not with the comment/comment parent relationship intact. Instead it returns the comments in the order of the rating, but with the indentation of the comments in the original thread order.

I understand that it's technically taking the sort priority of the vote before the Node:Thread... and reversing them doesn't help. In my head I guess if I were writing the SQL myself, I'd need two queries. One to return the highest rated thread parents, and then another to return the children of thoser.

The 'goal' is to be able to return the "threads" based on the average vote of the "parent comment"... does that make sense?

The complete end result is to have a Node with each comment with a fivestar vote, and two sort links, one "by date" and one "by vote". Unfortunately the best I've been able to achieve is.

Sort: date (threaded) | vote (flat). (this works!)

What I'd 'like' to do is:
Sort: date | vote.

Any have them both threaded.

Has anyone done this or needed to do this that could provide some insight? Maybe something in Views I'm just not thinking of... or if you think it can't be done without doing it all in PHP manually (which I know is possible, but time inefficient on a deadline) :)

 
 

Drupal is a registered trademark of Dries Buytaert.