WordPress Review Site Plugin

The DG Review Site (DGRS) plugin for WordPress allows you to turn your blog into a powerful review engine. It’s flexible in design and presentation so you could use it as an additional interaction feature for your blog to collect reviews of your posts, or to drive a product/service review site where your users contribute the reviews.

This Version: 1.0 released on 1/9/2007
Download: http://www.dangrossman.info/wp-dg-review-site-1.0.php.txt

This plugin is released under the Creative Commons Attribution-ShareAlike License. It is free for personal and commercial use as long as you maintain a link to this site as the original author within the code’s comments.

You can see this plugin in action at Award Winning Hosts.

Features

  • Define categories of ratings you wish to collect, the minimum and maximum rating, and the display order of your rating categories.
  • Collect ratings along with every comment.
  • Display ratings collected for each comment.
  • Display average rating from all collected ratings for a post.
  • Display the number of positive or negative ratings for each post (50% or higher overall rating based on your scale).
  • Manage rating categories easily from your WordPress admin options tab.
  • Define HTML to appear before and after rating labels and inputs easily from your WordPress admin options tab — no complicated function arguments.
  • Drop-in to any existing blog to add ratings. Simply doesn’t display anything for comments that didn’t include ratings.
  • Flexible enough to be used as a post rating system, or to drive an entire rating & review site built on WordPress, depending entirely on how you customize the output.

Installation

To install DG-Review-Site, download the plugin from the link at the top of this page, and save it as review-site.php. Upload this to your WordPress plugins directory (usually wp-content/plugins). Then go to the Plugins tab in your WordPress administration area and click the Activate link next to “DG Review Site”. The necessary database tables will be created automatically.

Usage

This plugin provides a number of functions you can use to add its rating features to your blog templates.

Add Rating Inputs To Comments:

To add the set of labels and selection lists to collect ratings, edit your comments.php template and add this code beneath where the name, mail and website are collected:

<?php echo dgrs_get_rating_fields(); ?>

Display Ratings With Each Comment:

To display the ratings a commentor entered with their comment, edit your comments.php template and add this code within the main loop which displays each comment (you’ll see foreach ($comments as $comment)):

<?php echo dgrs_get_comment_ratings($comment->comment_ID); ?>

Display Number of Positive or Negative Reviews for a Post:

You can add this value anywhere posts are shown — the main loop of your index or archive pages, or the single post page, just make sure it’s somewhere within the loop (after the_post()):

Number of Positive Ratings:
<?php echo dgrs_get_post_positive_ratings($post->ID); ?>

Number of Negative Ratings:
<?php echo dgrs_get_post_negative_ratings($post->ID); ?>

Display the Average Ratings For Each Category For a Post:

To display the average ratings for all the categories you’ve defined for a specific post, just like the positive and negative counts, add this code anywhere a post is displayed:

<ul><?php echo dgrs_display_post_ratings($post->ID); ?></ul>

That will display the categories and average ratings in your specified order as list items. For even more presentational control, you can get the data back as an array you can display yourself:

<?php $ratings = dgrs_get_post_ratings($post->ID); ?>

The $ratings array will be keyed by your categories, with the values being the average rating for that category.

AddThis Social Bookmark Button

2 Responses to “WordPress Review Site Plugin”

  1. Dave
    April 15th, 2008

    Download link is a 404.

  2. Antonio
    May 7th, 2008

    i have tried the ratings plug in but am encountering some issues with it.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Network Activity

Visitor Boost and Targeted Visitors have received 17 orders today and 15 orders yesterday.

W3Counter is currently processing -39 queries per second for 12,750 websites.

Website Goodies is hosting 79,836 guestbooks, 12,159 counters and 7,276 polls.

Award Winning Hosts has collected 182 customer reviews of web hosts.