WordPress.org

Support

Support » Plugins and Hacks » WP Customer Reviews » [Plugin: WP Customer Reviews] average review desperately needed?

[Plugin: WP Customer Reviews] average review desperately needed?

  • seems silly that I have to even ask for this, but I think an average review feature is badly needed, this shouldn’t take too much time to work into the system..

    You simply put a hook in the pahe like [average rating] and the plugin indentifies it and placed the review stars in the post on there.

    I would and have in the past worked with coders to get iumportant features like these implemented. but then there were always issues with updates, and incompatibility issues. Since wordpress is constantly evolving, it’s not really feasable to pay a coder to look into this and constandly reupdate custom mosifications on each wordpress/plugin update.

    Please can you consider this for the near future.

    http://wordpress.org/extend/plugins/wp-customer-reviews/

Viewing 15 replies - 1 through 15 (of 41 total)
  • Here is how to get the average rating stars to show just above the reviews.

    You will need to modify the wp-customer-reviews.php file. This means that if you upgrade the plugin, your changes will be lost.

    Add the following function anywhere on this file:

    function get_average_rating() {
             global $post;
             $this->get_aggregate_reviews($post->ID);
             $average_score = number_format($this->got_aggregate["aggregate"], 1);
    
            return $average_score * 20; // 20% for each star if having 5 stars
        }

    I put it just before function get_aggregate_reviews($pageID).

    Then inside the function do_the_content($original_content), just after $the_content = ”; add the following:

    // build average ratings html
            $average_rating = 'Average Rating: <div class="sp_rating"><div class="base"><div class="average" style="width:'.$this->get_average_rating().'%"></div></div></div>';

    Then find the following line:

    $the_content .= '<div id="wpcr_respond_1">'; /* start the div */

    and place the following just below it:

    // attach average ratings to beginning of reviews
            $the_content .= $average_rating;

    Be great to have this function packaged in the next release.

    Would it be possible to get an example of how this code looks once implemented?

    tamayo,

    This worked perfectly for me so far. Thanks a million!

    How would I add some space between the average rating and the first heading for review title?

    Your help would be greatly appreciated!

    I am not sure if this is correct, patmatt, but this is what I did.

    // build average ratings html
    $average_rating = ‘Average Rating: <div class=”sp_rating”><div class=”base”><div class=”average” style=”width:’.$this->get_average_rating().’%”></div></div></div>’ \n\n;

    It worked for what I was trying to do.

    mstoddard…

    That worked but at first I was getting a parse error. With a little tweaking, I got it fixed!!

    Instead of the \n\n, I added

    , but on the inside next to the closing div tags.

    // build average ratings html
            $average_rating = 'Average Rating: <div class="sp_rating"><div class="base"><div class="average" style="width:'.$this->get_average_rating().'%"></div></div></div><br/><br/>' ;

    Thanks a ton for the guidance!!

    I dont understand .php well enough to do this myself yet but the only other addition that would make the average rating perfect would be an “if this” and “else” ( if that’s the right terminology!)

    In other words….

    If there are no ratings yet, show: This _______ has not been rated yet. Be the first to submit a rating!

    If there are ratings then show the average rating!

    Figured I would throw that out there!!

    Yes, basic stuff.

    Great plugin, however it is indeed missing some basics.

    I wanted to show the average score of a particular post on the posts page before the <–more–!> tag. However it doesn’t seem to be possible. Is there a short code so i can show the average score of 1 post on a particular place, for example the front page?

    Everything worked fine for me except the average rating shows no stars no matter what the rating is. Any ideas?

    I would also like to display the average score just below the title of the single post and on the front page. Any help would be greatly appreciated.

    Looks like this plugin is dead for development.

    Plugin Author gowebsol

    @gowebsol

    Hi all.

    Caps, we are indeed working on this plugin, we’ve just been busy working with paid work.

    We will have the average rating worked into the plugin soon, we’re just considering the best way to do that, ie: shortcode vs. sidebar widget, etc.

    Give us a few weeks 🙂

    Add to it multiple star ratings and this will be the best ratings system out there. Simple to use, clean and robust!

    Plugin Author gowebsol

    @gowebsol

    patmatt, explain for me please. How would you want multiple ratings implemented?

Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘[Plugin: WP Customer Reviews] average review desperately needed?’ is closed to new replies.
Skip to toolbar