Template:Icons

From Star Trek Timelines Wiki
Jump to navigation Jump to search

Just because User:CodeHydro hates manually typing things. Automatic checks if item icon exists. If not, substitutes placeholder, which, when clicked, links to the destination where the file should be uploaded (saving editors from having to editing the item page itself when uploading and guaranteeing that item name will match format of others of different rarity.

1st and 2nd params are just like that of Template:ItemX/init and represent stars (and can be omited in the same manner; if 2nd is given, 1st may not be blank)

You may omit the name parameter for single-word names (technically you can still do for for multi-word names, but it is convention to remove all spaces and parentheses; if mw:Extension:Scribunto were installed, this stripping could be done fully automatically)

{| class=wikitable style="width:800px"
! Icon
| {{Icons|name=HyposprayTOS|0|2}}
|}

To flip an image using CSS (instead of uploading a flipped image), use parameter |flip= instead of |name=:

{| class=wikitable style="width:800px"
! Icon
| {{Icons|flip=HyposprayTOS|0|2}}
|}

Icon
Spacer.png
HyposprayTOS.png
FlipBasic.png
Spacer.png
HyposprayTOS.png
FlipCommon.png
Spacer.png
HyposprayTOS.png
FlipUncommon.png


Item filed under one name for low rarities but another for high rarities? No problem!

{| class=wikitable style="width:50%"
! Icon
| {{icons|name=FeragoitGoulash|1|3}} || {{icons|name=PlomeekSoup|4|5}}
|}

Icon
Spacer.png
FeragoitGoulash.png
FlipCommon.png
Spacer.png
FeragoitGoulash.png
FlipUncommon.png
Spacer.png
FeragoitGoulash.png
FlipRare.png
FeragoitGoulashSuperRare.png
ItemNameLegendary.png

Need that Item smaller? Got ya covered.

{| class=wikitable style="width:50%"
! Icon
| {{icons|name=FeragoitGoulash|1|3|50px}}
|-
| {{Icons|flip=ToolBook|0|2|50px}}
|}

Icon
Spacer.png
FeragoitGoulash.png
FlipCommon.png
Spacer.png
FeragoitGoulash.png
FlipUncommon.png
Spacer.png
FeragoitGoulash.png
FlipRare.png
Icon
Spacer.png
TextBook.png
FlipCommon.png
Spacer.png
TextBook.png
FlipUncommon.png
Spacer.png
TextBook.png
FlipRare.png