Hi All,
I believe there may be a bug in CStarRating. I have the following code:
<?php $this->Widget('CStarRating',array(
'name'=>'average',
'model'=>$review,
'attribute'=>'rating',
'value'=> $avgReview,
'readOnly'=>true,
'minRating'=>.1,
'maxRating'=>5,
'starCount'=>5,
'ratingStepSize'=>.1,
));?>
The resulting star’s that are generated are not the full star image. About 1/4 of the right portion of the star is not being generated. A screenshot is attached: 2837
The rating’s are averages so the stepsize must be .1 (because the ratings will be 2.1, 4.6, 3.5, etc.)
Are my settings incorrect? Or this a bug in cstarrating widget?
jzhong5
(Jzhong5)
May 10, 2012, 12:08am
2
w00tw00t111:
Hi All,
I believe there may be a bug in CStarRating. I have the following code:
<?php $this->Widget('CStarRating',array(
'name'=>'average',
'model'=>$review,
'attribute'=>'rating',
'value'=> $avgReview,
'readOnly'=>true,
'minRating'=>.1,
'maxRating'=>5,
'starCount'=>5,
'ratingStepSize'=>.1,
));?>
The resulting star’s that are generated are not the full star image. About 1/4 of the right portion of the star is not being generated. A screenshot is attached: 2837
The rating’s are averages so the stepsize must be .1 (because the ratings will be 2.1, 4.6, 3.5, etc.)
Are my settings incorrect? Or this a bug in cstarrating widget?
Have you tried to change your min/max rating?
Also, would you please show me some steps about you deal with the rating system…
I tried http://www.yiiframework.com/forum/index.php/topic/29851-complete-guide-for-multiple-cstarratings-on-same-page/
but not works…
Drini
(Idrini)
May 10, 2012, 6:10am
3
it behaves exactly as it should
the rating in the picture is 3.9 = it will fill 3 stars +90% of the fourth star.
Sampa, might be slightly difficult to see, but if you look at each of the 5 stars they are not the full "width"
i.e. the right star point on each of the 5 is not visible
Compare the picture in the original post above (and the actual star image shown, not how much is filled red or gray) with the star images below:
2842
Anyone else experience this behavior?
Still have yet to find the solution to this. Only occurs when the rating increments are in "tenths" ie 1.9, 1.2, 1.7 etc.
Drini
(Idrini)
June 19, 2012, 8:22am
7
try
...
'value'=>round($avgReview,0),
...