preset mean values

May 9, 2011 at 12:52 PM

Before my (logged in) users rate an item, I want them to see the mean rating, using the same rating-element but a different color (gold for mean ratings, red for rated (and hover)).

Looking at your examples and the code, it seems like this feature is not implemented in RateIT. But then again - I dont' really have a lot of experience with coding and might just have missed something. I was expecting some kind of flag indicating, if data-rateit-value was the mean value or set by the user .

Any hints? How would I implement this? Thanks for your help!

Coordinator
May 9, 2011 at 2:02 PM

No it is implemented. data-rateit-value is the initial value (set by the user).

Although without changing the plugin, one can accomplish your requirements. Perhaps somewhere this week I will add an example that shows how to do it.

May 9, 2011 at 2:33 PM

Alright, an example would be great!

Jun 10, 2011 at 9:13 AM
Edited Jun 10, 2011 at 9:13 AM

Indeed, please provide an example. According to me, it is currently not possible to have a data-rateit-value unless it is also readonly.

Coordinator
Jun 11, 2011 at 9:15 AM

Good news, I've added the ispreset value to RateIt . Setting it to true, will show the fourth type of star, when the user makes a selection, the ispreset is set to false. 

I've updated the (online) examples to reflect this.

Jun 11, 2011 at 1:19 PM

Thanks gidon! However, I got it working with the following syntax (don't know why it did not work the first time):

<div class="rateit" data-rateit-value="2.76" data-rateit-step="1" data-rateit-resetable="false" >

Thanks for this great star rating applet, it was exactly what I needed. I am implementing it in phpGraphy, I will tell you once it gets released.

Coordinator
Jun 12, 2011 at 6:21 AM

That would be nice!