Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -6352,6 +6352,97 @@ |
6353 | 6353 | !! end |
6354 | 6354 | |
6355 | 6355 | !! test |
| 6356 | +Gallery (with options) |
| 6357 | +!! input |
| 6358 | +<gallery widths='60px' heights='40px' perrow='2' caption='Foo [[Main Page]]' > |
| 6359 | +File:Nonexistant.jpg|caption |
| 6360 | +File:Nonexistant.jpg |
| 6361 | +image:foobar.jpg|some '''caption''' [[Main Page]] |
| 6362 | +image:foobar.jpg |
| 6363 | +</gallery> |
| 6364 | +!! result |
| 6365 | +<table class="gallery" cellspacing="0" cellpadding="0"> |
| 6366 | + <caption>Foo <a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">Main Page</a></caption> |
| 6367 | + <tr> |
| 6368 | + <td><div class="gallerybox" style="width: 95px;"> |
| 6369 | + <div style="height: 52px;">Nonexistant.jpg</div> |
| 6370 | + <div class="gallerytext"> |
| 6371 | +<p>caption |
| 6372 | +</p> |
| 6373 | + </div> |
| 6374 | + </div></td> |
| 6375 | + <td><div class="gallerybox" style="width: 95px;"> |
| 6376 | + <div style="height: 52px;">Nonexistant.jpg</div> |
| 6377 | + <div class="gallerytext"> |
| 6378 | + </div> |
| 6379 | + </div></td> |
| 6380 | + </tr> |
| 6381 | + <tr> |
| 6382 | + <td><div class="gallerybox" style="width: 95px;"> |
| 6383 | + <div class="thumb" style="padding: 19px 0; width: 90px;"><div style="margin-left: auto; margin-right: auto; width: 60px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div> |
| 6384 | + <div class="gallerytext"> |
| 6385 | +<p>some <b>caption</b> <a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">Main Page</a> |
| 6386 | +</p> |
| 6387 | + </div> |
| 6388 | + </div></td> |
| 6389 | + <td><div class="gallerybox" style="width: 95px;"> |
| 6390 | + <div class="thumb" style="padding: 19px 0; width: 90px;"><div style="margin-left: auto; margin-right: auto; width: 60px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div> |
| 6391 | + <div class="gallerytext"> |
| 6392 | + </div> |
| 6393 | + </div></td> |
| 6394 | + </tr> |
| 6395 | +</table> |
| 6396 | + |
| 6397 | +!! end |
| 6398 | + |
| 6399 | +!! test |
| 6400 | +gallery (with showfilename option) |
| 6401 | +!! input |
| 6402 | +<gallery showfilename> |
| 6403 | +File:Nonexistant.jpg|caption |
| 6404 | +File:Nonexistant.jpg |
| 6405 | +image:foobar.jpg|some '''caption''' [[Main Page]] |
| 6406 | +File:Foobar.jpg |
| 6407 | +</gallery> |
| 6408 | +!! result |
| 6409 | +<table class="gallery" cellspacing="0" cellpadding="0"> |
| 6410 | + <tr> |
| 6411 | + <td><div class="gallerybox" style="width: 155px;"> |
| 6412 | + <div style="height: 152px;">Nonexistant.jpg</div> |
| 6413 | + <div class="gallerytext"> |
| 6414 | +<p><a href="https://www.mediawiki.org/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br /> |
| 6415 | +caption |
| 6416 | +</p> |
| 6417 | + </div> |
| 6418 | + </div></td> |
| 6419 | + <td><div class="gallerybox" style="width: 155px;"> |
| 6420 | + <div style="height: 152px;">Nonexistant.jpg</div> |
| 6421 | + <div class="gallerytext"> |
| 6422 | +<p><a href="https://www.mediawiki.org/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br /> |
| 6423 | +</p> |
| 6424 | + </div> |
| 6425 | + </div></td> |
| 6426 | + <td><div class="gallerybox" style="width: 155px;"> |
| 6427 | + <div class="thumb" style="padding: 66px 0; width: 150px;"><div style="margin-left: auto; margin-right: auto; width: 120px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div> |
| 6428 | + <div class="gallerytext"> |
| 6429 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br /> |
| 6430 | +some <b>caption</b> <a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">Main Page</a> |
| 6431 | +</p> |
| 6432 | + </div> |
| 6433 | + </div></td> |
| 6434 | + <td><div class="gallerybox" style="width: 155px;"> |
| 6435 | + <div class="thumb" style="padding: 66px 0; width: 150px;"><div style="margin-left: auto; margin-right: auto; width: 120px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div> |
| 6436 | + <div class="gallerytext"> |
| 6437 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br /> |
| 6438 | +</p> |
| 6439 | + </div> |
| 6440 | + </div></td> |
| 6441 | + </tr> |
| 6442 | +</table> |
| 6443 | + |
| 6444 | +!! end |
| 6445 | + |
| 6446 | +!! test |
6356 | 6447 | HTML Hex character encoding (spells the word "JavaScript") |
6357 | 6448 | !! input |
6358 | 6449 | JavaScript |
Index: trunk/phase3/CREDITS |
— | — | @@ -68,6 +68,7 @@ |
69 | 69 | * Ahmad Sherif |
70 | 70 | * Antonio Ospite |
71 | 71 | * Azliq7 |
| 72 | +* Bawolff |
72 | 73 | * Borislav Manolov |
73 | 74 | * Brad Jorsch |
74 | 75 | * Brent G |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -4372,6 +4372,11 @@ |
4373 | 4373 | $ig->useSkin( $this->mOptions->getSkin() ); |
4374 | 4374 | $ig->mRevisionId = $this->mRevisionId; |
4375 | 4375 | |
| 4376 | + if( isset( $params['showfilename'] ) ) { |
| 4377 | + $ig->setShowFilename( true ); |
| 4378 | + } else { |
| 4379 | + $ig->setShowFilename( false ); |
| 4380 | + } |
4376 | 4381 | if( isset( $params['caption'] ) ) { |
4377 | 4382 | $caption = $params['caption']; |
4378 | 4383 | $caption = htmlspecialchars( $caption ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -26,6 +26,8 @@ |
27 | 27 | * (bug 10183) Users can now add personal styles and scripts to all skins via |
28 | 28 | User:<name>/common.css and /common.js (if user css/js is enabled) |
29 | 29 | * (bug 22748) Add anchors on Special:ListGroupRights |
| 30 | +* (bug 21981) Add parameter 'showfilename' to <gallery> to automatically apply |
| 31 | + the names of the individual files within the gallery |
30 | 32 | |
31 | 33 | === Bug fixes in 1.17 === |
32 | 34 | * (bug 17560) Half-broken deletion moved image files to deletion archive without |