Multiple CStarRating in one view

In my project i use multiple CStarRating widget.

Widget 1




<?php $this->widget('CStarRating',array(

'name'=>'idearating',

'callback'=>'.....',

'value'=>$idea_rating,

'ratingStepSize'=>1,

'maxRating'=>5,

'readOnly' => $readOnly,

'cssFile' => '/themes/mytheme/css/jquery.idea.rating.css',

));?>



Widget 2




<?php $this->widget('CStarRating',array(

'name'=>'realisationrating',

'callback'=>'.....',

'value'=>$realisation_rating,

'ratingStepSize'=>1,

'maxRating'=>5,

'readOnly' => $readOnly,

'cssFile' => '/themes/mytheme/css/jquery.realisation.rating.css',

));?>



In head tag connect jquery.idea.rating.css and jquery.realisation.rating.css style files. But to all ratings applicable last style. How i can make ratings with different style (in my case different star images)?

Hi,

what are your css files looking like?

You could set the id of each CStarRating and then assign the css based on this id.

regards

Hi, thanks

How i can set id in widget?

It’s just a property:


<?php $this->widget('CStarRating',array(

'id'=>'MyRating1',

'name'=>'realisationrating',

'callback'=>'.....',

// ...



regards

Hi,

this is my first post

I have used CStarRating and rating getting successfully stored into respective tables.

But i am stuck how to show how much a video has been rated.

So please let me know how to fetch rating value from database and show back to user how much a video has been rated using CStarRating

Thanks and regards

Irf

Hi,

I am having multiple star rating problem also but my problem is some different. In my project I have to show some users in a list (dynamically coming from database) with their ratings and the listing page is coming from ajax. only check boxes are displaying at place of stars. plz help me out. thanx in advance