* (bug 22748) Add anchors on Special:ListGroupRights
* (bug 21981) Add parameter 'showfilename' to <gallery> to automatically apply
the names of the individual files within the gallery
+* (bug 12797) Add $wgGalleryOptions for adjusting of default gallery display
+ options
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive without
*/
$wgThumbUpright = 0.75;
+/**
+ * Default parameters for the <gallery> tag
+ */
+
+$wgGalleryOptions = array (
+ 'imagesPerRow' => 4, // Default number of images per-row in the gallery
+ 'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
+ 'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
+ 'captionLength' => 20, // Length of caption to truncate (in characters)
+ 'showBytes' => true, // Show the filesize in bytes in categories
+);
+
/**
* On category pages, show thumbnail gallery for images belonging to that
* category instead of listing them as articles.
*/
private $contextTitle = false;
- private $mPerRow = 4; // How many images wide should the gallery be?
- private $mWidths = 120, $mHeights = 120; // How wide/tall each thumbnail should be
-
private $mAttribs = array();
/**
* Create a new image gallery object.
*/
function __construct( ) {
+ global $wgGalleryOptions;
$this->mImages = array();
- $this->mShowBytes = true;
+ $this->mShowBytes = $wgGalleryOptions['showBytes'];
$this->mShowFilename = true;
$this->mParser = false;
$this->mHideBadImages = false;
+ $this->mPerRow = $wgGalleryOptions['imagesPerRow'];
+ $this->mWidths = $wgGalleryOptions['imageWidth'];
+ $this->mHeights = $wgGalleryOptions['imageHeight'];
+ $this->mCaptionLength = $wgGalleryOptions['captionLength'];
}
/**
$textlink = $this->mShowFilename ?
$sk->link(
$nt,
- htmlspecialchars( $wgLang->truncate( $nt->getText(), 20 ) ),
+ htmlspecialchars( $wgLang->truncate( $nt->getText(), $this->mCaptionLength ) ),
array(),
array(),
array( 'known', 'noclasses' )