I am trying to make the fivestar Node ID target field be set to a node_reference cck field. Does anybody know if this is possible, and if so what the code for the Node ID field in the rating field should be? I tried the following which did not work:
return $node->field_reference_place_add_node[0][value];
Comments
Comment #1
OwnSourcing commentedsubscribe
Comment #2
aaustin commentedTry:
Comment #3
quicksketchThis previously was not possible because Fivestar was using drupal_eval() to call the PHP code. This means that the code did not have access to any of the local variables (such as $node). I've switched this to a normal eval() call so the $node variable is now available. This should be in the 1.11 final release and in beta 4 to be posted shortly.
After upgrading, the solution posted by aaustin should work.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
welzie commentedWorked for me! Thx for posting solution aaustin.
My target code looks like the below. Note: "field_car" is the name of the node reference field.
Using:
drupal 5.7
cck 5.x-1.7
fivestar 5.x-1.12
votingapi 5.x-1.6
Comment #6
Energyblazar commentedHow do the same in drupal 7.
Comment #7
tr commented