In my Top Rated section you see the thumbnails. Under each is the stars value and the number of votes a picture has gotten. My question is how do I alter the code so that every 1 vote shows up as 21 under the thumbnail?
I use this code in the functions.inc.php to increase the number of "Views" from 1 per click to 21 but I can't figure out how to do the same with the "Votes"
function add_hit($pid)
{
global $CONFIG, $raw_ip;
cpg_db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET hits=hits+21, lasthit_ip='$raw_ip', mtime=CURRENT_TIMESTAMP WHERE pid='$pid'");
Thanks,
Find this line under function.inc.php (around #866)
$caption .= "<span class=\"thumb_caption\">".'<img src="'.$prefix.'images/rating'.round($row['pic_rating']/2000).'.gif" alt=""/>'.'<br />'.sprintf($lang_get_pic_data['n_votes'], $row['votes']).'</span>';
and replace it with this
$caption .= "<span class=\"thumb_caption\">".'<img src="'.$prefix.'images/rating'.round($row['pic_rating']/2000).'.gif" alt=""/>'.'<br />'.sprintf($lang_get_pic_data['n_votes'], $row['votes']*21).'</span>';