I'd installed this mod, works great, but I've a concern regarding top avg ratings of uploader, right now it is giving top ten of avg ratings of users which is correct but, I want to consider avg ratings only when if users number of votings recved is greater than 100, this way I can present much better uploaders
lets say I've users who got rating like this (x/y, x:avg rating, y:number of ratings), 4/100, 5/1, 5/3, 4.99/200, 3.97/300;
right now this mod sorts this like this 5/3, 5/1, 4.99/200, 4/100, 3.97/300, but this is unfair as users who got toplisted are not really worth
Could somebody please refine the below query to consider avg ratings if number_ratings recved is greater than 100..
if (defined("STATS_SHOW_TOPIMAGE_RATINGS_FROM_USER") && STATS_SHOW_TOPIMAGE_RATINGS_FROM_USER == 1) {
$sql = "SELECT ROUND(AVG(i.image_rating),2) as avg_rating, ".get_user_table_field("u.",user_name).", ".get_user_table_field("u.",user_id).$additional_sql_uuserpic."
FROM ".IMAGES_TABLE." i
LEFT JOIN ".USERS_TABLE." u ON (i.user_id = ".get_user_table_field("u.",user_id).")
WHERE $sql_adminu i.image_rating != 0 AND ".get_user_table_field("u.",user_level)." > ".GUEST."
GROUP BY ".get_user_table_field("u.",user_id)."
ORDER BY avg_rating DESC, ".get_user_table_field("u.",user_id)." ASC
LIMIT ".STATS_TOP_MEMBERS_LIMIT;;
show_topmembers($sql,"topimageratingsfromuser","avg_rating");
}
Thanks.