r21538 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21537‎ | r21538 | r21539 >
Date:18:13, 24 April 2007
Author:jhb
Status:old
Tags:
Comment:
first go at icons for the flags
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/flaggedrevs.css (modified) (history)
  • /trunk/extensions/FlaggedRevs/img (added) (history)
  • /trunk/extensions/FlaggedRevs/img/boxC.png (added) (history)
  • /trunk/extensions/FlaggedRevs/img/boxQ.png (added) (history)
  • /trunk/extensions/FlaggedRevs/img/boxY.png (added) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -120,6 +120,9 @@
121121 $wgFlaggedRevsAutopromote = array('editor' => array('days' => 60,
122122 'edits' => 1000,
123123 'email' => true) );
 124+
 125+# What icons to display
 126+
124127 # Settings below this point should probably not be modified
125128 ############
126129
@@ -398,10 +401,19 @@
399402 }
400403
401404 public function addTagRatings( $flags ) {
 405+ global $wgFlaggedRevTags;
402406 $tag = "<p>";
403407 foreach ( $this->dimensions as $quality => $value ) {
404408 $value = wfMsgHtml('revreview-' . $this->dimensions[$quality][$flags[$quality]]);
405 - $tag .= "&nbsp;<strong>" . wfMsgHtml("revreview-$quality") . "</strong>: $value&nbsp;\n";
 409+ $level = $flags[$quality];
 410+ $minlevel = $wgFlaggedRevTags[$quality];
 411+ if ($level >= $minlevel)
 412+ $classmarker = 2;
 413+ elseif ($level > 0)
 414+ $classmarker = 1;
 415+ else
 416+ $classmarker = 0;
 417+ $tag .= "&nbsp;<strong>" . wfMsgHtml("revreview-$quality") . "</strong>: <span class='fr-marker-$classmarker'><span class='fr-text-value'>$value&nbsp;</span>&nbsp;</span>\n";
406418 }
407419 $tag .= '</p>';
408420 return $tag;
@@ -972,7 +984,9 @@
973985 }
974986 }
975987 }
 988+
976989
 990+
977991 }
978992
979993 $flaggedrevs = new FlaggedRevs();
@@ -985,4 +999,4 @@
9861000 $wgHooks['PageHistoryLineEnding'][] = array($flaggedarticle, 'addToHistLine');
9871001 $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = array($flaggedarticle, 'setPermaLink');
9881002 $wgHooks['ArticleSaveComplete'][] = array($flaggedrevs, 'autoPromoteUser');
989 -?>
\ No newline at end of file
 1003+?>
Index: trunk/extensions/FlaggedRevs/flaggedrevs.css
@@ -44,4 +44,26 @@
4545 margin: 0 0 1.4em 1em;
4646 color: #7d7d7d;
4747 width: auto;
48 -}
\ No newline at end of file
 48+}
 49+
 50+/*.fr-marker-1 span {display: none};*/
 51+.fr-marker-1 {
 52+ background-image: url(../FlaggedRevs/img/boxY.png);
 53+ background-repeat: no-repeat;
 54+ min-width: 16px;
 55+ width: 16px;
 56+ height: 16px
 57+ min-height: 16px;
 58+ padding: 3px 16px 0px 0px;
 59+}
 60+
 61+.fr-text-value {
 62+ font-size:0px;
 63+}
 64+
 65+
 66+.fr-marker-2 {
 67+ background-image: url(../FlaggedRevs/img/boxC.png);
 68+ background-repeat: no-repeat;
 69+ padding: 3px 16px 0px 0px;
 70+}
Index: trunk/extensions/FlaggedRevs/img/boxY.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/FlaggedRevs/img/boxY.png
___________________________________________________________________
Added: svn:mime-type
4971 + image/png
Index: trunk/extensions/FlaggedRevs/img/boxQ.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/FlaggedRevs/img/boxQ.png
___________________________________________________________________
Added: svn:mime-type
5072 + image/png
Index: trunk/extensions/FlaggedRevs/img/boxC.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/FlaggedRevs/img/boxC.png
___________________________________________________________________
Added: svn:mime-type
5173 + image/png