*/
protected $mShowBytes;
+ /**
+ * @var bool Whether to show the dimensions in categories
+ */
+ protected $mShowDimensions;
+
/**
* @var bool Whether to show the filename. Default: true
*/
$galleryOptions = $this->getConfig()->get( 'GalleryOptions' );
$this->mImages = [];
$this->mShowBytes = $galleryOptions['showBytes'];
+ $this->mShowDimensions = $galleryOptions['showDimensions'];
$this->mShowFilename = true;
$this->mParser = false;
$this->mHideBadImages = false;
/**
* Set the caption (as plain text)
*
- * @param string $caption Caption
+ * @param string $caption
*/
function setCaption( $caption ) {
$this->mCaption = htmlspecialchars( $caption );
/**
* Set the caption (as HTML)
*
- * @param string $caption Caption
+ * @param string $caption
*/
public function setCaptionHtml( $caption ) {
$this->mCaption = $caption;
return empty( $this->mImages );
}
+ /**
+ * Enable/Disable showing of the dimensions of an image in the gallery.
+ * Enabled by default.
+ *
+ * @param bool $f Set to false to disable
+ */
+ function setShowDimensions( $f ) {
+ $this->mShowDimensions = (bool)$f;
+ }
+
/**
* Enable/Disable showing of the file size of an image in the gallery.
* Enabled by default.