More actions
dustloop:Template:Character Label>Kaiokek No edit summary |
EmissaryFGC (talk | contribs) m 113 revisions imported: Credit to the Dustloop wiki (dustloop.com). |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 4: | Line 4: | ||
-->{{#vardefine:CharaCheckEmpty|{{{chara|{{{2|{{{1|{{#titleparts:{{PAGENAME}}|1|2}}}}}}}}}}}}}<!-- | -->{{#vardefine:CharaCheckEmpty|{{{chara|{{{2|{{{1|{{#titleparts:{{PAGENAME}}|1|2}}}}}}}}}}}}}<!-- | ||
-->{{#vardefine:LabelChara|{{#if:{{#var:CharaCheckEmpty}}|{{#var:CharaCheckEmpty}}|Goku}}}}<!-- | -->{{#vardefine:LabelChara|{{#if:{{#var:CharaCheckEmpty}}|{{#var:CharaCheckEmpty}}|Goku}}}}<!-- | ||
If "link" is not provided, fall back to this link: game/chara. Disabled if set to none. "linkOverride" | If "link" is not provided, fall back to this link: game/chara. Disabled if set to none. "linkOverride" can also be used for backward compatibility | ||
-->{{#vardefine:LabelLink|{{#switch:{{{linkOverride|{{{link|auto}}}}}} | -->{{#vardefine:LabelLink|{{#switch:{{{linkOverride|{{{link|auto}}}}}} | ||
| none | = | | none | = | ||
| Line 16: | Line 16: | ||
}}]] | }}]] | ||
}}<!-- | }}<!-- | ||
Text | Text formatting | ||
-->{{#vardefine: | -->{{#vardefine:FormattedText|{{#switch: {{{format|auto}}} | ||
| none | = {{{label|{{#var:LabelChara}}}}} | |||
-->{{#vardefine:LabelText|{{# | | italic = ''{{{label|{{#var:LabelChara}}}}}'' | ||
| italicbold | bolditalic = '''''{{{label|{{#var:LabelChara}}}}}''''' | |||
| | | '''{{{label|{{#var:LabelChara}}}}}'''}}}}<!-- | ||
| | Final text | ||
| | -->{{#vardefine:LabelText|{{#if:{{#var:LabelLink}}|[[{{#var:LabelLink}}|{{#var:FormattedText}}]]|{{#var:FormattedText}}}}}}<!-- | ||
Template start. To avoid line breaks between Icon and the first word of Text, the entire template is wrapped in white-space: nowrap, then Text is wrapped in white-space: normal. The invisible space character won't be copied | Template start. To avoid line breaks between Icon and the first word of Text, the entire template is wrapped in white-space: nowrap, then Text is wrapped in white-space: normal. The invisible space character won't be copied | ||
--><includeonly>{{#switch:{{{label|auto}}} | --><includeonly>{{#switch:{{{label|auto}}} | ||
Latest revision as of 17:52, 16 September 2024
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
File:GGACR Venom Icon.pngVenom Lorem ipsum dolor sit amet, consectetur adipiscing elit.
File:GGST Goldlewis Dickinson Icon.pngGoldlewis Dickinson Maecenas quis felis volutpat, cursus dolor vel, bibendum urna.
File:GGACR Testament Icon.pngTestament Duis dignissim posuere justo, vitae sodales felis aliquam sit amet.
File:GGST Happy Chaos Icon.pngHappy Chaos Donec efficitur ante ac dolor convallis volutpat.
Example without size value
File:GGACR Venom Icon.pngVenom
Example with size value
File:GGACR Ky Kiske Icon.pngKy Kiske
Example with size, and name override values
- This links to Ky's page
File:GGACR Ky Kiske Icon.pngJOHNNY ARCSYS
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.
File:GGACR Venom Icon.pngLorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas pulvinar facilisis condimentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum facilisis sit amet mi non ornare. File:GGACR Sol Badguy Icon.pngMorbi eget efficitur ipsum. Quisque viverra arcu venenatis, bibendum libero nec, pretium lectus. Nullam laoreet dictum auctor.
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, File:DBFZ Goku Icon.pngGoku from DBFZ! It's me, File:DBFZ Goku Icon.pngGoku from DBFZ! It's me, Goku from DBFZ! It's me, Goku from DBFZ!
It's me, Goku from DBFZ!
The above documentation is transcluded from Template:Character Label/doc. (edit | history)