Template:Icons

From Star Trek Timelines Wiki
Revision as of 16:21, 21 July 2016 by CodeHydro (talk)
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}}
|}

Icon
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}


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
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;overflow:hidden;transform:scaleX(-1);width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px"><div style="position:relative;left:-Expression error: Unrecognized punctuation character "{".px;top:-Expression error: Unrecognized punctuation character "{".px;">
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;overflow:hidden;transform:scaleX(-1);width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px"><div style="position:relative;left:-Expression error: Unrecognized punctuation character "{".px;top:-Expression error: Unrecognized punctuation character "{".px;">
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;overflow:hidden;transform:scaleX(-1);width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px"><div style="position:relative;left:-Expression error: Unrecognized punctuation character "{".px;top:-Expression error: Unrecognized punctuation character "{".px;">
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}


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
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
{{{3}}}<div style="position:absolute;left:Expression error: Unrecognized punctuation character "{".px;top:Expression error: Unrecognized punctuation character "{".px;width:Expression error: Unrecognized punctuation character "{".px;height:Expression error: Unrecognized punctuation character "{".px;">Expression error: Unrecognized punctuation character "{".px
{{{3}}}
{{{3}}}
{{{3}}}