Errors in Rate and review 2

  • Visitor
Posted: Tue, 08/26/2008 - 16:48

First, Rate and Review 2 is one of the greatest tutorials I've ever seen, but it has some errors in it:

1. When you say:

Change
$items[$delta]['target'] = drupal eval($item['target']);
to
$items[$delta]['target'] = eval($item['target']);

You'll see that in release 5.x-1.13 there's not such line. Apparently there's no need to hack the module...

2. When you say:

<?php
print l("node/add/review/parent/$node->nid",NULL,NULL,NULL,FALSE,TRUE);
?>

Well this isn't working at all, instead you must have:

<?php
print l(t('Create new review'), "node/add/review/parent/$node->nid", array('class' => 'relativity_create_' . $type));
?>

this is actually better because you have the possibility to hide "node/add/review/parent/nid" and have a nice link.

3. In Step 4 you tell us to create a view, I want to add a couple of things to this:

First, if you set the argument to Use empty text, the only thing I got was the empty message. I had to change this to "Display all values".

Second, you don't need to create a page, instead I created a block, and then I could add this block to the bottom of the reviewed node, you could use tabs for this and you'll get a very cool appearance.

If you do this, I also recommend to skip the:

"Node Relativity will automatically list the child nodes but you can add this code to your node-type.tpl.php to place them manually:"

Bonus: you can also install the flag module, create a flag for the review node type so you can have a link saying "flag this as offensive".

Thanks for this tutorial, it's great and it does exactly what I wanted, to use "comments" as nodes, display them in a block.

Luis Elizondo

Not really errors

  • Michelle
  • 05/13/07
  • Tue, 08/26/2008 - 20:34

The tutorial worked fine when it was written, but that was nearly a year ago. It's not really "errors" just simply out of date since the modules have changed. I'm amazed it's still useful at all. LOL

I've linked to this post at the top in case anyone else tries to use it.

Thanks,

Michelle