Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Character Label: Difference between revisions

Template page
Created page with "<includeonly>{{#vardefine:query|{{#cargo_query:table=heroes|fields=CONCAT(image)|where=_pageName="{{{1}}}"|group by=_pageID|no html|default=File:Unknown Character icon.png}}}}..."
 
No edit summary
Line 1: Line 1:
<includeonly>{{#vardefine:query|{{#cargo_query:table=heroes|fields=CONCAT(image)|where=_pageName="{{{1}}}"|group by=_pageID|no html|default=File:Unknown Character icon.png}}}}<!--
<includeonly>{{#vardefine:query|{{#cargo_query:table=heroes|fields=CONCAT(image)|where=_pageName="{{{1}}}/{{{2}}}"|group by=_pageID|no html|default=File:Unknown Character icon.png}}}}<!--


--><div style="margin:7px 5px 0px; vertical-align:center; text-align:center; display:inline-block; line-height:normal; width:{{{2|80px}}};">
--><div style="margin:7px 5px 0px; vertical-align:center; text-align:center; display:inline-block; line-height:normal; width:{{{3|80px}}};">
{{#if:{{{border|}}}|<div style="margin-bottom:5px; box-shadow:0px 0px 2px 4px {{{border}}};">[[{{#var:query}}|{{{2|80px}}}|link={{{1|#}}}]]</div>|[[{{#var:query}}|{{{2|80px}}}|link={{{1|#}}}]]}}</div> <div style="font-size:12pt;display:inline;">'''[[{{{1|Unknown Character}}}]]'''</div></includeonly><noinclude>
{{#if:{{{border|}}}|<div style="margin-bottom:5px; box-shadow:0px 0px 2px 4px {{{border}}};">[[{{#var:query}}|{{{3|80px}}}|link={{{2|#}}}]]</div>|[[{{#var:query}}|{{{3|80px}}}|link={{{2|#}}}]]}}</div> <div style="font-size:12pt;display:inline;">'''[[{{{2|Unknown Character}}}]]'''</div></includeonly><noinclude>
{{Doc}}
{{Doc}}
[[Category:Navigational templates]]
[[Category:Navigational templates]]

Revision as of 12:53, 2 December 2019

Arguments

1st arg / game = Game code. Default: Current page's game
2nd arg / chara = Character name. Default: Current page's character
size = Icon size. Default: 24px in height
icon = Override icon's image
label = Override the text. Leave blank or input "none" to disable label display
link = Override the link. Leave blank or input "none" to disable link
format = none/italic/bold/italicbold/bolditalic. Default: bold

Usage

  • Can be called in 4 ways:
{{Character Label}} (assumes current game and character)
{{Character Label|Venom}} (assumes current game)
{{Character Label|GGACR|Venom}}
{{Character Label|game=GGACR|chara=Venom}}
  • Does not work within section headers.
   ===={{Character Label|GGACR|Venom}}====

Full Args

{{Character Label|GGACR|Venom|size=120px|icon=OverrideIconToUse.png|label=OverrideNameToShow|link=OverrideLink|format=TextFormat}}
  • Can also be used with CLabel shorthand.
   {{CLabel|GGACR|Ky Kiske}}

Examples

[[
Error: Table heroes not found.
|80px|link=Venom]]
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
[[
Error: Table heroes not found.
|80px|link=Goldlewis Dickinson]]
Maecenas quis felis volutpat, cursus dolor vel, bibendum urna.
[[
Error: Table heroes not found.
|80px|link=Testament]]
Duis dignissim posuere justo, vitae sodales felis aliquam sit amet.
[[
Error: Table heroes not found.
|80px|link=Happy Chaos]]
Donec efficitur ante ac dolor convallis volutpat.

Example without size value

[[
Error: Table heroes not found.
|80px|link=Venom]]

Example with size value

[[
Error: Table heroes not found.
|80px|link=Ky Kiske]]

Example with size, and name override values

This links to Ky's page
[[
Error: Table heroes not found.
|80px|link=Ky Kiske]]

Desired Behaviors

Line break

The Icon should stick to the first word of the Label, while the rest of the Label can break into new lines.

[[
Error: Table heroes not found.
|80px|link=Venom]]
[[
Error: Table heroes not found.
|80px|link=Sol Badguy]]

Copy paste compatibility

These examples can be copy pasted while still producing the same text:

It's me, {{Character Label|DBFZ|Goku}} from DBFZ!
It's me, {{Character Label|DBFZ|Goku|link=none}} from DBFZ!
It's me, {{Character Label|DBFZ|Goku|label=}} from DBFZ!
It's me, {{Character Label|DBFZ|Goku|link=|label=none|icon=DBFZ_SS_Goku_Icon.png}} from DBFZ!
It's me,
[[
Error: Table heroes not found.
|80px|link=Goku]]
from DBFZ! It's me,
[[
Error: Table heroes not found.
|80px|link=Goku]]
from DBFZ! It's me,
[[
Error: Table heroes not found.
|80px|link=Goku]]
from DBFZ! It's me,
[[
Error: Table heroes not found.
|80px|link=Goku]]
from DBFZ!

It's me, Goku from DBFZ!

zh:Template:Character label

MediaWiki Appliance - Powered by TurnKey Linux