Template:Avatar

From Irony Wiki
(Redirected from Template:Pfp)
Jump to navigation Jump to search

(no image found)

Documentation

Outputs a user's avatar or profile picture. It pulls the image (via Cargo) from the user's infobox.

Usage[edit source]

{{avatar|user's name or ID (required)|size=default: 100px|format="frameless" or "border frameless" or "frame" or "thumb" or (nothing)|horizontal= |vertical= |link= |alt= |class= |caption= }}

  • Using an ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the user's infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.
  • The default size of the image is 100px wide. To change this, set the size parameter to either (width)px, x(height)px, or (width)x(height)px. For example: |size=200x200px
  • To make the image a thumbnail image (the type that is usually used in articles), set the format parameter to thumb.
  • All of the named parameters just implement image options. For more info on how to use image options, check out the MediaWiki image guide.
  • For a detailed explanation of all parameters, check out the TemplateData section below.

Examples[edit source]

{{avatar|833403765461745704}} (which is Candy's ID) outputs:

{{avatar|244964867843424276 |size=120x120px |format=thumb |horizontal=right |caption=Saucy's avatar}} outputs:

Saucy's avatar


TemplateData[edit source]

Outputs a user's avatar or profile picture. It pulls the image from the user's infobox.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
user1

The name or Discord ID of the user. ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the user's infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.

Example
833403765461745704
Stringrequired
sizesize

The size of the image. To set only the width, use (width)px. To set only the height, use x(height)px. To set the width and height, use (width)x(height)px.

Default
100px
Example
200x200px
Stringsuggested
formatformat

How the rendered image is formatted and embedded in the page. Most images in article body texts have the "thumb" format. Leave this undefined for basic image behavior. Must be one of: thumb, frameless, border frameless, frame, (undefined)

Suggested values
thumb frameless border frameless frame
Default
(default image behavior)
Stringsuggested
horizontal alignmenthorizontal

Controls the horizontal alignment of the image within text. Must be one of: left, right, center, none, (undefined)

Suggested values
left right center none
Default
(default alignment)
Stringoptional
vertical alignmentvertical

Controls the vertical alignment of a non-floating inline image with the text before or after the image. Must be one of: baseline, sub, super, top, text-top, middle, bottom, text-bottom, (undefined)

Suggested values
baseline sub super top text-top middle bottom text-bottom
Default
middle
Stringoptional
linklink

Sets what page to take you (either internal or external) when you click on the image.

Default
(the image file itself)
Page nameoptional
altalt

The alt text of the image. Used to describe the image for screenreaders or when the browser cannot load the image.

Contentoptional
classclass

The HTML classes that the <img> element will have.

Stringoptional
captioncaption

The caption that appears under the image. Only appears if the format parameter is set to "frame" or "thumb".

Contentsuggested
defaultdefault

What to output if no image could be found.

Default
(no image found)
Stringoptional