Difference between revisions of "Help:Image galleries"

From EntropiaPlanets Wiki - Entropia Universe Guides Wiki Info
(Created page with "== General == It's easy to make a gallery of thumbnails with the <code><nowiki><gallery></nowiki></code> tag. The syntax is: <pre> <nowiki><gallery></nowiki> File:file_name.ex...")
 
m (Text replacement - "Example.jpg" to "Replace-me.png")
 
(One intermediate revision by the same user not shown)
Line 18: Line 18:
<pre>
<pre>
<nowiki><gallery></nowiki>
<nowiki><gallery></nowiki>
File:Example.jpg|Item 1
File:Replace-me.png|Item 1
File:Example.jpg|a link to <nowiki>[[Help:Contents]]</nowiki>
File:Replace-me.png|a link to <nowiki>[[Help:Contents]]</nowiki>
File:Example.jpg
File:Replace-me.png
File:Example.jpg|alt=An example image. It has flowers
File:Replace-me.png|alt=An example image. It has flowers
File:Example.jpg| <nowiki>''italic caption''</nowiki>
File:Replace-me.png| <nowiki>''italic caption''</nowiki>
File:Example.jpg|on page "<nowiki>{{PAGENAME}}</nowiki>"
File:Replace-me.png|on page "<nowiki>{{PAGENAME}}</nowiki>"
</gallery>
</gallery>
</pre>
</pre>
is formatted as:
is formatted as:
<gallery>
<gallery>
File:Example.jpg|Item 1
File:Replace-me.png|Item 1
File:Example.jpg|a link to [[Help:Contents]]
File:Replace-me.png|a link to [[Help:Contents]]
File:Example.jpg
File:Replace-me.png
File:Example.jpg|alt=An example image. It has flowers
File:Replace-me.png|alt=An example image. It has flowers
File:Example.jpg|''italic caption''
File:Replace-me.png|''italic caption''
File:Example.jpg|on page "{{PAGENAME}}"
File:Replace-me.png|on page "{{PAGENAME}}"
</gallery>
</gallery>


== Modes ==
== Modes ==
The experimental mode parameter is taking options <tt>traditional, nolines, packed, packed-overlay,</tt> and<tt> packed-hover</tt>. Traditional is the original gallery type used by MediaWiki. Nolines is like traditional, but with less borders. packed causes images to have the same height, but different widths, with little space between the images. "packed-overlay" allows the caption to be overlaid on top of the image. Last of all "packed-hover" is like "packed-overlay", but with the caption only showing up on hover.
The experimental mode parameter is taking options <tt>traditional, nolines, packed, packed-overlay,</tt> and<tt> packed-hover</tt>. Traditional is the default gallery mode. Nolines is like traditional, but with less borders. packed causes images to have the same height, but different widths, with little space between the images. "packed-overlay" allows the caption to be overlaid on top of the image. Last of all "packed-hover" is like "packed-overlay", but with the caption only showing up on hover.


===packed-hover===
===packed-hover===
Line 118: Line 118:
File:Monria appartments.jpg|Crater with habitats
File:Monria appartments.jpg|Crater with habitats
</gallery>
</gallery>


== Optional attributes ==
== Optional attributes ==
Line 142: Line 140:
<pre>
<pre>
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
</gallery>
</gallery>
</pre>
</pre>
Line 157: Line 155:
Result:
Result:
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
File:Example.jpg
File:Replace-me.png
</gallery>
</gallery>


==Links, references, contributors, categories==
==Links, references, contributors, categories==
* Parts of this page originally copied from http://www.mediawiki.org/wiki/Help:Images
* Parts of this page originally copied from http://www.mediawiki.org/wiki/Help:Images

Latest revision as of 11:35, 31 March 2017

General[edit]

It's easy to make a gallery of thumbnails with the <gallery> tag. The syntax is:

<gallery>
File:file_name.ext|caption|alt=alt language
File:file_name.ext|caption|alt=alt language
{...}
</gallery>

Note that the image code is not enclosed in brackets when enclosed in gallery tags.

Captions are optional, and may contain wiki links or other formatting. Some of the parameters controlling thumb output can also be used here, specifically the one's that modify the file (as opposed to one's that control where in the page the image falls). For example, with multi-paged media like pdfs, you can use code like page=4.

The File: prefix can be omitted.

for example:

<gallery>
File:Replace-me.png|Item 1
File:Replace-me.png|a link to [[Help:Contents]]
File:Replace-me.png
File:Replace-me.png|alt=An example image. It has flowers
File:Replace-me.png| ''italic caption''
File:Replace-me.png|on page "{{PAGENAME}}"
</gallery>

is formatted as:

Modes[edit]

The experimental mode parameter is taking options traditional, nolines, packed, packed-overlay, and packed-hover. Traditional is the default gallery mode. Nolines is like traditional, but with less borders. packed causes images to have the same height, but different widths, with little space between the images. "packed-overlay" allows the caption to be overlaid on top of the image. Last of all "packed-hover" is like "packed-overlay", but with the caption only showing up on hover.

packed-hover[edit]

For example:

<gallery mode="packed-hover">
File:Entropia Universe Port Atantis Harbour.jpg|[[Port Atlantis|Port Atlantis Harbour]]
File:Entropia Universe Planet Calypso Mulciber.jpg|[[Creature:Mulciber|Mulciber]]
File:Entropia Universe ROCKtropia Zomhattan at night.jpg|Zomhattan at night
File:Entropia Universe ROCKtropia No Way Out Maximum Security Prison.jpg|[[No Way Out Maximum Security Prison]]
File:Todd Verdeyen Next Island 01.jpg|Tropical paradise
File:Next_Island_Ancient_Greece_22-Nov-2010-04.jpg|[[Ancient Greece]]
File:Terranix_Male_01.jpg|[[Creature:Terranix|Terranix Male]] (wallpaper)
File:Monria appartments.jpg|Crater with habitats
</gallery>

Gives (mode: packed-hover):


traditional[edit]

mode="traditional"

nolines[edit]

mode="nolines"

packed[edit]

mode="packed"

packed-overlay[edit]

mode="packed-overlay"

Optional attributes[edit]

The gallery tag itself takes several additional parameters, specified as attribute name-value pairs:

<gallery {parameters}>
{images}
</gallery>
  • caption="{caption}": (caption text between double quotes for more than a word) sets a caption centered atop the gallery.
  • widths={width}px: sets the widths of the images, default 120px. Note the plural, widths
  • heights={heights}px: sets the (max) heights of the images.
  • perrow={integer}: sets the number of images per row. 0 means automatically adjust based on width of screen
  • showfilename={anything}: Show the filenames of the images in the individual captions for each image
  • mode={traditional|nolines|packed|packed-hover|packed-overlay}: See section above

Please note: The widths and heights parameters are taken more as suggestions then strict values for packed (and related) modes. Packed modes will adjust the width of images in order to make each row the same length.

Example:

Coding:

<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
File:Replace-me.png
</gallery>

Result:

Links, references, contributors, categories[edit]