diff options
author | git <BlueRaja.admin@gmail.com> | 2013-03-07 19:07:17 -0600 |
---|---|---|
committer | git <BlueRaja.admin@gmail.com> | 2013-03-07 19:07:17 -0600 |
commit | 9cbfc1cb331ac5ce38a91992183ba0b50e3b50dd (patch) | |
tree | fad402ef2c79e80790bae6aaea7204cfc739bd17 | |
parent | f394ba40a189669beafe824f80497401e01c2315 (diff) | |
download | pathery-9cbfc1cb331ac5ce38a91992183ba0b50e3b50dd.tar.xz |
Added challenge points to scores
-rw-r--r-- | includes/datas.php | 4 | ||||
-rw-r--r-- | js/scores.js | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/includes/datas.php b/includes/datas.php index c64edd6..c341ddf 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -807,6 +807,7 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) { timediff(solutions.dateModified, TIMESTAMP(CURDATE())) as diff, users.displayName as display, solutions.moves as moves, + solutions.challengePointsWorth as points, users.ID as ID, users.displayColor, users.wallColor, @@ -871,7 +872,8 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) { $medal = 'gold'; // if is blind map. - if ($isBlindMap AND $myBestMoves < $moves) $row['moves'] = '???'; + if ($isBlindMap AND $myBestMoves < $moves) + $row['moves'] = '???'; $output['users'][$i] = $row; $output['users'][$i]['secondsSinceScored'] = $secondsSinceScored; diff --git a/js/scores.js b/js/scores.js index 161f1ae..3fba599 100644 --- a/js/scores.js +++ b/js/scores.js @@ -120,6 +120,7 @@ function scoresFormatPage(JO) { p = p+"<th>Rank</th>";
p = p+"<th style='width:125px; overflow:hidden; text-align:left; padding-left:42px;'>Name</th>";
p = p+"<th>Moves</th>";
+ p = p+"<th>Points</th>";
p = p+"</tr>";
var showedLastUser = true;
@@ -179,6 +180,9 @@ function scoresFormatPage(JO) { p = p+ "<span class='scoreName'><a href='achievements?id="+u.ID+"' style='color:"+u.displayColor+"'>"+u.display+"</a></span>";
p = p+ "</td>";
p = p+ "<td style='text-align:right;'>"+u.moves+"</td>";
+ if (u.solution) {
+ p += "<td>"+u.points+"</td>";
+ }
p = p+ "</tr>";
previousI = i;
|