Help:Images: Difference between revisions
From StrategyWiki, the video game walkthrough and strategy guide wiki
From PD at mediawiki
(→Part 2: expanding) |
Mason11987 (talk | contribs) (From PD at mediawiki) |
||
Line 1: | Line 1: | ||
= | {{All Game Nav|game=StrategyWiki:Guide}} | ||
<nowiki>[[Image: | __TOC__ | ||
{| {{Prettytable}} | |||
|- | |||
|{{Hl3}}|'''Description''' | |||
|{{Hl3}}|'''You type''' | |||
|{{Hl3}}|'''You get''' | |||
|- | |||
|Embed image<br /> (with alt text) | |||
| | |||
<code><nowiki>[[Image:Super Mario Bros. 3.jpg|Super Mario Bros. 3]]</nowiki></code> | |||
| | |||
[[Image:Super Mario Bros. 3.jpg|Super Mario Bros. 3]] | |||
|- | |||
|Link to description page | |||
| | |||
<code><nowiki>[[:Image:Super Mario Bros. 3.jpg]]</nowiki></code><br /> | |||
<code><nowiki>[[:Image:Super Mario Bros. 3.jpg|Super Mario Bros. 3]]</nowiki></code> | |||
| | |||
[[:Image:Super Mario Bros. 3.jpg]]<br /> | |||
[[:Image:Super Mario Bros. 3.jpg|Super Mario Bros. 3]] | |||
|- | |||
|Link directly to file | |||
| | |||
<code><nowiki>[[Media:Super Mario Bros. 3.jpg]]</nowiki></code><br /> | |||
<code><nowiki>[[Media:Super Mario Bros. 3.jpg|Super Mario Bros. 3]]</nowiki></code> | |||
| | |||
[[Media:Super Mario Bros. 3.jpg]]<br /> | |||
[[Media:Super Mario Bros. 3.jpg|Super Mario Bros. 3]] | |||
|- | |||
|Thumbnail<br /> (centered, 100 pixels<br /> wide, with caption) | |||
| | |||
<code><nowiki>[[Image:Super Mario Bros. 3.jpg|center|thumb|100px|Super Mario Bros. 3]]</nowiki></code> | |||
| | |||
[[Image:Super Mario Bros. 3.jpg|center|thumb|100px|Super Mario Bros. 3]] | |||
|} | |||
==Uploaded files== | |||
To use an image or other file which has been [[Help:Managing files|uploaded to the wiki]], use: | |||
*<code><nowiki>[[Image:Super Mario Bros. 3.jpg]]</nowiki></code> | |||
If you add a pipe (|) and some text after the filename, the text will be used as alternative text for text-only browsers: | |||
*<code><nowiki>[[Image:Super Mario Bros. 3.jpg|alternative text]]</nowiki></code> | |||
<nowiki>[[Image: | If you don't want to display the image, you can link to the file's description page, by adding a colon: | ||
*<code><nowiki>[[:Image:Super Mario Bros. 3.jpg]]</nowiki></code> | |||
To bypass the description page and link directly to a file , use the "Media" pseudo-namespace: | |||
*<code><nowiki>[[Media:Super Mario Bros. 3.jpg]]</nowiki></code> | |||
You can also make piped links if you want some other text to be used: | |||
*<code><nowiki>[[:Image:Super Mario Bros. 3.jpg|link text]]</nowiki></code> | |||
*<code><nowiki>[[Media:Super Mario Bros. 3.jpg|link text]]</nowiki></code> | |||
The image name | ===Advanced options=== | ||
The full syntax for displaying an image is: | |||
<code><nowiki>[[Image:{name}|{options}]]</nowiki></code> | |||
Where options can be zero or more of the following, separated by pipes: | |||
*<code>thumb</code>, <code>thumbnail</code>, or <code>frame</code>: Controls how the image is formatted | |||
*<code>left</code>, <code>right</code>, <code>center</code>, <code>none</code>: Controls the alignment of the image on the page | |||
*<code>{width}px</code>: Resizes the image to the given width in pixels | |||
*<code>{caption text}</code> | |||
The options can be given in any order. If a given option does not match any of the other possibilities, it is assumed to be the caption text. Caption text can contain wiki links or other formatting. | |||
=== | ===Gallery of images=== | ||
It's easy to make a gallery of thumbnails with the <code><nowiki><gallery></nowiki></code> tag. The syntax is: | |||
<pre> | |||
<gallery> | |||
Image:{filename}|{caption} | |||
Image:{filename}|{caption} | |||
{...} | |||
</gallery> | |||
</pre> | |||
Captions are optional, and may contain wiki links or other formatting. | |||
< | for example: | ||
<pre> | |||
<gallery> | |||
Image:Super Mario Bros. 3.jpg|Item 1 | |||
Image:Super Mario Bros. 3.jpg|a link to [[Help:Contents]] | |||
Image:Super Mario Bros. 3.jpg | |||
Image:Super Mario Bros. 3.jpg | |||
Image:Super Mario Bros. 3.jpg|''italic caption'' | |||
</gallery> | |||
</pre> | |||
is formatted as: | |||
<gallery> | |||
Image:Super Mario Bros. 3.jpg|Item 1 | |||
Image:Super Mario Bros. 3.jpg|a link to [[Help:Contents]] | |||
Image:Super Mario Bros. 3.jpg | |||
Image:Super Mario Bros. 3.jpg | |||
Image:Super Mario Bros. 3.jpg|''italic caption'' | |||
</gallery> | |||
== | ==Other files== | ||
You can link to an external file using the same syntax used for [[Help:Links#External links|linking to an external web page]]. This feature has to be enabled by the admin; in the new releases of MediaWiki its disabled due to security reasons. | |||
*<code><nowiki>[http://url.for/some/image.png]</nowiki></code> | |||
Or with different text: | |||
*<code><nowiki>[http://url.for/some/image.png link text here]</nowiki></code> | |||
If it is enabled on your wiki, you can also embed external images. To do that, simply insert the url: | |||
*<code><nowiki>http://url.for/some/image.png</nowiki></code> | |||
= | {{Footer Nav|game=StrategyWiki:Guide|backpage=Links|nextpage=Tables}} | ||
== | |||