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

Template:Character Label/doc: Difference between revisions

Template page
dustloop:Template:Character Label>Wakeup720
Updating args list for new implementation
dustloop:Template:Character Label>Kaiokek
No edit summary
Line 1: Line 1:
{{doc/start}}
{{doc/start}}
==Arguments==
==Arguments==
  If one unnamed arg is given (e.g. <nowiki>{{Character Label|Sol}}</nowiki>):
  1st arg / game = Game code. Default: Current page's game
  1st arg = Character Name
  2nd arg / chara = Character name. Default: Current page's character
  The template will default to the game from the RootPageName of the current page
  size = Icon size. Default: 24px in height
  If two unnamed args are given (e.g. <nowiki>{{Character Label|GGACR|Sol}}</nowiki>):
  icon = Override icon's image
  1st arg = Game Code
  label = Override the text. Leave blank or input "none" to disable label display
  2nd arg = Character Name
  link = Override the link. Leave blank or input "none" to disable link
If no unnamed args are given, the template will default to the game and character of the current page
  format = none/italic/bold. Default: bold
   
"size" = icon size (optional)
  "icon" = icon override (optional)
  "label" = text override (optional)
  "linkOverride" = link override (optional)
  "format" = none/italic/bold (optional). Default to bold
"L" = put something into this field to disable links '''(Use with either format=none, label=, or P=)'''
"P" = put something into this field to remove the text from the label


==Usage==
==Usage==
* Icon default size is 24px.
* Can be called in 4 ways:
    <nowiki>{{character Label|GGACR|Slayer}}</nowiki>
<nowiki>{{Character Label}}</nowiki> (assumes current game and character)
    <nowiki>{{character Label|GGACR|Venom|120px}}</nowiki>
<nowiki>{{Character Label|Venom}}</nowiki> (assumes current game)
<nowiki>{{Character Label|GGACR|Venom}}</nowiki>
<nowiki>{{Character Label|game=GGACR|chara=Venom}}</nowiki>


* Does not work within section headers.
* Does not work within section headers.
     <nowiki>===={{character Label|GGACR|Venom}}====</nowiki>
     <nowiki>===={{character Label|GGACR|Venom}}====</nowiki>
=== Full Args ===
 
<pre>{{character Label|GGACR|Venom|120px|icon=OverrideIconToUse.png|label=OverrideNameToShow|linkOverride=OverrideLink|format=TextFormat}}</pre>
===Full Args===
<pre>{{Character Label|GGACR|Venom|size=120px|icon=OverrideIconToUse.png|label=OverrideNameToShow|link=OverrideLink|format=TextFormat}}</pre>
* Can also be used with CLabel shorthand.
* Can also be used with CLabel shorthand.
     <nowiki>{{CLabel|GGACR|Ky Kiske}}</nowiki>
     <nowiki>{{CLabel|GGACR|Ky Kiske}}</nowiki>


==Example==
==Examples==
{{character Label|GGACR|Venom}} Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br>
{{character Label|GGACR|Venom}} Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br>
{{character Label|GGST|Goldlewis Dickinson}} Maecenas quis felis volutpat, cursus dolor vel, bibendum urna.<br>
{{character Label|GGST|Goldlewis Dickinson}} Maecenas quis felis volutpat, cursus dolor vel, bibendum urna.<br>
{{character Label|GGACR|Testament}} Duis dignissim posuere justo, vitae sodales felis aliquam sit amet.<br>
{{character Label|GGACR|Testament}} Duis dignissim posuere justo, vitae sodales felis aliquam sit amet.<br>
{{character Label|GGST|Happy Chaos}} Donec efficitur ante ac dolor convallis volutpat.<br>
{{character Label|GGST|Happy Chaos}} Donec efficitur ante ac dolor convallis volutpat.<br>
===Example without size value===
===Example without size value===
{{character Label|GGACR|Venom}}
{{character Label|GGACR|Venom}}
===Example with size value===
===Example with size value===
{{character Label|GGACR|Ky Kiske|size=72px}}
{{character Label|GGACR|Ky Kiske|size=72px}}
===Example with size, and name override values===
===Example with size, and name override values===
:This links to Ky's page
:This links to Ky's page
{{character Label|GGACR|Ky Kiske|size=72px|label=JOHNNY ARCSYS}}
{{character Label|GGACR|Ky Kiske|size=72px|label=JOHNNY ARCSYS}}
===Example with rectangular size===
 
====default size====
==Desired Behaviors==
{{character Label|GGST|Nagoriyuki}}
===Line break===
====larger size====
The Icon should stick to the first word of the Label, while the rest of the Label can break into new lines.
{{character Label|GGST|Nagoriyuki|size=72px}}
 
{{Character Label|GGACR|Venom|label=Lorem 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.}} {{Character Label|GGACR|Sol Badguy|label=Morbi 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:
<nowiki>It's me, {{Character Label|DBFZ|Goku}} from DBFZ!</nowiki>
<nowiki>It's me, {{Character Label|DBFZ|Goku|link=none}} from DBFZ!</nowiki>
<nowiki>It's me, {{Character Label|DBFZ|Goku|label=}} from DBFZ!</nowiki>
<nowiki>It's me, {{Character Label|DBFZ|Goku|link=|label=none|icon=DBFZ_SS_Goku_Icon.png}} from DBFZ!</nowiki>
 
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, Goku from DBFZ!
{{doc/end}}
{{doc/end}}
<noinclude>
<noinclude>
[[Category:Documentation templates]]
[[Category:Documentation templates]]
</noinclude>
</noinclude>

Revision as of 20:08, 1 May 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. 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.png Venom Lorem ipsum dolor sit amet, consectetur adipiscing elit.
File:GGST Goldlewis Dickinson Icon.png Goldlewis Dickinson Maecenas quis felis volutpat, cursus dolor vel, bibendum urna.
File:GGACR Testament Icon.png Testament Duis dignissim posuere justo, vitae sodales felis aliquam sit amet.
File:GGST Happy Chaos Icon.png Happy Chaos Donec efficitur ante ac dolor convallis volutpat.

Example without size value

File:GGACR Venom Icon.png Venom

Example with size value

File:GGACR Ky Kiske Icon.png Ky Kiske

Example with size, and name override values

This links to Ky's page

File:GGACR Ky Kiske Icon.png JOHNNY 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.png Lorem 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.png Morbi 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.png Goku from DBFZ!
It's me, File:DBFZ Goku Icon.png Goku from DBFZ!
It's me, Goku from DBFZ!
It's me, Goku from DBFZ!

It's me, Goku from DBFZ!

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.

MediaWiki Appliance - Powered by TurnKey Linux