Index: includes/DefaultSettings.php
===================================================================
--- includes/DefaultSettings.php	(revision 59937)
+++ includes/DefaultSettings.php	(working copy)
@@ -2980,6 +2980,31 @@
 $wgThumbUpright = 0.75;
 
 /**
+ * Adjust the default number of images per-row in the gallery.
+ */
+$wgGalleryImagesPerRow = 4;
+
+/**
+ * Adjust the width of the cells containing images in galleries (in "px")
+ */
+$wgGalleryImageWidth = 120;
+
+/**
+ * Adjust the height of the cells containing images in galleries (in "px")
+ */
+$wgGalleryImageHeight = 120;
+
+/**
+ * The length of caption to truncate to by default (in characters)
+ */
+$wgGalleryCaptionLength = 20;
+
+/**
+ * Should the gallerys in categoryes show the filesize in bytes?
+ */
+$wgGalleryShowBytes = true;
+
+/**
  *  On  category pages, show thumbnail gallery for images belonging to that
  * category instead of listing them as articles.
  */
Index: includes/ImageGallery.php
===================================================================
--- includes/ImageGallery.php	(revision 59937)
+++ includes/ImageGallery.php	(working copy)
@@ -32,20 +32,22 @@
 	 */
 	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 $wgGalleryImagesPerRow, $wgGalleryImageWidth, $wgGalleryImageHeight, $wgGalleryShowBytes, $wgGalleryCaptionLength;
 		$this->mImages = array();
-		$this->mShowBytes = true;
+		$this->mShowBytes = $wgGalleryShowBytes;
 		$this->mShowFilename = true;
 		$this->mParser = false;
 		$this->mHideBadImages = false;
+		$this->mPerRow = $wgGalleryImagesPerRow;
+		$this->mWidths = $wgGalleryImageWidth;
+		$this->mHeights = $wgGalleryImageHeight;
+		$this->mCaptionLength = $wgGalleryCaptionLength;
 	}
 
 	/**
@@ -308,7 +310,7 @@
 			$textlink = $this->mShowFilename ?
 				$sk->link(
 					$nt,
-					htmlspecialchars( $wgLang->truncate( $nt->getText(), 20 ) ),
+					htmlspecialchars( $wgLang->truncate( $nt->getText(), $this->mCaptionLength ) ),
 					array(),
 					array(),
 					array( 'known', 'noclasses' )
