Closed (fixed)
Project:
Fivestar
Version:
5.x-1.9
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2008 at 12:33 UTC
Updated:
5 Oct 2008 at 22:58 UTC
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
Comment #1
quicksketchYou 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
Comment #2
lotsahair2 commentedthanks 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:
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
Comment #3
quicksketchYou'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.
Comment #4
quicksketch