Ratings - modify for 1-10, on-click advance, etc.

Hello, let me start with the standard ass-kissing: I love Zenphoto! I've tried a few gallery scripts (which shall remain unnamed), but I love the simplicity of Zen.

I have a few minor requests, if anyone can help, regarding the ratings plugin. I was able to modify the update.php to give me 10 stars instead of 5 (without half-stars), and confirmed I'm getting 1-10 values in the zp_images/ratings table...however, the rating display on the image page still shows a round figure, and the image rating on the admin/edit/gallery/images tab also shows rounded off. What I'm looking for is the actual dB value, especially on the admin/images page (I may decide to eliminate the rating display on the image page altogether). Also, I'd like to have the onclick of the star rating to advance to the next image, instead of requiring the user to click the "submit vote" button.

Anyone? I apologize if this should be in a different section of the forum. TIA!

Comments

  • The rating is in the 'rating' field of the record. `$object->get('rating');`

    We use the Jquery rating plugin. Check its documentation for adding an on-click.
  • Thanks, sb. Yes, I found the rating table. If (for example) I have 3 ratings...a 8, and two 9's, the table has 8.667 for a value (good!). For some reason, when you `->get('rating')`, it's rounded to 9 (not what I'm after). I'm probably missing something really simple, though.

    I'll figure out the on.click. I hope. :-)
  • acrylian Administrator, Developer
    On our themes and showcase page on zenphoto.org there are the none rounded ones shown and we use getRating() for that. However with the stars the value is rounded, too.
  • Yeah, I see! Currently, the 'Frank Zebe' link shows a rating of 4.8 on the (I presume) 'album' page, but if you click through to the image page, it shows 'Rating 4 (5 votes)'. I guess I'll have to work my grey matter a bit on this one.

    Thanks for the replies, guys.

    David
  • `->get('rating')` pulls directly from the table, so if it is being rounded, that is happening somewhere else.
Sign In or Register to comment.