Community Documentation

Using Fivestar with CCK and the Custom Review Module

Last updated March 16, 2011. Created by quicksketch on May 29, 2008.
Edited by Hanno, bekasu. Log in to edit this page.

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

<?php
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;
?>

Page status

About this page

Drupal version
Drupal 5.x, Drupal 6.x
Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here