• Resolved CarolLeung

    (@carolleung)


    Is it possible to have the numbers of the star ratings to show up along with the stars? For both the multi-set and total rating, or at least only the total rating?

    Because 4.3 an 4.4 would look too similar in the stars, the people looking at it wouldn’t tell if it was 4.3 or 4.4…for example

    That is also a question my client asked me to have the numbers of ratings to be visible.

    https://wordpress.org/plugins/yet-another-stars-rating/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor dudo

    (@dudo)

    Hello CarolLeung, thank you for using Yasr!

    If for total rating you mean the overall_rating shortcode, you can use the %overall_rating% pattern in the “Insert custom text to show before / after stars” section in the settings.

    If instead you mean the average rating in the multi set, this is not possible for now.

    Best,
    Dario

    Thread Starter CarolLeung

    (@carolleung)

    No, just like I said in my first sentence…

    Is it possible to have the NUMBERS of the star ratings show up along with the stars?

    like

    **** 4.3
    *****5.0
    **** 4.4
    *** 3.2
    *** 3.0

    Because 4.3 an 4.4 would look too similar in the stars, the people looking at it wouldn’t tell if it was 4.3 or 4.4…for example

    That is also a question my client asked me to have the NUMBERS OF THE RATINGS to be visible.

    Thread Starter CarolLeung

    (@carolleung)

    This is already the clearest way to say it if you read carefully.

    Plugin Contributor dudo

    (@dudo)

    Hello CarolLeung, you’re right, it was clear, what I wrote on my answer is:

    If instead you mean the average rating in the multi set, this is not possible for now.

    But this is not what I wanted to wrote; this, instead, is:

    If instead you mean the average rating or the single row in the multi set, this is not possible for now.

    Sorry for wasted your time, sometimes because of the hurry or just because I’m too tired I can make a mistake…I’m an human beign too 🙂

    Hovewer, if you wish, I can give you a work around for this; it’s not a solution because everytime you update the plugin you’ll need to do this again, but if you wish I can explain what you’ve to edit (it’s a simple one)

    Best,
    Dario

    Thread Starter CarolLeung

    (@carolleung)

    Dario,

    I greatly appreciate your support in this plugin. It is very helpful and I’m so grateful for your time. I’m not in a hurry, I know there may be time zone differences, but my client wonders why it takes so long, lol.

    I know you need to assign the Total rating separately and cannot be calculated from the multisets. That is fine for now.

    What I meant was that my customer wants to know if its possible to show the actual NUMBER next to each star rating, because 4.4 may look too simliar to 4.3 and the “public” cannot not tell if a rating is 4.7 or 4.8 just by looking at it.

    Plugin Contributor dudo

    (@dudo)

    Like I said, there isn’t a settings for this, so your client can’t do this by himself.

    There is a work around for this, but it require to edit some code, and you should do this again everytime you update the plugin. I know that this could be a pain, so, if for you it’s ok, I can say what code you’ve to edit

    Thread Starter CarolLeung

    (@carolleung)

    If this is possible, it would be great you can tell me which file and code to replace/edit. I will keep a record to backup the changes for each update. We do the site maintenance.

    Thank you very much.

    Plugin Contributor dudo

    (@dudo)

    which shortcode do you use yasr_multiset or yasr_visitor_multiset ?

    Plugin Contributor dudo

    (@dudo)

    I guess you’re using yasr_visitor_multiset , so in the plugin dir, open file lib/yasr-shortcode-functions.php, and on line 632 change this

    <span class=\"yasr-visitor-multiset-vote-count\">$set_content->number_of_votes</span>

    to this

    <span class=\"yasr-visitor-multiset-vote-count\">$average_rating</span>

    Thread Starter CarolLeung

    (@carolleung)

    I’m using

    [yasr_multiset setid=0] [yasr_overall_rating]

    Thread Starter CarolLeung

    (@carolleung)

    The website is multilingual http://www.rate-rent.com if that helps

    Plugin Contributor dudo

    (@dudo)

    open file lib/yasr-shotcode-functions.php , on line 57 change this

    $shortcode_html .= "<div class=\"$stars_attribute[class]\" id=\"yasr_rateit_overall\" data-rateit-starwidth=\"$stars_attribute[px_size]\" data-rateit-starheight=\"$stars_attribute[px_size]\" data-rateit-value=\"$overall_rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>";

    to this

    $shortcode_html .= "<div class=\"$stars_attribute[class]\" id=\"yasr_rateit_overall\" data-rateit-starwidth=\"$stars_attribute[px_size]\" data-rateit-starheight=\"$stars_attribute[px_size]\" data-rateit-value=\"$overall_rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>$overall_rating";

    then on line 482 change this

    <td><div class=\"rateit\" id=\"$set_content->id\" data-rateit-value=\"$set_content->vote\" data-rateit-step=\"0.5\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div></td>

    to this

    <td><div class=\"rateit\" id=\"$set_content->id\" data-rateit-value=\"$set_content->vote\" data-rateit-step=\"0.5\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>$set_content->vote</td>
    Thread Starter CarolLeung

    (@carolleung)

    Thank you very much! It works great!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Rating number to show up’ is closed to new replies.