Template:Element: Difference between revisions

From Phantasy Star Universe Clementine
(add param list)
mNo edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{lc:{{{1|}}}}}
<includeonly>{{#switch: {{lc:{{{1|}}}}}
|neutral = [[File:Neutral_Icon.gif{{!}}alt=Neutral Element{{!}}link=|Neutral Element]]
|無
|fire = [[File:Fire_Icon.gif{{!}}alt=Fire Element{{!}}link=|Fire Element]]
|n
|ice = [[File:Ice_Icon.gif{{!}}alt=Ice Element{{!}}link=|Ice Element]]
|0
|neutral = {{EnumImage|image=Neutral_Icon.gif|name=Neutral Element|options={{{options|}}}}}
|炎
|f
|1
|fire = {{EnumImage|image=Fire_Icon.gif|name=Fire Element|options={{{options|}}}}}
|氷
|i
|2
|ice = {{EnumImage|image=Ice_Icon.gif|name=Ice Element|options={{{options|}}}}}
|雷
|t
|3
|thunder
|lightning = {{EnumImage|image=Lightning_Icon.gif|name=Lightning Element|options={{{options|}}}}}
|土
|e
|4
|earth
|earth
|ground = [[File:Ground_Icon.gif{{!}}alt=Ground Element{{!}}link=|Ground Element]]
|ground = {{EnumImage|image=Ground_Icon.gif|name=Ground Element|options={{{options|}}}}}
|lightning = [[File:Lightning_Icon.gif{{!}}alt=Lightning Element{{!}}link=|Lightning Element]]
|光
|dark = [[File:Dark_Icon.gif{{!}}alt=Dark Element{{!}}link=|Dark Element]]
|l
|light = [[File:Light_Icon.gif{{!}}alt=Light Element{{!}}link=|Light Element]]
|5
|light = {{EnumImage|image=Light_Icon.gif|name=Light Element|options={{{options|}}}}}
|闇
|d
|6
|dark = {{EnumImage|image=Dark_Icon.gif|name=Dark Element|options={{{options|}}}}}
|#default =  
|#default =  
}}</includeonly><noinclude>
}}</includeonly><noinclude>
==Purpose==
==Purpose==
Shortcut template for all element icons. Contains mouseover for the element name and disables link functionality.
Shortcut template for all element icons. Contains mouseover for the element name and alt-text.
==Parameter List==
==Parameter List==
<pre>
<pre>
{{Elements
{{Element
| <!-- Anonymous parameter. The desired value of the element, case insensitive. Integer values are currently unsupported. -->
|         <!-- Anonymous parameter. The desired value of the element, case insensitive; or a corresponding integer value. Invalid values will output nothing. -->
|options  <!-- The desired image options. If options aren't provided, the link to the image is disabled. -->
}}
}}
</pre>
</pre>
For elements, the valid list of strings, case insensitive, are:
; Neutral:
*無
*n
*neutral
*0
; Fire:
*炎
*f
*fire
*1
; Ice:
*氷
*i
*ice
*2
; Lightning:
*雷
*t
*thunder
*lightning
*3
; Ground:
*土
*e
*earth
*ground
*4
; Light:
*光
*l
*light
*5
; Dark:
*闇
*d
*dark
*6
For image options, a guide on syntax can be found here: [https://www.mediawiki.org/wiki/Help:Images#Syntax]
==Examples==
==Examples==
===Icon for "Neutral"===
===Icon for "Neutral"===
<pre>{{Elements|Neutral}}</pre>
<pre>{{Element|Neutral}}</pre>
{{Elements|Neutral}}
{{Element|Neutral}}
===Icon for "ground" and "ice" In a Centered Table===
<pre>{| class="wikitable" style="margin:auto"
|+ Caption text
|-
! Header text
|-
|{{Element|ground}}{{Element|ice}}
|}</pre>
{| class="wikitable" style="margin:auto"
|+ Caption text
|-
! Header text
|-
|{{Element|ground}}{{Element|ice}}
|}
===Icon for "FIRE"===
===Icon for "FIRE"===
<pre>{{Elements|FIRE}}</pre>
<pre>{{Element|FIRE}}</pre>
{{Elements|FIRE}}
{{Element|FIRE}}
===Icon for "2"===
<pre>{{Element|2}}</pre>
{{Element|2}}
===Icon for "土", Options="24px"===
<pre>{{Element|土|options=24px}}</pre>
{{Element|土|options=24px}}
===Icon for ""===
===Icon for ""===
<pre>{{Elements}}</pre>
<pre>{{Element}}</pre>
{{Elements}}
{{Element}}
</noinclude>
</noinclude>

Latest revision as of 15:51, 1 January 2024

Purpose

Shortcut template for all element icons. Contains mouseover for the element name and alt-text.

Parameter List

{{Element
|         <!-- Anonymous parameter. The desired value of the element, case insensitive; or a corresponding integer value. Invalid values will output nothing. -->
|options  <!-- The desired image options. If options aren't provided, the link to the image is disabled. -->
}}

For elements, the valid list of strings, case insensitive, are:

Neutral
  • n
  • neutral
  • 0
Fire
  • f
  • fire
  • 1
Ice
  • i
  • ice
  • 2
Lightning
  • t
  • thunder
  • lightning
  • 3
Ground
  • e
  • earth
  • ground
  • 4
Light
  • l
  • light
  • 5
Dark
  • d
  • dark
  • 6

For image options, a guide on syntax can be found here: [1]

Examples

Icon for "Neutral"

{{Element|Neutral}}

Neutral Element

Icon for "ground" and "ice" In a Centered Table

{| class="wikitable" style="margin:auto"
|+ Caption text
|-
! Header text
|-
|{{Element|ground}}{{Element|ice}}
|}
Caption text
Header text
Ground ElementIce Element

Icon for "FIRE"

{{Element|FIRE}}

Fire Element

Icon for "2"

{{Element|2}}

Ice Element

Icon for "土", Options="24px"

{{Element|土|options=24px}}

Ground Element

Icon for ""

{{Element}}