跳转到内容

模板:ImageStackPopup/doc

来自天灾之下:危险连接资料站

Use this template to generate an image 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, such as CT or MRI scans.

See the installation instructions to get it working in your wiki.

The list parameter references a page with a fragment. E.g. Template:ImageStackPopup/list#medical, will use the image list with the id "medical" from the page Template:ImageStackPopup/list as the list of images. Keep in mind that all images should have the same size (and especially same aspect ratio). Generally the list page would have code like <gallery widths=700 heights=700 id="medical">File:first.png...</gallery> on it.

e.g.

{{ImageStackPopup
|start   = 177
|list    = Template:ImageStackPopup/list#medical
|caption = This is my caption
|title   = Window Title
|file    = [[File:Appendicitis (CT angiogram) (Radiopaedia 154713-127660 Axial 1).jpg|link=|thumb|left|upright=1.3|Try clicking play]]
}}

Show an image with a play button that pops up a dialog showing more images in a viewer with a slider that is suitable for medical scans.

模板参数

此模板首选参数换行的代码块格式。

参数描述类型状态
looploop

Should slider loop around. Set either "yes" or have no value

示例值
yes
布尔可选
startstart

Which image to start on

默认值
1
示例值
4
自动值
1
数字推荐
widthwidth

Override image width from list page

数字可选
heightheight

Override height from list page

数字可选
Image list pagelist

A page name and fragment to load the image list from. For example, if you put MyPage#myGallery, then it is assumed there is a <gallery id="myGallery">...</gallery> on the page MyPage which is used as the list of images

示例值
MyPage#myGallery
字符串必需
noregisterimagesnoregisterimages

Disable translcuding the list page. This will cause this page not to be listed on the what links here for the images used.

布尔可选
captioncaption

Caption to show in the pop-up below the image. Can include any wikitext.

内容推荐
Popup titletitle

Title of popup. Can only be plain text. Wikitext not supported.

字符串推荐
filefile

The wikitext to include the image shown on the page

示例值
[[File:Example.png|thumb|100px|caption text]]
内容必需


Installation

To install this template in your wiki:

  1. Copy the pages Module:ImageStackPopup, Template:ImageStackPopup and Template:ImageStackPopupGallery to your wiki.
  2. Create MediaWiki:Gadget-ImageStackPopup.js with the following code:
    /**
     * 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' );
    
  3. Add the following gadget to MediaWiki:Gadgets-definition:
    ImageStackPopup[ResourceLoader|hidden|default|categories=ImageStackPopup.js]|ImageStackPopup.js
    

Done! Add your template to any page to verify that the installation was successful.

Background

This was based of work originally by User:Hellerhoff and was funded by mdwiki:Wiki Project Med Foundation.

Currently live

Please add additional languages in which it is installed.

See also