We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Ez_rate- a very beta ratings module.

Development and Programming

David Webb's avatar
David Webb
62 posts
18 years ago
David Webb's avatar David Webb

I’ve just been looking into how easy it would be to integrate a rating script with EE. Looks like both Ryan and Robin are working towards the same thing with a similar starting point. (Have y’all seen the second tutorial on the komodo’s site? Adds nice fraction star ratings and a 3rd rollover state (http://komodomedia.com/blog/index.php/2006/01/09/css-star-rating-part-deux/) )

Maybe a collaboration is in order? 😊

       
Erskine's avatar
Erskine
46 posts
18 years ago
Erskine's avatar Erskine

Robin - hope you see this thread.

I’m using EZ Rate for a client’s ridiculous demands - working very well.

Problem is, I need to pass values between -1 to 1 for their ratings calculations. So, ratings can be -1, -0.6, 0, 0.1, 0.5 etc… I’m entering these via an awful Ajax-y slider which works well, and all teh averages work out perfectly if you add positive ratings.

However, it doesn’t seem to like my negative ratings.

For example, if I starty a new article with a rating of 0, and then rate it ‘1’, I get an average of ‘1’. Add another rating of ‘1’ and my average remains at ‘1’ of course.

So, my first problem is: How can I simply add or subtract the ratings? If four people rate it an item with ‘1’ I want them all to be added up, so the rating is ‘4’, not an average of ‘1’.

Second problem: How can a rating of ‘-1’ or ‘-0.3’ be subtracted from the rating. Can negative values not be used?

Sorry about this. Awful client I’m afraid…

       
Erskine's avatar
Erskine
46 posts
18 years ago
Erskine's avatar Erskine

Scrap that. Not using negatives any more. But is it possible for me to add each rating rather than create an average?

So, if two people rate as ‘5’, the rating would be ‘10’.

Edit: Um, sorry about this. I do need to pass negative values as ratings. Oh I hate this. If I set up a new item and it is ‘0’, I then try to add a rating of ‘-5’ but the average stays at 0. Eek.

I just need to add and subtract ratings from an ongoing total.

Edit again: If I’ve rated an item as ‘-5” and the avearge shows as ‘0’, but then rate it again as ‘5’, the average is correct: ‘2.5’, so is it just a case of the stats tags not showing the right value when the average is less than zero?

       
Trend Hunter's avatar
Trend Hunter
81 posts
18 years ago
Trend Hunter's avatar Trend Hunter

mdesign,

You rating script rocks. If you are able to adapt it to EE, I will gladly be your first customer…

       
theblogstudio's avatar
theblogstudio
90 posts
18 years ago
theblogstudio's avatar theblogstudio

I second that, if I had the skills to do it myself, I would.

       
MindComet's avatar
MindComet
20 posts
17 years ago
MindComet's avatar MindComet

Also looking at this for a rating system on a current project… don’t know if it’s still of interest to Erskine, but negative rating values could be set by modifying the table schema in the Module’s Control Panel file.

It’s set up to store the rating as an unsigned integer, so changing it to a signed value would preserve the negative values.

You’d just need to modify the table create query in mcp.ez_rate.php, and then re-install the module.

$sql[] =  "CREATE TABLE exp_ez_rate_stats (
    rate_id int(10) unsigned NOT NULL auto_increment,
    rating smallint(4) signed NOT NULL default '0',
    ...
       
1 2 3

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.