One star for the album.. One star for the album..
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

One star for the album..

Started by mr.bena, April 14, 2012, 01:43:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr.bena

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

ΑndrĂ©

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
$rating_stars_amount = ($CONFIG['old_style_rating']) ? 5 : $CONFIG['rating_stars_amount'];
and above, add
        if ($CURRENT_PIC_DATA['aid'] == 30) {
            $CONFIG['rating_stars_amount'] = 1;
        }


Additionally, open ratepic.php, find
$rating_stars_amount = ($CONFIG['old_style_rating']) ? 5 : $CONFIG['rating_stars_amount'];
and above, add
$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;
}

mr.bena