Index: trunk/phase3/skins/monobook/main.css |
— | — | @@ -1513,6 +1513,29 @@ |
1514 | 1514 | text-align: center; |
1515 | 1515 | } |
1516 | 1516 | |
| 1517 | +/** Special:Version */ |
| 1518 | + |
| 1519 | +table#sv-ext, table#sv-hooks { |
| 1520 | + margin: 1em; |
| 1521 | + padding:0em; |
| 1522 | +} |
| 1523 | + |
| 1524 | +#sv-ext td, #sv-hooks td, |
| 1525 | +#sv-ext th, #sv-hooks th { |
| 1526 | + border: 1px solid #A0A0A0; |
| 1527 | + padding: 0 0.15em 0 0.15em; |
| 1528 | +} |
| 1529 | +#sv-ext th, #sv-hooks th { |
| 1530 | + background-color: #F0F0F0; |
| 1531 | + color: black; |
| 1532 | + padding: 0 0.15em 0 0.15em; |
| 1533 | +} |
| 1534 | +tr.sv-space{ |
| 1535 | + height: 0.8em; |
| 1536 | + border:none; |
| 1537 | +} |
| 1538 | +tr.sv-space td { display: none; } |
| 1539 | + |
1517 | 1540 | /* |
1518 | 1541 | Table pager (e.g. Special:Imagelist) |
1519 | 1542 | - remove underlines from the navigation link |
— | — | @@ -1543,4 +1566,4 @@ |
1544 | 1567 | } |
1545 | 1568 | #toolbar { clear: both; } |
1546 | 1569 | |
1547 | | -.mw-plusminus-null { color: #aaa; } |
\ No newline at end of file |
| 1570 | +.mw-plusminus-null { color: #aaa; } |
Index: trunk/phase3/includes/SpecialVersion.php |
— | — | @@ -21,6 +21,8 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | class SpecialVersion { |
| 25 | + private $firstExtOpened = true; |
| 26 | + |
25 | 27 | /** |
26 | 28 | * main() |
27 | 29 | */ |
— | — | @@ -79,7 +81,7 @@ |
80 | 82 | * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ") |
81 | 83 | * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion(); |
82 | 84 | |
83 | | - return str_replace( "\t\t", '', $ret ); |
| 85 | + return str_replace( "\t\t", '', $ret ) . "\n"; |
84 | 86 | } |
85 | 87 | |
86 | 88 | /** Return a string of the MediaWiki version with SVN revision if available */ |
— | — | @@ -104,10 +106,12 @@ |
105 | 107 | ); |
106 | 108 | wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) ); |
107 | 109 | |
108 | | - $out = "\n* Extensions:\n"; |
| 110 | + $out = "<h2>Extensions</h2>\n"; |
| 111 | + $out .= wfOpenElement('table', array('id' => 'sv-ext') ); |
| 112 | + |
109 | 113 | foreach ( $extensionTypes as $type => $text ) { |
110 | 114 | if ( count( @$wgExtensionCredits[$type] ) ) { |
111 | | - $out .= "** $text:\n"; |
| 115 | + $out .= $this->openExtType( $text ); |
112 | 116 | |
113 | 117 | usort( $wgExtensionCredits[$type], array( $this, 'compare' ) ); |
114 | 118 | |
— | — | @@ -126,27 +130,27 @@ |
127 | 131 | } |
128 | 132 | |
129 | 133 | if ( count( $wgExtensionFunctions ) ) { |
130 | | - $out .= "** Extension functions:\n"; |
131 | | - $out .= '***' . $this->listToText( $wgExtensionFunctions ) . "\n"; |
| 134 | + $out .= $this->openExtType('Extension functions'); |
| 135 | + $out .= '<tr><td colspan="3">' . $this->listToText( $wgExtensionFunctions ) . "</td></tr>\n"; |
132 | 136 | } |
133 | 137 | |
134 | 138 | if ( $cnt = count( $tags = $wgParser->getTags() ) ) { |
135 | 139 | for ( $i = 0; $i < $cnt; ++$i ) |
136 | 140 | $tags[$i] = "<{$tags[$i]}>"; |
137 | | - $out .= "** Parser extension tags:\n"; |
138 | | - $out .= '***' . $this->listToText( $tags ). "\n"; |
| 141 | + $out .= $this->openExtType('Parser extension tags'); |
| 142 | + $out .= '<tr><td colspan="3">' . $this->listToText( $tags ). "</td></tr>\n"; |
139 | 143 | } |
140 | 144 | |
141 | 145 | if( $cnt = count( $fhooks = $wgParser->getFunctionHooks() ) ) { |
142 | | - $out .= "** Parser function hooks:\n"; |
143 | | - $out .= '***' . $this->listToText( $fhooks ) . "\n"; |
| 146 | + $out .= $this->openExtType('Parser function hooks'); |
| 147 | + $out .= '<tr><td colspan="3">' . $this->listToText( $fhooks ) . "</td></tr>\n"; |
144 | 148 | } |
145 | 149 | |
146 | 150 | if ( count( $wgSkinExtensionFunction ) ) { |
147 | | - $out .= "** Skin extension functions:\n"; |
148 | | - $out .= '***' . $this->listToText( $wgSkinExtensionFunction ) . "\n"; |
| 151 | + $out .= $this->openExtType('Skin extension functions'); |
| 152 | + $out .= '<tr><td colspan="3">' . $this->listToText( $wgSkinExtensionFunction ) . "</td></tr>\n"; |
149 | 153 | } |
150 | | - |
| 154 | + $out .= wfCloseElement( 'table' ); |
151 | 155 | return $out; |
152 | 156 | } |
153 | 157 | |
— | — | @@ -159,7 +163,7 @@ |
160 | 164 | } |
161 | 165 | |
162 | 166 | function formatCredits( $name, $version = null, $author = null, $url = null, $description = null) { |
163 | | - $ret = '*** '; |
| 167 | + $ret = '<tr><td>'; |
164 | 168 | if ( isset( $url ) ) |
165 | 169 | $ret .= "[$url "; |
166 | 170 | $ret .= "''$name"; |
— | — | @@ -168,13 +172,10 @@ |
169 | 173 | $ret .= "''"; |
170 | 174 | if ( isset( $url ) ) |
171 | 175 | $ret .= ']'; |
172 | | - if ( isset( $description ) ) |
173 | | - $ret .= ', ' . $description; |
174 | | - if ( isset( $description ) && isset( $author ) ) |
175 | | - $ret .= ', '; |
176 | | - if ( isset( $author ) ) |
177 | | - $ret .= ' by ' . $this->listToText( (array)$author ); |
178 | | - |
| 176 | + $ret .= '</td>'; |
| 177 | + $ret .= "<td>$description</td>"; |
| 178 | + $ret .= "<td>" . $this->listToText( (array)$author ) . "</td>"; |
| 179 | + $ret .= '</tr>'; |
179 | 180 | return "$ret\n"; |
180 | 181 | } |
181 | 182 | |
— | — | @@ -188,15 +189,34 @@ |
189 | 190 | $myWgHooks = $wgHooks; |
190 | 191 | ksort( $myWgHooks ); |
191 | 192 | |
192 | | - $ret = "* Hooks:\n"; |
| 193 | + $ret = "<h2>Hooks</h2>\n" |
| 194 | + . wfOpenElement('table', array('id' => 'sv-hooks') ) |
| 195 | + . "<tr><th>Hook name</th><th>Subscribed by</th></tr>\n"; |
| 196 | + |
193 | 197 | foreach ($myWgHooks as $hook => $hooks) |
194 | | - $ret .= "** $hook: " . $this->listToText( $hooks ) . "\n"; |
| 198 | + $ret .= "<tr><td>$hook</td><td>" . $this->listToText( $hooks ) . "</td></tr>\n"; |
195 | 199 | |
196 | 200 | return $ret; |
197 | 201 | } else |
198 | 202 | return ''; |
199 | 203 | } |
200 | 204 | |
| 205 | + private function openExtType($text, $name = null) { |
| 206 | + $opt = array( 'colspan' => 3 ); |
| 207 | + $out = ''; |
| 208 | + |
| 209 | + if(!$this->firstExtOpened) { |
| 210 | + // Insert a spacing line |
| 211 | + $out .= '<tr class="sv-space">' . wfElement( 'td', $opt ) . "</tr>\n"; |
| 212 | + } |
| 213 | + $this->firstExtOpened = false; |
| 214 | + |
| 215 | + if($name) { $opt['id'] = "sv-$name"; } |
| 216 | + |
| 217 | + $out .= "<tr>" . wfElement( 'th', $opt, $text) . "</tr>\n"; |
| 218 | + return $out; |
| 219 | + } |
| 220 | + |
201 | 221 | /** |
202 | 222 | * @static |
203 | 223 | * |