diff --git a/ContributionScores.i18n.php b/ContributionScores.i18n.php index 9a77b78..7f9c411 100644 --- a/ContributionScores.i18n.php +++ b/ContributionScores.i18n.php @@ -16,6 +16,7 @@ $messages['en'] = array( 'contributionscores-days' => 'Last {{PLURAL:$1|day|$1 days}}', 'contributionscores-allrevisions' => 'All time', 'contributionscores-score' => 'Score', + 'contributionscores-rank' => 'Rank', 'contributionscores-pages' => 'Pages', 'contributionscores-changes' => 'Changes', 'contributionscores-username' => 'Username', @@ -59,6 +60,8 @@ See also: * {{msg-mw|Contributionscores-days}}', 'contributionscores-score' => 'Used as column header of the table. {{Related|Contributionscores-score}}', + 'contributionscores-rank' => '{{Related|Contributionscores-score}} +{{Identical|Rank}}', 'contributionscores-pages' => '{{Related|Contributionscores-score}} {{Identical|Page}}', 'contributionscores-changes' => '{{Related|Contributionscores-score}} @@ -782,6 +785,7 @@ $messages['he'] = array( 'contributionscores-days' => 'ב{{PLURAL:$1|יום האחרון|יומיים האחרונים|־$1 הימים האחרונים}}', 'contributionscores-allrevisions' => 'מאז ומתמיד', 'contributionscores-score' => 'ניקוד', + 'contributionscores-rank' => 'דירוג', 'contributionscores-pages' => 'דפים', 'contributionscores-changes' => 'שינויים', 'contributionscores-username' => 'שם משתמש', diff --git a/ContributionScores_body.php b/ContributionScores_body.php index 5a9151a..4528b25 100644 --- a/ContributionScores_body.php +++ b/ContributionScores_body.php @@ -92,12 +92,14 @@ class ContributionScores extends IncludableSpecialPage { $output = "\n" . "\n" . + Html::element( 'th', array(), $this->msg( 'contributionscores-rank' )->text() ) . Html::element( 'th', array(), $this->msg( 'contributionscores-score' )->text() ) . Html::element( 'th', array(), $this->msg( 'contributionscores-pages' )->text() ) . Html::element( 'th', array(), $this->msg( 'contributionscores-changes' )->text() ) . Html::element( 'th', array(), $this->msg( 'contributionscores-username' )->text() ); $altrow = ''; + $user_rank = 1; $lang = $this->getLanguage(); foreach ( $res as $row ) { @@ -116,9 +118,10 @@ class ContributionScores extends IncludableSpecialPage { } $output .= Html::closeElement( 'tr' ); - $output .= "\n\n
" . - $lang->formatNum( round( $row->wiki_rank, 0 ) ) . "\n" . - $lang->formatNum( $row->page_count ) . "\n" . + $output .= "
" . + $lang->formatNum( round( $user_rank, 0 ) ) . "\n" . + $lang->formatNum( round( $row->wiki_rank, 0 ) ) . "\n" . + $lang->formatNum( $row->page_count ) . "\n" . $lang->formatNum( $row->rev_count ) . "\n" . $userLink; @@ -134,6 +137,8 @@ class ContributionScores extends IncludableSpecialPage { } else { $altrow = ''; } + + $user_rank++; } $output .= Html::closeElement( 'tr' ); $output .= Html::closeElement( 'table' );