• Resolved kennnesbitt

    (@kennnesbitt)


    I find it’s useful to know a post’s average rating, not just the counts of each rating. So I modified spr_show_voted() with the following:

    $html .= ‘<span id=”spr_votes”>’.$votes.’ ‘.vote_counter_form($votes).’ (‘. number_format((float)$rate, 2, ‘.’, ”) .’)</span>’;

    This way, when I’m editing a post, I can see an actual number for the star rating. What looks like 4 stars might actually be 3.83, and this makes a difference to me. I thought I’d pass this along as it may be useful to other users in a future version of your plug-in.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kennnesbitt

    (@kennnesbitt)

    Update. I decided I didn’t want to show the number to my users (to keep things simple). So I modified the code in spr_show_voted() as follows:

        if ($show_vc)
        {
            if (is_super_admin()){
                $html .= '<span id="spr_votes">'.$votes.' '.vote_counter_form($votes).' ('. number_format((float)$rate, 2, '.', '') .')</span>';
    
            } else {
                $html .= '<span id="spr_votes">'.$votes.' '.vote_counter_form($votes).'</span>';
            }
        }
    Plugin Author Igor Yavych

    (@flyerua)

    Hello. This was added in 2.0 (along with lots of other things) which is not released yet. Unfortunately, as I’m rather busy with my actual work, I don’t know when I’ll be able to release it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature suggestion’ is closed to new replies.