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

From Twinsuniverse
Jump to: navigation, search
m
(fixed all list issues)
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:
 
         |category=Recurring files
 
         |category=Recurring files
 
         |label=Multiple}}:
 
         |label=Multiple}}:
     }}{{list
+
     }}{{list|range=3|separator={{#ifexpr: {{#len:{{#var:lba|}}}} <= 1|implode}}
     | {{#if: {{#pos:{{#var:lba|}}|1}}
+
     |{{#if: {{#pos:{{#var:lba|}}|1}} | {{categorizer|nocat={{{nocat|false}}}|category=LBA1 files|article=FunFrock's Reign}}}}
        | {{categorizer|nocat={{{nocat|false}}}
+
     |{{#if: {{#pos:{{#var:lba|}}|2}} | {{categorizer|nocat={{{nocat|false}}}|category=LBA2 files|article=Twinsen's Odyssey}}}}
            |category=LBA1 files
+
     |{{#if: {{#pos:{{#var:lba|}}|3}} | {{categorizer|nocat={{{nocat|false}}}|category=LBA3 files|article=Stellar Entity Genesis}}}} }}
            |article=FunFrock's Reign}}}}
+
}}</includeonly><noinclude>{{Infobox Template
     | {{#if: {{#pos:{{#var:lba|}}|2}}
+
|purpose=infobox
        | {{categorizer|nocat={{{nocat|false}}}
+
|singletag=no
            |category=LBA2 files
+
|multiline=optional
            |article=Twinsen's Odyssey}}}}
+
|gamerelated=yes
     | {{#if: {{#pos:{{#var:lba|}}|3}}
+
|suppressible=recursively
        | {{categorizer|nocat={{{nocat|false}}}
+
|choice=multiple
            |category=LBA3 files
+
|cat1=LBA1 files!lba1
            |article=Stellar Entity Genesis}}}} }}
+
|cat2=LBA2 files!lba2
}}</includeonly><noinclude>
+
|cat3=LBA3 files!lba3
 +
|cat4=NonLBA files!''none''
 +
|cat5=Files from an unknown adventure!''unknown''!maintenance
 +
|var1=lba
 +
}}
 +
 
 
This template offers a multiple choice for defining which adventure a file page belongs to. It can also automatically categorize a page under that category.
 
This template offers a multiple choice for defining which adventure a file page belongs to. It can also automatically categorize a page under that category.
  
Line 114: Line 119:
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 files]]. This feature works both on valid values and the maintenance task mentioned above.
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 files]]. This feature works both on valid values and the maintenance task mentioned above.
  
[[Category:Categorizers|file]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:32, 7 June 2014

Infobox File/adventure
Purpose

Infobox [list all]

Single tag

No [list all]

Multi-line

Optional [list all]

Protected

No [list all]

Game related

Yes [list all]

Categorization
Suppressible

Recursively [list all]

Choice

Multiple categories [list all]

Categories

Multiple: [list all]

Variables
Names

One: [list all]

  • lba  (free for reuse)
Subpages

This template offers a multiple choice for defining which adventure a file page 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: this categorizer is multiple choice: you can specify any combination of the three options.

Note: if all lba1, lba2 and lba3 specify a negative value, the default 'none' will be used.

Note: if neither lba1, lba2 or lba3 specify a valid value, the default 'unknown' will be used.

Syntax

{{Infobox File/adventure|lba1=value|lba2=value|lba3=value}}

Examples

Common use include either the lba1 or lba2 parameter to specify the one adventure a file belongs to (value "yes" is recommended):

{{Infobox File/adventure|lba1=yes}}
{{Infobox File/adventure|lba2=yes}}
{{Infobox File/adventure|lba3=yes}}
FunFrock's Reign [list all]
Twinsen's Odyssey [list all]
Stellar Entity Genesis [list all]


You can also specify multiple adventures for one file:

{{Infobox File/adventure|lba1=yes|lba2=yes}}
Multiple [list all]:


It doesn't matter which value you use, any nonempty value other than "no" will express a positive value, so these all have the same result:

{{Infobox File/adventure|lba1=aye, let's do this!}}
{{Infobox File/adventure|lba1=false}}
{{Infobox File/adventure|lba1=not}}
{{Infobox File/adventure|lba1=maybe}}
{{Infobox File/adventure|lba1=0}}
{{Infobox File/adventure|lba1=zero}}
{{Infobox File/adventure|lba1=null}}
{{Infobox File/adventure|lba1=n}}
{{Infobox File/adventure|lba1=whatever}}
{{Infobox File/adventure|lba1=yes}}
{{Infobox File/adventure|lba1=YES}}
FunFrock's Reign [list all]


The only ways to express a negative value is by leaving out the parameter, leaving it empty or specifying "no" (case insensitive), so these all have the same result:

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


You can also specify none of the adventures for a file if they aren't really LBA related (for e.g. User Avatars) by explicitly specifying the "no" value (case insensitive) for all options:

{{Infobox File/adventure|lba1=no|lba2=NO|lba3=nO}}
None [list all]


You may leave the "adventure" undefined (which would raise the Files from an unknown adventure maintenance task) by not specifying any positive value for any of the options, so these all have the same result:

{{Infobox File/adventure}}
{{Infobox File/adventure|lba1=no}}
{{Infobox File/adventure|lba1=|lba2=|lba3=}}
unknown [list all]


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

{{Infobox File/adventure|lba1=yes|nocat=true}}

This would render the same result as the first example above, but would not automatically categorize under Category:LBA1 files. This feature works both on valid values and the maintenance task mentioned above.