Template:Infobox command: Difference between revisions

several repeated infoboxes on the commands page, so I will merge them into one. Subpage since it will only be used here (that I know of). There was also a typo here or there
 
m 87 revisions imported
 
(86 intermediate revisions by 23 users not shown)
Line 1: Line 1:
{{infobox
{{#invoke:infobox|infobox
|title={{{1}}}
|title=<code>/{{{name|{{SUBPAGENAME}}}}}</code>
|image=none
|imagearea=none
|rows=
|rows=
{{infobox row|class=list-style-none|Restrictions|{{
{{#if: {{{alias|}}} | {{infobox row|class=list-style-none|Aliases|{{{alias}}} }} }}
  #switch: {{lc:{{{restrict|}}}}}
{{#if: {{{hidden|}}} | {{infobox row|class=list-style-none|Visibility|{{
  |op = [[Operator]]
      #ifeq: {{{hidden|}}} | 1 | Hidden | Visible }}}}
  |mp = [[Multiplayer]]<br>[[Operator]]
  |
  |None
  }}{{
  #if: {{{cmdblock|}}} | <br>No [[command block]]s }}
}}
}}
{{#if: {{{firstver|}}} | {{infobox row|First introduced|{{version link|{{{firstver}}}}} {{
{{infobox row|[[Permission level|Permission level<br>required]]|{{#if:{{{oplevel|}}}|{{{oplevel}}}|Unknown}}}}
   #if: {{{firstdev|}}} | ({{version link|{{{firsedev}}}}})
{{infobox row|[[Commands#Restrictions|Restrictions]]|{{
   }}}}
  #if: {{{cheat|}}} | [[Option|Cheat]] only<br> }}{{
  #if: {{{serveronly|}}} | Dedicated server only<br>}}{{
   #if: {{{singleplayer|}}} | [[Singleplayer]] only<br> }}{{
  #if: {{{others|}}} | {{{others}}} }}{{
   #if: {{{serveronly|}}}{{{singleplayer|}}}{{{cheat|}}}{{{others|}}} || None }}
}}
}}
|footer={{
}}<includeonly></includeonly><noinclude>
  #if: {{{upcoming|}}}
{{documentation}}
  | This command has appeared in [[development versions]], but a full update containing these features has not been released yet. [[Category:Upcoming]]
</noinclude>
  }}
}}<noinclude>
This template provides a uniform design for the infobox on the [[commands]] page.
 
{| class="wikitable"
! Parameter
! Function
! Default value
|-
| <code>1</code>
| The commands name
| N/A
|-
| <code>restrict</code>
| Restrictions on who can use the command. Can be <code>OP</code> (operator) or <code>MP</code> (multiplayer and operator)
| ''None''
|-
| <code>cmdblock</code>
| If set, adds the restriction "No [[command block]]s"
| ''None''
|-
| <code>firstver</code>
| First version that it was seen in (e.g. Alpha 1.0.17, classic 0.0.23a).
| ''None''
|-
| <code>firstdev</code>
| First development snapshot it was seen in, requires firstver.
| ''None''
|-
| <code>upcoming</code>
| Sets the command to upcoming, adding the upcoming footer.
| ''None''
|}