Template:GalleryItems: Difference between revisions

From Step Mods | Change The Game
No edit summary
mNo edit summary
 
(42 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><li class="modgallerybox" style="width: {{{boxwidth|185}}}px;"><div style="width: {{{boxwidth|185}}}px;"><div class="thumb" style="width: {{{thumbwidth|180}}}px; height: 116px;"><div style="margin: 16px auto;">{{#hsimg:GALLERY{{#var:id}}|150|{{{caption|}}}| {{{url}}} }}</div></div>{{#if: {{{caption|}}} | <div class="modgallerytext"><p>{{{caption}}}</p></div>}}</div></li></includeonly><noinclude>
<includeonly>{{Alert|type=warn|text=This template is deprecated. Please revise markup to use [[:Template:GallerySimple]] instead.}}<li class="modgallerybox" style="width:185px;"><div style="width:185px;"><div class="thumb" style="width:180px; height:116px; overflow:hidden;"><div style="margin:16px auto 31px auto;">{{#ifexist:{{{url}}}|[[{{{url}}}|150px|highslide={{#var:id}}:{{{caption|}}}]]|{{#hsimg:GALLERY{{#var:id}}|150|{{{caption|}}}|{{{url}}}}}}}</div></div>{{#if: {{{caption|}}} | <div class="modgallerytext"><p>{{{caption}}}</p></div>}}</div></li></includeonly><noinclude>__NOTOC__ [[Category:Deprecated Templates]]


==Purpose & Usage==
==Purpose & Usage==
The purpose of the GalleryItem template is to define and display one gallery item per usage. This template must be used within the Gallery template as such:
{{fc|#E6B69E|This is a core site template that is used along with [[:Template:Gallery]] on all mod pages. Together, they are used to display a gallery of images having varying dimensions within frames of equal dimensions. This makes these image galleries neat and clean for use on mod pages. This template is accessible to wiki editors, but this template page is protected.}}


<pre>
<pre>
Line 9: Line 9:
|align=center
|align=center
|galleryitems=
|galleryitems=
{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=A wall}}
{{GalleryItems|url=File:MOInstaller01.png|caption=A wall}}
{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=Text}}
{{GalleryItems|url=File:MOInstaller02.png|caption=Text}}
{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=More text}}
{{GalleryItems|url=File:MOInstaller03.png|caption=More text}}
}}
}}
</pre>
</pre>
Line 18: Line 18:
|align=center
|align=center
|galleryitems=
|galleryitems=
{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=A wall}}
{{GalleryItems|url=File:MOInstaller01.png|caption=A wall}}
{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=Text}}
{{GalleryItems|url=File:MOInstaller02.png|caption=Text}}
{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=More text}}
{{GalleryItems|url=File:MOInstaller03.png|caption=More text}}
}}
}}
:Here three instances of GalleryItem was used; one for each image. See below for the parameters that can be used with GalleryItem and their examples.
<br>


==Examples==
==Examples==
Line 59: Line 56:
<br>
<br>


====Defining Height and Width:====
====Note:====
;boxwidth
When a GalleryItem is used outside the Gallery template, the GalleryItem template will still work. However, since it is not defined within a single gallery when clicked, it will default as part of a "page gallery". You will see all the images not enclosed within a Gallery template as one large gallery.
:defines the width,in pixels, of the outlining box which the image sets. This should be 5px more that the width of the thumbnail define in ''thumbwidth''.
;thumbwidth
:defines the width of the thumbnail in pixels.
;thumbheight
:defines the height of the thumbnail in pixels.
 
<pre>
{{GalleryItems|boxwidth=405px|thumbwidth=400px|thumbheight=225px|url=https://copy.com/b1qwohqNdVIc0ryw|caption=Dummy Image}}
</pre>
<br>
<br>
====Note:====
When a GalleryItem is used outside the Gallery template, the GalleryItem template will still work. However, since it is not defined within a single gallery when clicked, it will default as page of a "page gallery". You will see all the images on that page as one gallery.


== See Also ==
== See Also ==
[[:Template:Gallery]]
[[:Template:Gallery]]
</noinclude>
</noinclude>

Latest revision as of 15:14, September 17, 2021


Purpose & Usage

This is a core site template that is used along with Template:Gallery on all mod pages. Together, they are used to display a gallery of images having varying dimensions within frames of equal dimensions. This makes these image galleries neat and clean for use on mod pages. This template is accessible to wiki editors, but this template page is protected.

{{Gallery
|enable=Yes
|align=center
|galleryitems=
{{GalleryItems|url=File:MOInstaller01.png|caption=A wall}}
{{GalleryItems|url=File:MOInstaller02.png|caption=Text}}
{{GalleryItems|url=File:MOInstaller03.png|caption=More text}}
}}
Warning-Logo.png

WARNING

This template is deprecated. Please revise markup to use Template:GallerySimple instead.
    Warning-Logo.png

    WARNING

    This template is deprecated. Please revise markup to use Template:GallerySimple instead.
  • A wall
    A wall

    A wall

  • Warning-Logo.png

    WARNING

    This template is deprecated. Please revise markup to use Template:GallerySimple instead.
  • Text
    Text

    Text

  • Warning-Logo.png

    WARNING

    This template is deprecated. Please revise markup to use Template:GallerySimple instead.
  • More text
    More text

    More text

Examples

GalleryItem should always be defined within the Gallery template. To learn to define that template, see the link at the bottom of this page. A separate instance of GalleryItem must be used for each item displayed. There are four parameters that can be defined within GalleryItem: height, width, url, and caption. URL and caption are explained here. Height and width are explained below.

url
url is the URL to the image that will be displayed. It is defined by adding in |url=Insert_URL_Here after the GalleryItems parameter. See the example below.
caption
caption is the text displayed under the image. It is defined by add in |caption=texttexttext after the GalleryItems parameter. See the example below.


The following example will display a single item within a gallery with a caption added.

Code:
The GalleryItem is define as:

{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=Dummy Image}}

However; it should be placed within the Gallery template as such:

{{Gallery
|enable=Yes
|align=center
|galleryitems=
{{GalleryItems|url=https://copy.com/b1qwohqNdVIc0ryw|caption=Dummy Image}}
}}

Result:

Warning-Logo.png

WARNING

This template is deprecated. Please revise markup to use Template:GallerySimple instead.


Note:

When a GalleryItem is used outside the Gallery template, the GalleryItem template will still work. However, since it is not defined within a single gallery when clicked, it will default as part of a "page gallery". You will see all the images not enclosed within a Gallery template as one large gallery.

See Also

Template:Gallery