Hey,

Im trying to create a review site kinda like http://www.pbreview.com/. Users can post a review on a product by filling out a form and the data will be displayed in a sortable list. I am kinda a newbie when it comes to drupal but what I have so far is a simple form (using cck) and the products/rating/etc.. are displayed in a sortable list using the Views module.

My problem is I want people to be able to "comment" on the reviews by adding on another review using the same form to the node. (just like http://www.pbreview.com/)

I want to then average the "rateings" given by the users and display it in the sortable "views" list.

Anyone know how to do this??

Any advise would be much appreciated.

Thanks

Comments

Squidgy’s picture

I suggest starting out with Node Relativity, which allows you to make parent-child relationships out of your nodes. That way, you can have cck type 'review' and make another cck type, say 'review-child' its children. You'd probably have to write some php code yourself to handle the ratings averaging - I don't think the views module will be able to do that.

If you're already using a views list to display this, what I'd suggest is changing review.tpl.php to include php code that generates the average of all the ratings found in it's own child nodes, and that should take care of it.

Hope that helps!

that0n3guy’s picture

Thanks for the ideas. I'll give it a shot and post what I came up with. Im not much of a php guru, but I might be able to figure it out.

Thanks