Joined: 28 Feb 2005
Posts: 99
Location: Fairfax, VA
Posted: 03/09/05 14:20
Just went and did the star rating thing from scratch and came up with a system that rounds to the nearest 1/2 star, with the lowest possible "active" rating being a "1".
As you can see, I designed everything to be specific for the jm_cobalt_2.2 theme since that's all I allow on my site, so the light blue matte would likely have to be modified for sites using something else (I can provide the .ai source file for my stars if anyone's interested). To get the rating math results to be stuffed into the database properly, I really only had to change two lines in the rating.php script (lines 499 & 503):
plunk the stars files into jamroom\themes\jm_cobalt_2.2\images directory and you're off to the races. If you use different themes on your site, just create stars that work for those themes and plunk them into the correct directory (the tpl file handles the addition regardless of theme selected).
I made a number of other minor tpl modifications that allow the rating to be shown when Songs are listed in a matrix, etc. All fairly easy to do, so I won't go into details there... Still several things to work out, but you guys can start to see where I'm going with jamroom on my site:
Try sorting by Tracks by whatever to see the matrix ratings and then click on an artist to see the use of the stars there. Hope this is helpful to some people... Good luck!
Joined: 20 Feb 2004
Posts: 126
Location: Phildadelphia, PA USA
Posted: 04/13/05 17:06
I wrote a script to do this in my new template by hand before I even saw this
It used the output buffer just like bigguy suggested here since the varible is an include, rounds it to the nearest whole
The only difference really is my script has 2 images, an empty star and a full star, so it just uses logic to output all the images next to each other.
This feature is included in my theme which I submitted to the contest.