Difference between revisions of "Template:Infobox Character/adventure"

From Twinsuniverse
Jump to: navigation, search
m
Line 1: Line 1:
<includeonly>
+
<includeonly>{{
{{#switch: {{lc:{{{1|}}}}}
+
#vardefine: lba1 | {{#ifeq: {{lc: {{#if:{{{lba1|}}}|{{{lba1}}}|no}}}} }} | no |
| multiple = {{categorizer|category=Recurring Characters|label=Multiple|nocat={{{nocat|false}}}}}
+
    | {{categorizer|nocat={{{nocat|false}}}
| lba1 = {{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat={{{nocat|false}}}}}
+
        |category=LBA1 Characters
| lba2 = {{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat={{{nocat|false}}}}}
+
        |label=FunFrock's Reign}} }}{{
| lba3 = {{categorizer|category=LBA3 Characters|label=Stellar Entity Genesis|nocat={{{nocat|false}}}}}
+
#vardefine: lba2 | {{#ifeq: {{lc: {{#if:{{{lba2|}}}|{{{lba2}}}|no}}}} }} | no |
| {{categorizer|category=Characters from an unknown adventure|label=unknown|nocat={{{nocat|false}}}}}
+
    | {{categorizer|nocat={{{nocat|false}}}
 +
        |category=LBA2 Characters
 +
        |label=Twinsen's Odyssey}} }}{{
 +
#vardefine: lba3 | {{#ifeq: {{lc: {{#if:{{{lba3|}}}|{{{lba3}}}|no}}}} }} | no |
 +
    | {{categorizer|nocat={{{nocat|false}}}
 +
        |category=LBA3 Characters
 +
        |label=Stellar Entity Genesis}} }}{{
 +
#vardefine: adventure |{{#var: lba1}} }}{{
 +
#vardefine: adventure |{{#var:adventure}}{{#if: {{#var: adventure}} |,<br />}}{{#var: lba2}} }}{{
 +
#vardefine: adventure |{{#var:adventure}}{{#if: {{#var: adventure}} |,<br />}}{{#var: lba3}} }}{{
 +
#switch:
 +
| {{#var:lba1}}{{#var:lba2}}{{#var:lba3}} = {{categorizer|nocat={{{nocat|false}}} <!-- when all parameters are empty/undefined -->
 +
        |category=Characters from an unknown adventure
 +
        |label=unknown}}
 +
| {{#var:lba1}}{{#var:lba2}}
 +
| {{#var:lba1}}{{#var:lba3}}
 +
| {{#var:lba2}}{{#var:lba3}} = {{#var:lba1}}{{#var:lba2}}{{#var:lba3}} <!-- when only one parameter is specified -->
 +
| #default = {{categorizer|nocat={{{nocat|false}}} <!-- when multiple parameters are specified -->
 +
        |category=Recurring Characters
 +
        |label=Multiple}}:
 +
    </td></tr>
 +
    <tr><td colspan="2">{{#var:adventure}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
This template offers a multiple choice for defining which adventure a (character) article belongs to. It can also automatically categorize a page under that category.
 
This template offers a multiple choice for defining which adventure a (character) article belongs to. It can also automatically categorize a page under that category.
  
 
==Parameters==
 
==Parameters==
* The selected adventure from the following values (no parameter name and values are case insensitive):
+
* '''lba1''': Whether or not to select the first adventure "FunFrock's Reign" (defaults to no, enable by any other nonempty value)
*# ''multiple''
+
* '''lba2''': Whether or not to select the second adventure "Twinsen's Odyssey" (defaults to no, enable by any other nonempty value)
*# ''lba1''
+
* '''lba3''': Whether or not to select the third adventure "Stellar Entity Genesis" (defaults to no, enable by any other nonempty value)
*# ''lba2''
+
* '''nocat''': Whether or not to suppress categorization under the chosen categories (defaults to false, which means auto categorization).
*# ''lba3''
+
*# any other (non)empty value defaults to: ''unknown''
+
* '''nocat''': Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).
+
  
'''''Note:''' the lba3 value is of cource a placeholder until the highly anticipated sequel is finally released. Do not use this value yet.''
+
'''''Note:''' the lba3 parameter is of cource a placeholder for until the highly anticipated sequel is finally released. Do not use it yet.''
 +
 
 +
'''''Note:''' this categorizer is multiple choice: you can specify any combination of the three options.''
 +
 
 +
'''''Note:''' if neither '''lba1''', '''lba2''' or '''lba3''' are specified, the default will be 'unknown'.''
  
 
==Syntax==
 
==Syntax==
  <nowiki>{{adventure|value}}</nowiki>
+
  <nowiki>{{adventure|lba1=value|lba2=value|lba3=value}}</nowiki>
  
 
==Examples==
 
==Examples==
Any of the above values may be used like this:
+
Common use of the Adventure categorizer include either '''lba1''' or '''lba2''' parameters:
  <nowiki>{{adventure|lba1}}</nowiki>
+
  <nowiki>{{adventure|lba1=yes}}</nowiki>
  
 
:{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}}
 
:{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}}
  
  
Or this:
+
Or specify the other adventure like this:
  <nowiki>{{adventure|lba2}}</nowiki>
+
  <nowiki>{{adventure|lba2=yes}}</nowiki>
  
 
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
 
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
  
  
Or when both apply:
+
Or when multiple options apply (<span style="color:red">warning</span>: only works within HTML table cells!):
  <nowiki>{{adventure|multiple}}</nowiki>
+
  <nowiki>{{adventure|lba1=yes|lba2=yes}}</nowiki>
  
:{{categorizer|category=Recurring Characters|label=Multiple|nocat=true}}
+
:{{categorizer|category=Recurring Characters|label=Multiple|nocat=true}}:
 +
:{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}},
 +
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
 +
 
 +
 
 +
It doesn't matter what value you specify, any will do:
 +
<nowiki>{{adventure|lba2=aye, let's do this!}}</nowiki>
 +
 
 +
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
 +
 
 +
 
 +
Notice the negative value of any of the three options is "no" (case insensitive):
 +
<nowiki>{{adventure|lba2=false}}</nowiki>
 +
<nowiki>{{adventure|lba2=not}}</nowiki>
 +
<nowiki>{{adventure|lba2=maybe}}</nowiki>
 +
 
 +
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
 +
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
 +
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
  
  
 
When the in-game content of LBA3 is publicized, it may be specified as the adventure as well:
 
When the in-game content of LBA3 is publicized, it may be specified as the adventure as well:
  <nowiki>{{adventure|lba3}}</nowiki>
+
  <nowiki>{{adventure|lba3=yes}}</nowiki>
  
 
:{{categorizer|category=LBA3 Characters|label=Stellar Entity Genesis|nocat=true}}
 
:{{categorizer|category=LBA3 Characters|label=Stellar Entity Genesis|nocat=true}}
  
  
The case of the value is not important:
+
You can also explicitly specify an adventure for exclusion (the same as leaving out the parameter or leaving it empty):
  <nowiki>{{adventure|LBA2}}</nowiki>
+
  <nowiki>{{adventure|lba1=yes|lba2=no}}</nowiki>
 +
<nowiki>{{adventure|lba1=yes|lba2=}}</nowiki>
  
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}}
+
:{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}}
 +
:{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}}
  
  
 
The '''nocat''' parameter may be used to suppress automatic categorization like this (any value will do):
 
The '''nocat''' parameter may be used to suppress automatic categorization like this (any value will do):
  <nowiki>{{adventure|lba1|nocat=true}}</nowiki>
+
  <nowiki>{{adventure|lba1=yes|nocat=true}}</nowiki>
  
 
(this would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 Characters]])
 
(this would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 Characters]])
  
 
[[Category:Article Categorizers]]</noinclude>
 
[[Category:Article Categorizers]]</noinclude>

Revision as of 16:33, 24 November 2012

This template offers a multiple choice for defining which adventure a (character) article belongs to. It can also automatically categorize a page under that category.

Parameters

  • lba1: Whether or not to select the first adventure "FunFrock's Reign" (defaults to no, enable by any other nonempty value)
  • lba2: Whether or not to select the second adventure "Twinsen's Odyssey" (defaults to no, enable by any other nonempty value)
  • lba3: Whether or not to select the third adventure "Stellar Entity Genesis" (defaults to no, enable by any other nonempty value)
  • nocat: Whether or not to suppress categorization under the chosen categories (defaults to false, which means auto categorization).

Note: the lba3 parameter is of cource a placeholder for until the highly anticipated sequel is finally released. Do not use it yet.

Note: this categorizer is multiple choice: you can specify any combination of the three options.

Note: if neither lba1, lba2 or lba3 are specified, the default will be 'unknown'.

Syntax

{{adventure|lba1=value|lba2=value|lba3=value}}

Examples

Common use of the Adventure categorizer include either lba1 or lba2 parameters:

{{adventure|lba1=yes}}
FunFrock's Reign [list all]


Or specify the other adventure like this:

{{adventure|lba2=yes}}
Twinsen's Odyssey [list all]


Or when multiple options apply (warning: only works within HTML table cells!):

{{adventure|lba1=yes|lba2=yes}}
Multiple [list all]:
FunFrock's Reign [list all],
Twinsen's Odyssey [list all]


It doesn't matter what value you specify, any will do:

{{adventure|lba2=aye, let's do this!}}
Twinsen's Odyssey [list all]


Notice the negative value of any of the three options is "no" (case insensitive):

{{adventure|lba2=false}}
{{adventure|lba2=not}}
{{adventure|lba2=maybe}}
Twinsen's Odyssey [list all]
Twinsen's Odyssey [list all]
Twinsen's Odyssey [list all]


When the in-game content of LBA3 is publicized, it may be specified as the adventure as well:

{{adventure|lba3=yes}}
Stellar Entity Genesis [list all]


You can also explicitly specify an adventure for exclusion (the same as leaving out the parameter or leaving it empty):

{{adventure|lba1=yes|lba2=no}}
{{adventure|lba1=yes|lba2=}}
FunFrock's Reign [list all]
FunFrock's Reign [list all]


The nocat parameter may be used to suppress automatic categorization like this (any value will do):

{{adventure|lba1=yes|nocat=true}}

(this would render the same result as the first example above, but would not automatically categorize under Category:LBA1 Characters)