WordPress.org

Ready to get started?Download WordPress

Forums

WP Customer Reviews
Removing Stars (4 posts)

  1. Jonall
    Member
    Posted 2 years ago #

    Hi,

    Is it possible to remove the stars from the plugin? We have a client who has around 30 previous testimonials who wasn't using a star rating so would prefer to keep to that format.

    Thanks

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

  2. m7csat
    Member
    Posted 1 year ago #

    I second that notion so I will be modifying the code to see if I can't get around this. Will post a solution once I have it.

  3. ruryarts
    Member
    Posted 1 year ago #

    I third it! :)

  4. m7csat
    Member
    Posted 1 year ago #

    As promised, here's the changes you have to make to hide the stars. All I'm doing is commenting out stuff because I didn't want to deal with any inter-dependencies. Please make back ups of your files first!

    wp-customers-reviews.js - Lines 87-89
    This is to disable the JavaScript checking of the field.

    /*if (frating < 1 || frating > 5) {
            err.push("Please select a star rating from 1 to 5.");
        }*/

    wp-customer-reviews.php
    Lines 752-757
    Be careful here as this is part of a larger PHP string

    <!--<div class="wpcr_fl wpcr_sc">
                                    <abbr class="rating" title="' . $review->review_rating . '"></abbr>
                                    <div class="wpcr_rating">
                                        ' . $this->output_rating($review->review_rating, false) . '
                                    </div>
                                </div>-->

    Lines 770-775
    Same warning as above.

    <!--<div class="wpcr_fl wpcr_sc">
                                    <abbr class="rating" title="' . $review->review_rating . '"></abbr>
                                    <div class="wpcr_rating">
                                        ' . $this->output_rating($review->review_rating, false) . '
                                    </div>
                                </div>-->

    Line 1037
    Purely HTML. Both a comment out and adding of the value, so the field always defaults to zero stars.

    <!--<input type="hidden" id="frating" name="frating" value="0" />-->

    Lines 1044-1047
    Another PHP string.

    <!--<tr>
                    <td><label class="comment-field">Rating:</label></td>
                    <td><div class="wpcr_rating">' . $this->output_rating(0, true) . '</div></td>
                </tr>-->

    Lines 1155-1157
    This disables the PHP checking of the field.

    /*if ($this->p->frating < 1 || $this->p->frating > 5) {
                $errors .= 'You have triggered our anti-spam system. Please try again. Code 003<br />';
            }*/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic