Difference between revisions of "Template:Wiki"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix list)
(Add Merge)
Line 1: Line 1:
 
<includeonly>{{#if:{{{1|}}}|{{#switch:{{uc:{{{1|}}}}}
 
<includeonly>{{#if:{{{1|}}}|{{#switch:{{uc:{{{1|}}}}}
|DELETE= {{Messagebox|'''This article has been submitted for''' <big>deletion</big>'''.'''{{#if:{{{2|}}}|<nowiki> </nowiki>'''The reason given was:''' {{{2}}}'''.'''}}|🗙|#F00}}{{TemplateCase||[[Category:Deletion requests]]}}
+
|DELETE= {{Messagebox|'''This article has been submitted for''' <big>deletion</big>'''.'''{{#if:{{{2|}}}|<nowiki> </nowiki>'''The reason given was:''' {{{2}}}}}|🗙|#F00}}{{TemplateCase||[[Category:Deletion requests]]}}
 +
|MERGE= {{Messagebox|
 +
This article has been proposed to merge with {{#if:{{{2|}}}|[[{{{2}}}]]|'''-no article provided-'''}}.
 +
{{#if:{{{3|}}}|<nowiki/> Reason: {{{3}}}}}
 +
|<div style{{=}}"font-size: .75em; line-height: .6em">↘<br>↗</div><!--↣-->
 +
|blueviolet}}
 +
{{TemplateCase||[[Category:Merge Requests]]}}
 
|STUB= <div class="notice metadata" id="stub">''This article is a [[:Category:Stubs|Stub]]. You can help BI Community Wiki by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it]</span>.''</div>{{TemplateCase||[[Category:Stubs]]}}
 
|STUB= <div class="notice metadata" id="stub">''This article is a [[:Category:Stubs|Stub]]. You can help BI Community Wiki by <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it]</span>.''</div>{{TemplateCase||[[Category:Stubs]]}}
 
|WIP= {{Messagebox|This article is a '''[[:Category:WIP|work in progress]]'''!|🏗|dodgerblue}}{{TemplateCase||[[Category:WIP]]}}
 
|WIP= {{Messagebox|This article is a '''[[:Category:WIP|work in progress]]'''!|🏗|dodgerblue}}{{TemplateCase||[[Category:WIP]]}}
Line 6: Line 12:
 
}}
 
}}
 
|-no wiki option defined!-}}
 
|-no wiki option defined!-}}
</includeonly><noinclude>{{Doc/Template
+
</includeonly><noinclude>
|descr= This template serves as a toolbox for wiki editors. It contains most useful templates, and automatically categorises pages.
+
This template serves as a toolbox for wiki editors. It contains most useful templates, and automatically categorises pages.
|param1= type
+
 
|descr1= (case-insensitive) messagebox type, can be:
+
== Usage ==
 +
{{<nowiki/>Wiki|'''''type'''''|'''''arguments'''''}}
 +
* type: (case-insensitive) messagebox type, can be:
 
** delete
 
** delete
 +
*** argument1: deletion request reason
 +
** merge
 +
*** argument1: destination page
 +
*** argument2: merge reason
 
** stub
 
** stub
 
** wip
 
** wip
|param2= argument
+
* argument: (Optional) argument, depends on ''type''
|descr2= (Optional) argument (for <tt>delete</tt> type only for now)
+
 
|example1= <nowiki>{{Wiki}}</nowiki>
+
{| class="wikitable"
|result1= {{Wiki}}
+
|+ Examples
|example2= <nowiki>{{Wiki|Hello there!}}</nowiki>
+
! Code
|result2= {{Wiki|Hello there!}}
+
! Result
|example3= <nowiki>{{Wiki|delete}}</nowiki>
+
|-
|result3= {{Wiki|delete}}
+
| <nowiki>{{Wiki}}</nowiki>
|example4= <nowiki>{{Wiki|stub}}</nowiki>
+
| {{Wiki}}
|result4= {{Wiki|stub}}
+
|-
|example5= <nowiki>{{Wiki|wip}}</nowiki>
+
| <nowiki>{{Wiki|Hello there!}}</nowiki>
|result5= {{Wiki|wip}}
+
| {{Wiki|Hello there!}}
}}</noinclude>
+
|-
 +
| <nowiki>{{Wiki|delete}}</nowiki>
 +
| {{Wiki|delete}}
 +
|-
 +
| <nowiki>{{Wiki|delete|Why not?}}</nowiki>
 +
| {{Wiki|delete|Why not?}}
 +
|-
 +
| <nowiki>{{Wiki|merge}}</nowiki>
 +
| {{Wiki|merge}}
 +
|-
 +
| <nowiki>{{Wiki|merge|Main Page}}</nowiki>
 +
| {{Wiki|merge|Main Page}}
 +
|-
 +
| <nowiki>{{Wiki|merge|Main Page|Why not?}}</nowiki>
 +
| {{Wiki|merge|Main Page|Why not?}}
 +
|-
 +
| <nowiki>{{Wiki|stub}}</nowiki>
 +
| {{Wiki|stub}}
 +
|-
 +
| <nowiki>{{Wiki|wip}}</nowiki>
 +
| {{Wiki|wip}}
 +
|}
 +
 
 +
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>

Revision as of 20:52, 6 February 2021

This template serves as a toolbox for wiki editors. It contains most useful templates, and automatically categorises pages.

Usage

{{Wiki|type|arguments}}

  • type: (case-insensitive) messagebox type, can be:
    • delete
      • argument1: deletion request reason
    • merge
      • argument1: destination page
      • argument2: merge reason
    • stub
    • wip
  • argument: (Optional) argument, depends on type
Examples
Code Result
{{Wiki}} -no wiki option defined!-
{{Wiki|Hello there!}} -wrong wiki option ("Hello there!") defined-
{{Wiki|delete}}
🗙
This article has been submitted for deletion.
{{Wiki|delete|Why not?}}
🗙
This article has been submitted for deletion. The reason given was: Why not?
{{Wiki|merge}}

This article has been proposed to merge with -no article provided-.
{{Wiki|merge|Main Page}}

This article has been proposed to merge with Main Page.
{{Wiki|merge|Main Page|Why not?}}

This article has been proposed to merge with Main Page. Reason: Why not?
{{Wiki|stub}}
{{Wiki|wip}}
🏗
This article is a work in progress!