tags:

views:

270

answers:

4

I wish all nodes of a certain type to have a rank (or at least be sortable in Views by this rank). This rank is a score based on different criteria: Voting API (5-star rating) average, Voting API number of votes, number of comments etc. Any suggestions on how to achive this?

+1  A: 

You would have to create your own views sort handler, where you calculate the ranking score and sort the nodes by that. Start by looking at the views doc, and find some modules doing this and look at their code. Views can be a bit overwhelming at first, but just stick to it and experiment and you will find out how to do it.

googletorp
Thank you looking in to that, would appriciate some more details, but I guess thats what I get with vague questions.
pm
This kind of views intergration is something you will have to learn by looking at code yourself. If you get stuck somewhere along you can try to ask for help, but there is not much to say now, the views doc says it better.
googletorp
A: 

This may help you

Fivestar uses percentage voting. You want to sort by the results of the vote: use the "Voting API percent vote result (average)" field, and it should do the trick.

Jeremy French
I would like fivastar-percentage to only one of several factors in calculating the rank.
pm
googletorp's answer is for you then, I think you are trying to do something highly customized which normally meens that you have to code.
Jeremy French
A: 

views is the simpliest way to do this, look to the sort criteria then add the fields that you want.

Houssem
I think you didn't get mye question right. I wish to use different data like star-rating and comments to make a ranking scor wich I can sort by.
pm
okey sorry now i get it :)so you have to use a new custom field (cck) to the content type which you want to rank. Then the complex thing is to develop your own scoring based on comments and star-rating and update the content of this field (use drupal hooks)any way i think thant you have to develop a module ..
Houssem
A: 

I think this can be achieve by a developing an specific module. Did you get to do this implementation? I'm starting to develop a module for this purpose. Maybe we can collaborate. Contact me through info at labfm dot com.

Franck