PEAK XOOPS - About the voting system in englishin japanese

About the voting system

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/15 7:58
slyss79  三等軍曹   Posts: 143
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.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/16 0:19
slyss79  三等軍曹   Posts: 143
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
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/8/21 3:17
slyss79  三等軍曹   Posts: 143
SOLVED

i have changed rating from double to integer


thanks gijoe
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!