I am a little confused about how exactly fivestar as CCK field and the node option really works.

I have two scenarios I want to accomplish.

Scenario 1:
I want to have an official site rating separated from the user ratings. I also want the visitors to be able to sort the nodes on either the site rating or the user ratings separately.

If I understand things correct and add the "return $node->field_NAMEOFFIELD[0]['nid'];" code for the CCK field that will then store the rating using the Voting API.

What I am unsure of though is if this will conflict the node rating available for the users. Will it simply generate an average on them both combined or will they be handled separately?

Scenario 2:
For another content type I would like to use more than one fivestar field to rate the content based on several criterias. But I also want to let the users set their own rating (only one fivestar for them). Here too I want the users to be able to sort on the different ratings. Can this be easily done and still make sure the multiple site ratings are separated between them and to the user rating?

If this is not possible, is there any other module that can do it? Something like the module rating on http://drupalmodules.com would be perfect, but there seems to be nothing like it available for Drupal 6 (I use v6.9).

Comments

quicksketch’s picture

What I am unsure of though is if this will conflict the node rating available for the users. Will it simply generate an average on them both combined or will they be handled separately?

Yes, that's right, the author vote and the viewer votes will simply be averaged together. It's for this reason generating a vote to rate the piece of created content itself is rather silly. People keep asking how to accomplish this, but the results it generates are rather useless statistically. That's why Fivestar doesn't provide a built-in way to accomplish this. It'd be just as well to not register a vote at all and instead use the value of the field in Views when wanting to sort by the "author ratings".

Can this be easily done and still make sure the multiple site ratings are separated between them and to the user rating?

I'm not entirely sure what's being asked here. You definitely can make it so that the end-user viewers only get a single Fivestar rating. Currently it's difficult to let viewers create multiple axis ratings while viewing the piece of content.

Now, for setting up a "review" like system, Fivestar as a CCK field can setup multiple axis ratings just fine. For this sort of situation, you want to use a node reference field to point to the piece of content being rated, then setup a CCK Fivestar field for every axis that needs to be rated on.

I'd suggest using the http://drupal.org/project/nodereference_url project. Which can make a handy link such as "Rate this node" and auto-populate the node reference field.

The handbook pages are all screwed up currently due to the D6 upgrade, but this direct link describes the most common setup for CCK/Fivestar/Nodereference style reviews: http://drupal.org/node/234681

tsvenson’s picture

Thanks for your reply, it helped me a little bit.

If I understand you correct I can use the Fivestar CCK field, without providing a node ref, and it will be displayed as that. Then if I want to let my members give their own rating I can do so using the Fivestar for the content type. With that I will have one static (CCK field) Fivestar that is set when the content is created and it will not conflict with the one set for the content type that the members will use?

In my other scenario I want to have more than one Fivestar CCK field. Take a game review as an example. Many magazines rate games based on graphics, playability and overall. Basically if I would create a content type for game reviews I would then like to have three Fivestar CCK fields for those that the reviewer set. Then again I might want to enable the content type Fivestar to let the members rate it as well.

Of course it will be a lot of stars, but I can always create my own theme for it. Just a pity the look can only be set global and not independently for each content type or each CCK field.

quicksketch’s picture

Yep, I think you're on the right path. You don't need to specify a target at all for your purposes. The Fivestar CCK field saves a value in the database just like any other CCK field, and you can use it for sorting within Views.

Regarding theming, I think it's clear that Fivestar can only set one set of star styles based on the way that it just adds a CSS file to the page. If you'll be doing advanced theming, I'd suggest using the "Default" stars on your site, so you won't have to override a lot of CSS provided by the more complex star sets.

tsvenson’s picture

Thank you for your great help quicksketch. It has been very valuable information and helped me iron out the little confusion I had about Fivestar.

With the theming I was more meaning to create my own set of images to use instead of the options that comes as standard.

As my ultimate goal is to use Fivestar only for letting members rate content, I think it will be possible for me, when my skills are enough, to reuse the Fivestar CCK fields by my own module as the values are stored there to generate my own custom graph by simply . However that is something I will have to look into in the future.

quicksketch’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.