Jump to content

手册:$wgGalleryOptions

From mediawiki.org
This page is a translated version of the page Manual:$wgGalleryOptions and the translation is 100% complete.
图片: $wgGalleryOptions
‎<gallery>标签的默认设置。
引进版本:1.17.0​(r63707
移除版本:仍在使用
允许的值:(子项的关联数组)
默认值:见下图

详情

‎<gallery>标签和类别中的图库的默认设置。

有关可能的键和每个设置的说明,请参阅下面的“默认值”。

其中一些设置以一种令人困惑的方式对应于可以为‎<gallery>标签本身指定的属性。 有关每个属性的信息,请参阅帮助:照片#可选图库属性

这把钥匙在$wgGalleryOptions... ...设置此‎<gallery>标记属性的默认值
imagesPerRow perrow=
imageWidth widths=
imageHeight heights=
mode mode= (MediaWiki 1.22中的新功能-有关详细信息,请参阅帮助:照片#模式参数)

默认值

MediaWiki版本:
1.30
$wgGalleryOptions = [
];
MediaWiki版本:
1.29
$wgGalleryOptions = [
	// 图库中每行的默认图像数。 0:适应屏幕大小
	'imagesPerRow' => 0,
	// 库中包含图像的单元格的宽度(以“px”为单位)
	'imageWidth' => 120,
	// 图库中包含图像的单元格高度(以“px”为单位)
	'imageHeight' => 120,
	// Length to truncate filename to in caption when using "showfilename".
	// A value of 'true' will truncate the filename to one line using CSS
	// and will be the behaviour after deprecation.
	// @deprecated since 1.28
	'captionLength' => true,
	// Show the filesize in bytes in categories
	'showBytes' => true,
	'mode' => 'traditional',
];
MediaWiki版本:
1.28
$wgGalleryOptions = [
	'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
	'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' => true, // Deprecated @since 1.28
	                         // Length to truncate filename to in caption when using "showfilename".
	                         // A value of 'true' will truncate the filename to one line using CSS
	                         // and will be the behaviour after deprecation.
	'showBytes' => true, // Show the filesize in bytes in categories
	'mode' => 'traditional',
];
MediaWiki版本:
1.22 – 1.27
$wgGalleryOptions = [
	'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
	'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' => 25, // Length of caption to truncate (in characters)
	'showBytes' => true, // Show the filesize in bytes in categories
	'mode' => 'traditional',
];
MediaWiki版本:
1.18 – 1.21
$wgGalleryOptions = array(
	'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
	'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' => 25, // Length of caption to truncate (in characters)
	'showBytes' => true, // Show the filesize in bytes in categories
);
MediaWiki版本:
1.17
$wgGalleryOptions = array (
	'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
	'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
);