<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.undertensai.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3AImageStackPopupGallery%2Fdoc</id>
	<title>模板:ImageStackPopupGallery/doc - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.undertensai.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3AImageStackPopupGallery%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:ImageStackPopupGallery/doc&amp;action=history"/>
	<updated>2026-11-17T03:50:32Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:ImageStackPopupGallery/doc&amp;diff=26940&amp;oldid=prev</id>
		<title>wiki&gt;Sophivorus：​Created page with &quot;{{Template gadget|ImageStackPopup}}  Use this template to generate a gallery of images with a play button. When you click it, it shows a popup with images in a slider viewer, suitable for looking at series of medical data.  See the installation instructions to get it working in your wiki.  The template takes a parameter named gallery that uses the same syntax as the gallery tag, except instead of | uses ! (If you need to write a ! use &amp;amp;#x21;). It is...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:ImageStackPopupGallery/doc&amp;diff=26940&amp;oldid=prev"/>
		<updated>2024-10-04T18:03:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Template gadget|ImageStackPopup}}  Use this template to generate a gallery of images with a play button. When you click it, it shows a popup with images in a slider viewer, suitable for looking at series of medical data.  See the &lt;a href=&quot;#Installation&quot;&gt;installation instructions&lt;/a&gt; to get it working in your wiki.  The template takes a parameter named gallery that uses the same syntax as the gallery tag, except instead of | uses ! (If you need to write a ! use &amp;amp;#x21;). It is...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template gadget|ImageStackPopup}}&lt;br /&gt;
&lt;br /&gt;
Use this template to generate a gallery of images with a play button. When you click it, it shows a popup with images in a slider viewer, suitable for looking at series of medical data.&lt;br /&gt;
&lt;br /&gt;
See the [[#Installation|installation instructions]] to get it working in your wiki.&lt;br /&gt;
&lt;br /&gt;
The template takes a parameter named gallery that uses the same syntax as the gallery tag, except instead of | uses ! (If you need to write a ! use &amp;amp;amp;#x21;). It is recommended you set &amp;lt;code&amp;gt;!link=&amp;lt;/code&amp;gt; to prevent user confusion. In addition to normal gallery parameters, it adds the following:&lt;br /&gt;
&lt;br /&gt;
;popup-width&lt;br /&gt;
:Override the width of images in the popup (If unspecified uses the width from the list page) [Images will still be resolution of list page regardless]&lt;br /&gt;
;popup-height&lt;br /&gt;
:Override height of images in popup (If unspecified use from list page) [Images will still be resolution of list page regardless]&lt;br /&gt;
;popup-loop&lt;br /&gt;
:If present, make the slider be circular&lt;br /&gt;
;popup-start&lt;br /&gt;
:Which image to start at (Default 1)&lt;br /&gt;
;popup-caption&lt;br /&gt;
:Caption to use in image viewer (Different from image caption in gallery unless reuse_image_caption is set). This is shown below the image and can include any wikitext&lt;br /&gt;
;popup-title&lt;br /&gt;
:Title of popup. Shown at top. Can only be plain text, no wikitext&lt;br /&gt;
;popup-list&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;required&amp;#039;&amp;#039;&amp;#039; (If this image will be a popup. Otherwise it will be a normal entry in the gallery). List page with source for popup. Format should be PageName#galleryId where the page will have &amp;lt;nowiki&amp;gt;&amp;lt;gallery widths=500 height=500 id=&amp;quot;galleryId&amp;quot;&amp;gt;File:...&amp;lt;/gallery&amp;gt;&amp;lt;/nowiki&amp;gt; on it.&lt;br /&gt;
&lt;br /&gt;
Additionally, there are some parameters to the template that apply to all images&lt;br /&gt;
;reuse_image_caption&lt;br /&gt;
:If set, use the normal gallery caption as also the caption for the image viewer.&lt;br /&gt;
;popup-caption&lt;br /&gt;
:Set a default image viewer caption for all images. If individual images set a caption, will be overriden&lt;br /&gt;
;popup-title&lt;br /&gt;
:Set default title for image viewer&lt;br /&gt;
;noregisterimages&lt;br /&gt;
:Disable registering all images in the viewer as being in use by the current page&lt;br /&gt;
;gallery&lt;br /&gt;
:The gallery parameter containing all image definitions&lt;br /&gt;
;All normal gallery attributes&lt;br /&gt;
:See [[mw:Help:Images#Optional_gallery_attributes]]&lt;br /&gt;
&lt;br /&gt;
It assumes there is a list page with a gallery on it of all the images you want to use in the popup viewer. The gallery should have an id attribute, and you reference it as PageName#GalleryId. For example [[Template:ImageStackPopup/list#medical]]. All files in the gallery should have the same size, and you should set the gallery widths and heights attribute to a reasonable value, as that value will be used for the sizes in the viewer.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ImageStackPopupGallery|&lt;br /&gt;
|reuse_image_caption=1&lt;br /&gt;
|gallery=&lt;br /&gt;
File:Empty space&lt;br /&gt;
File:Example.svg!link=!Caption for both!popup-list=Template:ImageStackPopup/list#medical&lt;br /&gt;
File:Example.svg!link=!Caption just for gallery!popup-list=Template:ImageStackPopup/list#medical!popup-start=17!popup-loop=yes!popup-caption=Caption for image viewer!popup-width=300!popup-height=300!popup-title=Appendicitis&lt;br /&gt;
File:Example2.svg!Normal image, no viewer.&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{ImageStackPopupGallery|&lt;br /&gt;
|reuse_image_caption=1&lt;br /&gt;
|gallery=&lt;br /&gt;
File:Empty space&lt;br /&gt;
File:Example.svg!link=!Caption for both!popup-list=Template:ImageStackPopup/list#medical&lt;br /&gt;
File:Example.svg!link=!Caption just for gallery!popup-list=Template:ImageStackPopup/list#medical!popup-start=17!popup-loop=yes!popup-caption=Caption for image viewer!popup-width=300!popup-height=300!popup-title=Appendicitis&lt;br /&gt;
File:Example2.svg!Normal image, no viewer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Setting mode=packed&lt;br /&gt;
&lt;br /&gt;
{{ImageStackPopupGallery|&lt;br /&gt;
|reuse_image_caption=1&lt;br /&gt;
|mode=packed&lt;br /&gt;
|gallery=&lt;br /&gt;
File:Empty space&lt;br /&gt;
File:Example.svg!link=!Caption for both!popup-list=Template:ImageStackPopup/list#medical&lt;br /&gt;
File:Example.svg!link=!Caption just for gallery!popup-list=Template:ImageStackPopup/list#medical!popup-start=17!popup-loop=yes!popup-caption=Caption for image viewer!popup-width=300!popup-height=300!popup-title=Appendicitis&lt;br /&gt;
File:Example2.svg!Normal image, no viewer.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;reuse_image_caption&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Use the normal gallery captions also as caption for image viewer&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;popup-caption&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Default caption for image viewer&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;popup-title&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Default title for image viewer&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;noregisterimages&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Do not show this page as using the images from the list page&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;boolean&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;gallery&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Contents of gallery tag. See template docs for special syntax&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;suggested&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;mode&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Mode for image gallery&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;packed&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;suggestedvalues&amp;quot;: [&lt;br /&gt;
				&amp;quot;traditional&amp;quot;,&lt;br /&gt;
				&amp;quot;packed&amp;quot;,&lt;br /&gt;
				&amp;quot;packed-hover&amp;quot;,&lt;br /&gt;
				&amp;quot;nolines&amp;quot;&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;traditional&amp;quot;,&lt;br /&gt;
			&amp;quot;suggested&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;widths&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Widths of images in gallery&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;heights&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;heights of images in gallery&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;perrow&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Images per row in gallery&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;caption&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Caption of gallery (not of image viewer)&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;showfilename&amp;quot;: {},&lt;br /&gt;
		&amp;quot;id&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;id attribute of gallery&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;title&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Title attribute of gallery (Not of image viewer)&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;class&amp;quot;: {},&lt;br /&gt;
		&amp;quot;lang&amp;quot;: {},&lt;br /&gt;
		&amp;quot;dir&amp;quot;: {}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;Show a gallery of images with play button. Upon pressing play, show a viewer for a gallery specified on a different page&amp;quot;,&lt;br /&gt;
	&amp;quot;format&amp;quot;: &amp;quot;block&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
To install this template in your wiki:&lt;br /&gt;
&lt;br /&gt;
# Copy the pages [[Module:ImageStackPopup]], [[Template:ImageStackPopup]] and [[Template:ImageStackPopupGallery]] to your wiki.&lt;br /&gt;
# Create MediaWiki:Gadget-ImageStackPopup.js with the following code:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;/**&lt;br /&gt;
 * ImageStackPopup: Creates a popup gallery viewer suitable for medical images&lt;br /&gt;
 * Documentation: https://www.mediawiki.org/wiki/ImageStackPopup&lt;br /&gt;
 * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-ImageStackPopup.js&lt;br /&gt;
 */&lt;br /&gt;
mw.loader.load( &amp;#039;//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-ImageStackPopup&amp;#039; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Add the following gadget to MediaWiki:Gadgets-definition: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ImageStackPopup[ResourceLoader|hidden|default|categories=ImageStackPopup.js]|ImageStackPopup.js&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Done! Add your template to any page to verify that the installation was successful.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Template:ImageStackPopup]]&lt;br /&gt;
* [[MediaWiki:Gadget-ImageStackPopup.js]]&lt;br /&gt;
* [[MediaWiki:Gadget-Global-ImageStackPopup.js]]&lt;br /&gt;
* [[Module:ImageStackPopup]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Sophivorus</name></author>
	</entry>
</feed>