Noch eine kleine Verbesserung zur Rangliste, die nicht essentiell ist, die ich aber ganz nett finde: es hatte in dem monströsen Query, der die Rangliste aus der DB zieht, jemand bei der Sortierung "tipp_user ASC" angehängt, was die Benutzer nach ID sortiert - ich wollte die aber lieber alphabetisch haben, wenn die Punkte identisch sind (ansonsten bleibt die Sortierung nach Punkten natürlich erhalten):
in der
includes/functions_em.php das hier
Code: Alles auswählen
$sql = "SELECT A. * , sum( A.tipp_points ) AS user_points, count( A.tipp_points ) AS user_total_tipps,
count( B.tipp_points ) AS user_points_tendency, count( C.tipp_points ) AS user_points_difference, count( D.tipp_points ) AS
user_points_result
FROM " . EM_TIPPS_TABLE . " A
LEFT JOIN " . EM_TIPPS_TABLE . " B ON A.tipp_id = B.tipp_id
AND A.tipp_points = " . $em_config['points_tendency'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " C ON A.tipp_id = C.tipp_id
AND A.tipp_points = " . $em_config['points_tordiff'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " D ON A.tipp_id = D.tipp_id
AND A.tipp_points = " . $em_config['points_match'] . "
GROUP BY A.tipp_user
ORDER BY user_points DESC, user_points_result DESC, user_points_difference DESC, user_points_tendency
DESC, tipp_user ASC";
durch das hier ersetzen
Code: Alles auswählen
$sql = "SELECT
A. * ,
sum( A.tipp_points ) AS user_points,
count( A.tipp_points ) AS user_total_tipps,
count( B.tipp_points ) AS user_points_tendency,
count( C.tipp_points ) AS user_points_difference,
count( D.tipp_points ) AS user_points_result
FROM " . EM_TIPPS_TABLE . " A
LEFT JOIN " . EM_TIPPS_TABLE . " B ON A.tipp_id = B.tipp_id
AND A.tipp_points = " . $em_config['points_tendency'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " C ON A.tipp_id = C.tipp_id
AND A.tipp_points = " . $em_config['points_tordiff'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " D ON A.tipp_id = D.tipp_id
AND A.tipp_points = " . $em_config['points_match'] . "
LEFT JOIN " . USERS_TABLE . " E ON A.tipp_user = E.user_id
GROUP BY A.tipp_user
ORDER BY user_points DESC, user_points_result DESC, user_points_difference DESC, user_points_tendency DESC, username";
Ist eigentlich jemand dran, diese ganzen Fixes in ein neues Paket und eine Update-Datei umzusetzen ?
Und: ist der "Tendenz-Bug" jetzt wirklich gefixt ? In meiner Rangliste ist der erste mit dem Punkt markiert, alle anderen mit "Pfeil nach unten" - oder ist das so gewollt ? (hatte mich mit der Berechnung noch nicht selbst beschäftig, vielleicht kann da jemand anderes schneller was zu sagen)