Image rating

Any suggestion on adding image ratings, I want to add a 5star rating system to work with user comments. At the moment its more for fun with a few friends... so I'm asking them to add *5star or the like to comments and then I'm manually editing an image in to represent the rating they gave.

Be a nice feature to add, comment based ratings that provide an average rating under the image name.

If anyone has any help for working it at the moment, would welcome the advice.

Comments

  • trisweb Administrator
    I have this on the list... pretty low priority though.

    (Excuse the technical details if you want.. this is mostly for me:)

    Ideally it would be a field in the image table. You could just store a running total "rating sum" and the number of ratings it comprises, and then divide to display it, and increment each when someone rates.

    Unless you want to know who's given what rating or the like, there's no need to store them as individual database records or with the comments.
  • This was in 2005. Did someone add it?
  • trisweb Administrator
    Haha, it was in December 2005... so no, not yet. Development has slowed, but I'm now graduated and free, so I'm spending a few weeks to work on zenphoto.
  • I think this would be a cool option, however instead of investing time in a rating system (even though it's low priority), wouldn't it be more beneficial to invest your time in the plug-in API? This way the rating system could be added on as a plugin and there could even be multiple versions of a rating system depending on people's needs.
  • I think I'm going to use http://blog.abusemagazine.com/index.php/2006/01/28/wordpress-plugin-post-star-rating/ and hack it to ZenPhoto this short holydays I'm going to have.

    Needed for a project anyway.

    Best.
  • @humaneasy

    Did you ever get anything done with the ratings hack? i definitely could use something like that as well.
  • Hello ...
    I managed to integrate a 5 star rating system in my zenphoto site.
    It's kind of a hack ....I'll put together a readme and the necesary files and post them here.
  • Here's a link to the files .... let me know if you manage to integrate it .
    http://www.funbox.ro/zenphoto-rating-hack.rar

    Please link back to us( http://www.funbox.ro ) if you use this hack.

    Thx.
  • @iansen

    Nice work. I havent installed it yet, but your hack is based off the exact same rating script i was going to use. Thanks!
  • I got it up and installed, but the rating submissions don't seem to finish. The CSS, images and such are all there, the DB connections seem to be in order, but you cannot actually "rate" images.

    Here's the demo image for you review:
    http://www.thinkdreams.com/zenphoto/demo/IMG_3502.JPG

    Be glad to help troubleshoot and get it working. It would be a nice addition for Tris to possibly implement later, and a good hack for all of us to use for now.
  • For those of running Prototype and Scriptaculous, there is no need to "redeclare" the behavior.js file, which is installed usually in the js subdir in your theme. Note that by default the filename is behaviour.js (the english UK spelling).

    Also, htaccess seems to be at the issue now that I've resolved the above. Mod_rewrite is definitely causing a problem. For example:

    http://www.thinkdreams.com/zenphoto/demo/db.php?j=3&q=1011&t=209.251.142.9&c=5

    is a line used to call the db.php. This will definitely mess with zenphoto's implementation of mod_rewrite. So I'll have to figure out what to change in the htaccess and possibly index.php to route the db.php call correctly.

    And ideas Tris? I'm going to try it on my own, I think it will be similar to things I've done previous like the slideshow for the Thinkdreams theme, etc.
  • OK. Got it. Nothing to do with htaccess. All I had to was hardcode the URL in the _drawrating.php file to the themepath (which is usually zp_themeroot). i just manually typed it in though. It works good. I also had to remove the default.css from the declaration because it was messing with my theme. All you really need is the rating.css file. That controls all of the css options for the stars, etc.

    Thanks for the nice addition to zenphoto hacks. This should go on the wiki once it's back up and operational.
  • The original link: http://www.funbox.ro/zenphoto-rating-hack.rar, is no longer functional. Anyone have a link to it and the updated files?
  • @Macscr-

    I'm going to post a tutorial on how to accomplish this, with necessary code snippets as well. Just give me a bit to get it up there somewhere.

    Can't wait until a wiki is available, this would be a great place to "plop" all these sorts of things, but I know Tristan is working on it, and I'm not rushing him at all....
  • been more than a year.. would like to see this feature though ;)
  • acrylian Administrator, Developer
    To answer your question from the other thread, image and album rating is included in Zenphoto and in all of the included themes. (written here too: http://www.zenphoto.org/). You must really been away for a year...:-)

    Info about the usage in our functions guide.
Sign In or Register to comment.