Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Remove RATING , but keep Voting , help  (Read 3442 times)

0 Members and 1 Guest are viewing this topic.

mustang_lex

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Stangette.com
Remove RATING , but keep Voting , help
« on: July 22, 2005, 02:35:38 am »

OK, on my coppermine gallery i decided to remove the rating system due to people crying about getting low rates (its a female photo site) . But i have a Member Of The Month which is based on Votes and I like to keep.

The good news is I found a way from searching here how to do it (most of it) To make it easy I just edited the theme.php and removed 1-4 rating pic, leaving just the 5 star pic and I made a new pic called Vote to go in its place. WORKS GREAT!! however my next and really last problem was I had to replace the line under the photo  "Rate this file (current rating : 3.9 / 5 with 24 votes)"  (example) to " (currently 24 votes)

The problem is when I edit the english.php file and find 'rating' => '(current rating : %s / 5 with %s votes)',
and change it to 'rating' => '(currently %s votes)',

The outcome is (currently 3.9 votes)  

As you can see its showing the ratings NOT the VOTES . It has something to do with %s

is there another varible I can use for 'rating' =>    to make this work.

Thank You
« Last Edit: July 22, 2005, 05:35:09 pm by Nibbler »
Logged
Alex
www.stangette.com/showcase
my Coppermine Gallery!

Nibbler

  • Guest
Re: Remove RATING , but keep Voting , help
« Reply #1 on: July 22, 2005, 03:10:26 am »

You want to play with this line in displayimage.php

Code: [Select]
$votes = $CURRENT_PIC_DATA['votes'] ? sprintf($lang_rate_pic['rating'], round($CURRENT_PIC_DATA['pic_rating'] / 2000, 1), $CURRENT_PIC_DATA['votes']) : $lang_rate_pic['no_votes'];
This may work:

Code: [Select]
$votes = $CURRENT_PIC_DATA['votes'] ? sprintf($lang_rate_pic['rating'], $CURRENT_PIC_DATA['votes']) : $lang_rate_pic['no_votes'];
Logged

mustang_lex

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Stangette.com
Re: Remove RATING , but keep Voting , help
« Reply #2 on: July 22, 2005, 04:01:50 am »

I tried what you suggested to a T and it just gives a blank . Nothing not even a () . However I picked a photo that had no votes and actually said (no votes)

oh and I just noticed at the top I got

Warning: sprintf(): Too few arguments in /home/stangett/public_html/showcase/displayimage.php on line 229

BTW thank you for your support. Its really well appreciated. the link to my gallery is in my sig
 
« Last Edit: July 22, 2005, 04:07:39 am by mustang_lex »
Logged
Alex
www.stangette.com/showcase
my Coppermine Gallery!

Nibbler

  • Guest
Re: Remove RATING , but keep Voting , help
« Reply #3 on: July 22, 2005, 04:07:53 am »

Keep your other change:

Code: [Select]
'rating' => '(currently %s votes)',
Logged

mustang_lex

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Stangette.com
Re: Remove RATING , but keep Voting , help
« Reply #4 on: July 22, 2005, 05:27:45 pm »

YOU ARE A GOD!!!! Thank  you!!! It worked with the second change. I can't thank you enough
Logged
Alex
www.stangette.com/showcase
my Coppermine Gallery!
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.