Using Fivestar with CCK and the Custom Review Module

Last updated on
13 May 2020

This is documentation for Drupal 7, which is no longer supported. Learn more and find resources for Drupal 7 sites

You can combine Fivestar with the Custom Review module by creating CCK fields that use the following Target Node ID PHP code:

if (module_exists('custom_review')) {
  if ((int)arg(1) && (arg(0)=='node'))    
    $tnid = custom_review_get_reviewed_node((int)arg(1));
  else if (arg(1) == 'add')                                  
    $tnid = (int)arg(3); 
  else                   
    $tnid = null;                  
}
else {
  $tnid = null;
}
return $tnid; 

Help improve this page

Page status: No known problems

You can: