跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
天灾之下:危险连接官网(建设中)
天灾之下:危险连接QQ群
天灾之下:危险连接 Bilibili
冰糖服务器
冰糖服务器QQ群
天灾之下:危险连接资料站
搜索
搜索
中文(中国大陆)
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模板:ImageStackPopupGallery/doc”︁的源代码
模板
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
[[雷光]]
外观
移至侧栏
隐藏
←
模板:ImageStackPopupGallery/doc
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{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|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 &#x21;). It is recommended you set <code>!link=</code> to prevent user confusion. In addition to normal gallery parameters, it adds the following: ;popup-width :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] ;popup-height :Override height of images in popup (If unspecified use from list page) [Images will still be resolution of list page regardless] ;popup-loop :If present, make the slider be circular ;popup-start :Which image to start at (Default 1) ;popup-caption :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 ;popup-title :Title of popup. Shown at top. Can only be plain text, no wikitext ;popup-list :'''required''' (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 <nowiki><gallery widths=500 height=500 id="galleryId">File:...</gallery></nowiki> on it. Additionally, there are some parameters to the template that apply to all images ;reuse_image_caption :If set, use the normal gallery caption as also the caption for the image viewer. ;popup-caption :Set a default image viewer caption for all images. If individual images set a caption, will be overriden ;popup-title :Set default title for image viewer ;noregisterimages :Disable registering all images in the viewer as being in use by the current page ;gallery :The gallery parameter containing all image definitions ;All normal gallery attributes :See [[mw:Help:Images#Optional_gallery_attributes]] 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. e.g. <pre> {{ImageStackPopupGallery| |reuse_image_caption=1 |gallery= File:Empty space File:Example.svg!link=!Caption for both!popup-list=Template:ImageStackPopup/list#medical 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 File:Example2.svg!Normal image, no viewer. }} </pre> {{ImageStackPopupGallery| |reuse_image_caption=1 |gallery= File:Empty space File:Example.svg!link=!Caption for both!popup-list=Template:ImageStackPopup/list#medical 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 File:Example2.svg!Normal image, no viewer. }} Setting mode=packed {{ImageStackPopupGallery| |reuse_image_caption=1 |mode=packed |gallery= File:Empty space File:Example.svg!link=!Caption for both!popup-list=Template:ImageStackPopup/list#medical 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 File:Example2.svg!Normal image, no viewer. }} <templatedata> { "params": { "reuse_image_caption": { "description": "Use the normal gallery captions also as caption for image viewer" }, "popup-caption": { "description": "Default caption for image viewer", "type": "content" }, "popup-title": { "description": "Default title for image viewer" }, "noregisterimages": { "description": "Do not show this page as using the images from the list page", "type": "boolean" }, "gallery": { "description": "Contents of gallery tag. See template docs for special syntax", "type": "string", "required": true, "suggested": true }, "mode": { "description": "Mode for image gallery", "example": "packed", "type": "string", "suggestedvalues": [ "traditional", "packed", "packed-hover", "nolines" ], "default": "traditional", "suggested": true }, "widths": { "description": "Widths of images in gallery", "type": "number" }, "heights": { "description": "heights of images in gallery", "type": "number" }, "perrow": { "description": "Images per row in gallery" }, "caption": { "description": "Caption of gallery (not of image viewer)" }, "showfilename": {}, "id": { "description": "id attribute of gallery", "type": "string" }, "title": { "description": "Title attribute of gallery (Not of image viewer)", "type": "string" }, "class": {}, "lang": {}, "dir": {} }, "description": "Show a gallery of images with play button. Upon pressing play, show a viewer for a gallery specified on a different page", "format": "block" } </templatedata> == Installation == To install this template in your wiki: # Copy the pages [[Module:ImageStackPopup]], [[Template:ImageStackPopup]] and [[Template:ImageStackPopupGallery]] to your wiki. # Create MediaWiki:Gadget-ImageStackPopup.js with the following code:<syntaxhighlight lang="javascript">/** * ImageStackPopup: Creates a popup gallery viewer suitable for medical images * Documentation: https://www.mediawiki.org/wiki/ImageStackPopup * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-ImageStackPopup.js */ mw.loader.load( '//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-ImageStackPopup' ); </syntaxhighlight> # Add the following gadget to MediaWiki:Gadgets-definition: <syntaxhighlight lang="text"> ImageStackPopup[ResourceLoader|hidden|default|categories=ImageStackPopup.js]|ImageStackPopup.js </syntaxhighlight> Done! Add your template to any page to verify that the installation was successful. ==See also== * [[Template:ImageStackPopup]] * [[MediaWiki:Gadget-ImageStackPopup.js]] * [[MediaWiki:Gadget-Global-ImageStackPopup.js]] * [[Module:ImageStackPopup]]
该页面嵌入的页面:
模板:ImageStackPopup/list
(
查看源代码
)
模板:ImageStackPopupGallery
(
查看源代码
)
模板:Mbox
(
查看源代码
)
模板:Template gadget
(
查看源代码
)
模块:Arguments
(
查看源代码
)
模块:ImageStackPopup
(
查看源代码
)
模块:Message box
(
查看源代码
)
模块:Message box/configuration
(
查看源代码
)
模块:Message box/ombox.css
(
查看源代码
)
模块:Yesno
(
查看源代码
)
返回
模板:ImageStackPopupGallery/doc
。
搜索
搜索
查看“︁模板:ImageStackPopupGallery/doc”︁的源代码
添加语言
添加话题