Wikia

WoWWiki

R

Talk0
101,311pages on
this wiki

Template page

Revision as of 22:03, June 24, 2013 by Icecreamcaekbot (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)

The {{R}} template stands for "Resize", and is a complete substitute to wikilinks, but can be used for externally hosted images. There is one parameter (the first) in which the source url of the image should be placed, 4 other parameters for general image changes like alignment and width, a link parameter and a height parameter.

It should be noted that parameters can be used in any order, with any combinations, as long as it has another function than previously defined parameters. Having a parameter with thumb and a parameter with frame won't do anything, and when 2 captions are defined, only the first one will show. Any bugs or incompletenesses found in the template should be reported to the creator, who will fix it as soon as possible.

First parameterEdit

The first parameter has to be defined, and if it is not, the template won't work.

As you can see, the image automatically links to the source url of the image. To prevent this from happening, you can leave the link parameter blank. More info about the link parameter is in the #Link parameter section.

2nd up to 5th parameterEdit

These 4 parameters can be used to define the width, alignment, whether it is a thumbnail or not and the caption.

WidthEdit

To define the width of the image, simply put a number with "px" behind it in one of the 4 parameters.

AlignmentEdit

To align an image to the left, right or center, simply put "left", "right", "centre", or "center" in one of the 4 parameters.

ThumbnailEdit

To make the image a thumbnail, either aligned to the right, left or center (can not be used in a text rule, like normal thumbnails) (default alignment is right), put either frame or thumb in one of the parameters. Note that thumb automatically resizes the image to 180px wide, and frame doesn't resize at default. As opposed to filelinks, when frame is used, the image can still be resized, it just doesn't resize by default.

CaptionEdit

Anything else that's placed in one of the 4 optional parameters is treated as caption (anything but "thumb", "frame", "left", "right", "centre", "center" or ending with "px"). A caption is only used for a title (the text shown when hovering over the image) when not used as thumbnail, but when used as thumbnail, the caption will also be displayed below the image.

Link parameterEdit

To make a file link to something else than the source file, you can put either an url of a page, or a page on this wiki in the link parameter. For example {{R|<the source url of the image>|<link=http://google.com>}} would link to http://google.com when clicking on the image, and {{R|<the source url of the image>|<link=My Little Pony Friendship is Magic Wiki>}} would link to My Little Pony Friendship is Magic Wiki. If you want an image not to have any links, as opposed to the regular link to the source file, you can leave the link parameter blank, while still defining it: {{R|<the source url of the image>}} would make the image not link to any page at all.

Height parameterEdit

The height (h) parameter can be used to let images resize by height instead of width, or to let the image stretch. If you want to let the image resize by height instead of width.

It should be noted that the width automatically resizes with the height, keeping the dimensions as they originally were, but as soon as one of the 4 optional parameters defines the width, the image will be stretched.

Around Wikia's network

Random Wiki