Advanced search  

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

Pages: [1]   Go Down

Author Topic: Changing rating system to just votes.  (Read 3256 times)

0 Members and 1 Guest are viewing this topic.

Chopper

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 52
    • The Animation Corner
Changing rating system to just votes.
« on: May 05, 2005, 06:23:47 am »

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.
« Last Edit: May 08, 2005, 09:49:44 am by GauGau »
Logged

pulz

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Changing rating system to just votes.
« Reply #1 on: May 05, 2005, 06:56:22 pm »

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.
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Changing rating system to just votes.
« Reply #2 on: May 06, 2005, 07:25:58 am »

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...
Logged

pulz

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Changing rating system to just votes.
« Reply #3 on: May 07, 2005, 04:51:15 pm »

I totally agree with gaugua!

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

Code: [Select]
<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

Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 52
    • The Animation Corner
Re: Changing rating system to just votes.
« Reply #4 on: May 08, 2005, 12:35:26 am »

This is a great idea and very simple solution. Thanks GauGau! Thanks Pulz!
Logged
Pages: [1]   Go Up
 

Page created in 0.061 seconds with 20 queries.