About the voting system now it is structured to obtain an average of all the votes for that picture.
Should it be possible to have the results in terms of the sum of all the
votes for that pictures. I mean if someone rates that picture 4, another rates it 5, and another rates it 7, should it be possible to have (in topten.php?rate=1) the final result of the sum 4 + 5 +7 = 16
Thank you very much.
about the voting i have made this:
in modules/myalbum/include/function.php
at line 533 cancel:
$finalrating = number_format( $totalrating / $votesDB , 4 ) ;
$query = "UPDATE $table_photos SET rating=$finalrating, votes=$votesDB WHERE lid = $lid" ;
and copy this:
//hack Dantom
#$finalrating = number_format( $totalrating / $votesDB , 4 ) ;
$finalrating = $totalrating ;
$query = "UPDATE $table_photos SET rating=$finalrating, votes=$votesDB WHERE lid = $lid" ;
now is all ok but when the sum exceeds 99 there is an error? (or not???) how can i do sum for example 202 ? (i must modify anithing else in phpmyadmin ???)
thanks a lot
SOLVEDi have changed rating from double to integer
thanks gijoe