Closed (fixed)
Project:
Fivestar
Version:
5.x-1.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 May 2008 at 22:29 UTC
Updated:
5 Oct 2008 at 23:46 UTC
Okay. Simple question. I am creating a content type that has the five star CCK field. The vote is for the node itself not another node.
What would be the correct php code to enter into the Target Node ID? Thanks a ton.
Comments
Comment #1
quicksketchComment #2
dfrechen commentedI have the same problem... and whatever i enter into the target node ID Field it tells me that de default php code returned an incorrect value. I have basically been pasting the code i find here, as i dont know php myself.
Comment #3
value commentedthis was the only thing that would work for me using pathauto and a couple other modules. Im not sure why the first one doesn't work as I have just recently started working with this module.
It was listed in the Documentation for using Fivestar with CCK fields and Node Comment. It works with or without Node Comment though because the goal is the same either way get the node id of the node being rated.
you also have to be sure to set $field_rating to the name of your field_name of the cck field.
this code covers several cases like adding a new node or editing a node. if there is no appropriate arg specified it errors out.
Comment #4
value commentedalso make sure your using the most current version of votingapi. a recent patch fixes an issue where the target field was being ignored all together.
Comment #5
dfrechen commentedUnfortunatley i still get the php error. Iam using the latest version of both fivestar and votingapi
Comment #6
quicksketchThis enhancement should make using Fivestar with node reference fields much, much easier. Just select the node reference from a drop-down list: #277045: Make Node Reference Targets Easier.
Comment #7
quicksketchThe nodereference improvement is included in the 1.12 version of the module. Closing after lack of activity in this issue.