hi, trying to use fivestar and cck to create a review form for some nodes.
basically would like to have a link "review this article" from the node, to a review form.
i can create the form alright, but having difficulty referencing it to specific nodes.
i think it's related to targetNodeID. can anyone please provide (or link me to) a more elaborate explanation on the use of targetNodeID and how to implement it?
thanks, and yes, i'm a newbie. i've read everywhere and have been working on this problem for a while, with no success.
i would prefer to use this module on drupal 6.2, but currently using drupal 5.7 in case i will need other modules.

cheers

Comments

quicksketch’s picture

Category: task » support

You could try out the tutorials posted in the Fivestar handbook (there are a few at the bottom of the page there): http://drupal.org/handbook/modules/fivestar

lotsahair2’s picture

thanks for your reply.
i checked those tutorials but didn't understand a few things.

for example for a fivestar-cck combo there is a paragraph:
"The Node ID field is the most important field on the page which determines exactly what node will receive the value of the rating. In a realy simple case, you could just enter the value 10 to always rate on the same node with nid = 10. Usually you'll need to enter PHP code to dynamically select what node you want to rate. For example, if you would like to apply the ratings to a node specified in a node_reference field, use:

  return $node->field_NAMEOFFIELD[0]['nid'];

A common scenario is using fivestar with nodecomments to make reviews, sample
code for this can be found here: http://drupal.org/node/148150"

my question is, what php code should i put in there so that the it works the way i want it? ie the review form will be related (and calculated) to a specific static page, and also that the review will be visible from within the static page? (ie "read reviews for this page" or something like that).

thanks

quicksketch’s picture

You'll need to add a node reference CCK field to your "review" content type, then use that code you posted above to make Fivestar place the vote on whatever node is referenced. I applied a patch to the new version of the module #277045: Make Node Reference Targets Easier, to make it so node reference fields are found automatically, rather than needing code, but both approaches will work.

quicksketch’s picture

Status: Active » Closed (fixed)