Hi there
When someone clicks on Details (next to Rating) in the album, it displays the voting statistics.
I need to change mine from 5 to 15 and replace the stars with gifs of numbers (from 1 to 15).
How do I change the page that is headed Vote Statistics (is it somewhere in displayimage.php - sorry, very much a newbie to php) and replace the stars with my gifs and add an extra 10.
Hope this is clear. :)
Thanks.
edit stat_details.php
Thanks for replying.
I guess it's in the code:
EOT;
if ($type == 'vote') { // type == vote start
$query = "SELECT rating, count(rating) AS totalVotes FROM {$CONFIG['TABLE_VOTE_STATS']} WHERE pid=$pid GROUP BY rating";
$result = cpg_db_query($query);
$rateArr = array();
starttable("100%", $lang_stat_details_php['stats'], 2);
while ($row = mysql_fetch_array($result)) {
$voteArr[$row['rating']] = $row['totalVotes'];
}
for ($i=0; $i<6;$i++){
$voteArr[$i] = isset($voteArr[$i]) ? $voteArr[$i] : 0;
$width = $voteArr[$i]*10;
echo <<<EOT
<tr class="tableh2">
<td width="20%">
<img src="images/rating$i.gif" />
</td>
<td>
<img src="images/vote.jpg" width="$width" height="15" border="0" alt="" />
{$voteArr[$i]}
</td>
</tr>
EOT;
}
endtable();
My gif's are the same name as the stars, that is rating1.gif up to 15. So, how is it that it still pulls up the Vote Stats page with stars on them and there are no stars gifs in the images folder?
Thanks.
use another path, i.e. store your images somewhere else than inside the "image" folder and change <img src="images/rating$i.gif" /> accordingly.
Thanks GauGau.