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: One star for the album..  (Read 1670 times)

0 Members and 1 Guest are viewing this topic.

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
One star for the album..
« on: April 14, 2012, 01:43:50 am »

Hi, currently I am using 5 stars rating system. But, I want to imply exception and make only 1 star for the album album_id=30. Is there a way to make this happen? Please, help..
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: One star for the album..
« Reply #1 on: April 16, 2012, 02:57:15 pm »

Copy the function theme_html_rating_box from the sample theme to your theme's theme.php file if it doesn't exist. Then, find
Code: [Select]
$rating_stars_amount = ($CONFIG['old_style_rating']) ? 5 : $CONFIG['rating_stars_amount'];and above, add
Code: [Select]
        if ($CURRENT_PIC_DATA['aid'] == 30) {
            $CONFIG['rating_stars_amount'] = 1;
        }

Additionally, open ratepic.php, find
Code: [Select]
$rating_stars_amount = ($CONFIG['old_style_rating']) ? 5 : $CONFIG['rating_stars_amount'];and above, add
Code: [Select]
$aid = mysql_result(cpg_db_query("SELECT aid FROM {$CONFIG['TABLE_PICTURES']} WHERE pid = ".$superCage->get->getInt('pic')), 0);
if ($aid == 30) {
    $CONFIG['rating_stars_amount'] = 1;
}
Logged

mr.bena

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 117
Re: One star for the album..
« Reply #2 on: April 16, 2012, 07:13:36 pm »

Yes! ;D

This one works..
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.