Changing rating system to just votes. Changing rating system to just votes.
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Changing rating system to just votes.

Started by Chopper, May 05, 2005, 06:23:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chopper

I am currently working on a contest website. I was hoping maybe someone might know how to change or edit the script so that instead of a rating system, only the amount of votes is counted. So when the contest closes, image with 16 votes would win over another image that has 13 votes (no stars involved).

Not sure how hard this is to do, but thought I'd ask anyway.

pulz

that should be pretty easy and several ways to do this. You could for instance add a new variable to the picture table and quote out the existing rating sytem and place your own rate buttton. This button should update the value in your DB. Shouldn't  be so hard if you have some php / database knowledge

You can also use the already existing votes table.
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

Joachim Müller

I suggest you just remove the unneeded rating images (0 stars to 4 stars) and only leave the 5 stars html. You might want to replace the graphic and you're done. I wouldn't mess with additional database tables...

pulz

I totally agree with gaugua!

Just go to your theme.php and find someting like:

<tr>
               <td class="tableb_compact" width="17%" align="center"><a href="{RATE0}" title="{RUBBISH}"><img src="images/rating0.gif" alt="{RUBBISH}" border="0" /><br /></a></td>
               <td class="tableb_compact" width="17%" align="center"><a href="{RATE1}" title="{POOR}"><img src="images/rating1.gif" alt="{POOR}" border="0" /><br /></a></td>
               <td class="tableb_compact" width="17%" align="center"><a href="{RATE2}" title="{FAIR}"><img src="images/rating2.gif" alt="{FAIR}" border="0" /><br /></a></td>
               <td class="tableb_compact" width="17%" align="center"><a href="{RATE3}" title="{GOOD}"><img src="images/rating3.gif" alt="{GOOD}" border="0" /><br /></a></td>
               <td class="tableb_compact" width="17%" align="center"><a href="{RATE4}" title="{EXCELLENT}"><img src="images/rating4.gif" alt="{EXCELLENT}" border="0" /><br /></a></td>
               <td class="tableb_compact" width="17%" align="center"><a href="{RATE5}" title="{GREAT}"><img src="images/rating5.gif" alt="{GREAT}" border="0" /><br /></a></td>
       </tr>


And just quote out everything except the last rating (the one with rate5)

Note: If you still want to have normal ratings in other albums you have to do it another way

Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

Chopper

This is a great idea and very simple solution. Thanks GauGau! Thanks Pulz!