Index: trunk/phase3/CREDITS |
— | — | @@ -117,6 +117,7 @@ |
118 | 118 | * Stefano Codari |
119 | 119 | * Str4nd |
120 | 120 | * svip |
| 121 | +* Zachary Hauri |
121 | 122 | |
122 | 123 | == Translators == |
123 | 124 | * Anders Wegge Jakobsen |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3040,6 +3040,31 @@ |
3041 | 3041 | $wgThumbUpright = 0.75; |
3042 | 3042 | |
3043 | 3043 | /** |
| 3044 | + * Adjust the default number of images per-row in the gallery. |
| 3045 | + */ |
| 3046 | +$wgGalleryImagesPerRow = 3; |
| 3047 | + |
| 3048 | +/** |
| 3049 | + * Adjust the width of the cells containing images in galleries (in "px") |
| 3050 | + */ |
| 3051 | +$wgGalleryImageWidth = 200; |
| 3052 | + |
| 3053 | +/** |
| 3054 | + * Adjust the height of the cells containing images in galleries (in "px") |
| 3055 | + */ |
| 3056 | +$wgGalleryImageHeight = 200; |
| 3057 | + |
| 3058 | +/** |
| 3059 | + * The length of caption to truncate to by default (in characters) |
| 3060 | + */ |
| 3061 | +$wgGalleryCaptionLength = 10; |
| 3062 | + |
| 3063 | +/** |
| 3064 | + * Should the gallerys in categoryes show the filesize in bytes? |
| 3065 | + */ |
| 3066 | +$wgGalleryShowBytes = true; |
| 3067 | + |
| 3068 | +/** |
3044 | 3069 | * On category pages, show thumbnail gallery for images belonging to that |
3045 | 3070 | * category instead of listing them as articles. |
3046 | 3071 | */ |
Index: trunk/phase3/includes/ImageGallery.php |
— | — | @@ -32,20 +32,22 @@ |
33 | 33 | */ |
34 | 34 | private $contextTitle = false; |
35 | 35 | |
36 | | - private $mPerRow = 4; // How many images wide should the gallery be? |
37 | | - private $mWidths = 120, $mHeights = 120; // How wide/tall each thumbnail should be |
38 | | - |
39 | 36 | private $mAttribs = array(); |
40 | 37 | |
41 | 38 | /** |
42 | 39 | * Create a new image gallery object. |
43 | 40 | */ |
44 | 41 | function __construct( ) { |
| 42 | + global $wgGalleryImagesPerRow, $wgGalleryImageWidth, $wgGalleryImageHeight, $wgGalleryShowBytes, $wgGalleryCaptionLength; |
45 | 43 | $this->mImages = array(); |
46 | | - $this->mShowBytes = true; |
| 44 | + $this->mShowBytes = $wgGalleryShowBytes; |
47 | 45 | $this->mShowFilename = true; |
48 | 46 | $this->mParser = false; |
49 | 47 | $this->mHideBadImages = false; |
| 48 | + $this->mPerRow = $wgGalleryImagesPerRow; |
| 49 | + $this->mWidths = $wgGalleryImageWidth; |
| 50 | + $this->mHeights = $wgGalleryImageHeight; |
| 51 | + $this->mCaptionLength = $wgGalleryCaptionLength; |
50 | 52 | } |
51 | 53 | |
52 | 54 | /** |
— | — | @@ -308,7 +310,7 @@ |
309 | 311 | $textlink = $this->mShowFilename ? |
310 | 312 | $sk->link( |
311 | 313 | $nt, |
312 | | - htmlspecialchars( $wgLang->truncate( $nt->getText(), 20 ) ), |
| 314 | + htmlspecialchars( $wgLang->truncate( $nt->getText(), $this->mCaptionLength ) ), |
313 | 315 | array(), |
314 | 316 | array(), |
315 | 317 | array( 'known', 'noclasses' ) |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -19,7 +19,12 @@ |
20 | 20 | it from source control: http://www.mediawiki.org/wiki/Download_from_SVN |
21 | 21 | |
22 | 22 | === Configuration changes in 1.17 === |
23 | | - |
| 23 | +* (bug 12797) Allow adjusting of default gallery display options: |
| 24 | + $wgGalleryImagesPerRow, $wgGalleryImageWidth, $wgGalleryImageHeight |
| 25 | + $wgGalleryCaptionLength, $wgGalleryShowBytes |
| 26 | + |
| 27 | +=== New features in 1.17 === |
| 28 | + |
24 | 29 | === Bug fixes in 1.17 === |
25 | 30 | * (bug 17560) Half-broken deletion moved image files to deletion archive without |
26 | 31 | updating DB |