Difference between revisions of "Cheatsheet"

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add some more stuff)
m (Fix format)
 
Line 151: Line 151:
 
</div>
 
</div>
 
</syntaxhighlight>
 
</syntaxhighlight>
| <div style="columns: 3">
+
| style="vertical-align: top" | <div style="columns: 3">
 
* {{arma3}}
 
* {{arma3}}
 
* {{arma2}}
 
* {{arma2}}
Line 158: Line 158:
 
</div>
 
</div>
 
|}
 
|}
 +
  
 
== Useful templates ==
 
== Useful templates ==

Latest revision as of 19:39, 31 March 2020

Introduction

This page will give a a brief overview over the most commonly used text formatting and templates. For a full list of available templates see Templates.


Basic Markup

Basic Text Formatting

The text editor comes with some basic text formatting tips
Wikitext Parsed output
''italic''
italic
'''bold'''
bold
'''''bold italic'''''
bold italic
<u>underscore</u>
underscore
<s>striked</s>
striked
<span style="color: purple;">Colour</span>
Colour
<spoiler text="Click me!">spoiler</spoiler>
Click me!

Headers Formatting

{{SideTOC}}
== Header Lv2 #1 ==

=== Header Lv3 #1 ===

some text

==== Header Lv4 #1 ====
some text

=== Header Lv3 #2 ===

some text


== Header Lv2 #2 ==
Spacing example

Headers are used to split an article into sub-articles. They are defined with equal signs (=).

The recommendations to keep a readable and clear code and page are:

  • To keep a space between equal signs and the title itself
  • To not "jump" header levels (e.g level 2 containing a level 4, etc)
  • To not use level 1 (= title =) title, unless it is a very huge page (which in this case should maybe be split if possible)
  • To follow these guidelines:
    • Level 2 title: two empty lines before, one after
    • Level 3 title: one empty line before, one after
    • Level 4 and below titles: one empty line before
    • An exception is made for floating items (e.g [[Image]]) that can "touch" the title.
Template {{SideTOC}} places the article menu to the right.

Code Formatting

  • Use syntaxhighlight with option "cpp" to highlight Config (see example below)
  • Use tab alignment in Config - not spaces
  • Keep some space in Config, e.g:
    class exampleClass
    {
    	stringValue="value";			// bad
    	stringValue = "value";			// good
    
    	arrayValue = {0,0.5,0,1};		// bad
    	arrayValue = { 0, 0.5, 0, 1 };	// good
    };
    
    • Before and after =
    • In Array definitions
    • Try to align a batch of comments together (with tabs)
If you have to put an equal sign (=) inside a template ({{ }}), use the equal template: {{=}}.
Type Wikitext Parsed Output
Inline Code
{{Inline code|Inline code}}
Inline code
Code
<code>Code</code>
Code
One-line Code Comment
{{cc|Code comment}}
// Code comment
Code Comment
{{codecomment|Code comment}}
Code comment
Syntaxhighlight
"cpp" = C++ highlight
<syntaxhighlight lang="cpp">
class exampleClass
{
	value1 = 1;
	value2 = "value2";
};
</syntaxhighlight>
class exampleClass
{
	value1 = 1;
	value2 = "value2";
};

Link Formatting

Type Wikitext Parsed Output
Internal Link
[[Main Page]]
Main Page
Internal Link (Custom Name)
[[Main Page|Main Page (Custom Name)]]
Main Page (Custom Name)
Internal Link to a Section
[[Description.ext#header]]
Description.ext#header
Internal Link to a Section (Custom Name)
[[Description.ext#header|Link text]]
Link text
Internal Link to a Category
[[:Category:Scripting Commands Arma 3]]
Category:Scripting Commands Arma 3
Internal Link (cleaned - "end pipe" trick)
[[:Category:Scripting Commands Arma 3|]]
Scripting Commands Arma 3
External Link
https://www.mediawiki.org/wiki/Help:Links/de
https://www.mediawiki.org/wiki/Help:Links/de
External Link (Custom Name)
[https://www.mediawiki.org/wiki/Help:Links/de MediaWiki Links]
MediaWiki Links


Advanced Formatting

Code Result
<div style="columns: 3">
* {{arma3}}
* {{arma2}}
* {{arma}}
* {{ofp}}
</div>
  • Arma 3
  • Arma 2
  • Armed Assault
  • Operation Flashpoint


Useful templates

Template Code Result
Template:errors
{{errors|reason}}
‼️
This article contains at least an error: reason.
If you can fix the page, please remove the {{errors}} tag afterwards.
Template:delete
{{delete|reason}}
🗙
This article has been submitted for deletion. The reason given was: reason.
Template:Feature arma3
{{Feature arma3|text}}
Arma 3 logo black.png
text
Template:Feature arma3contact
{{Feature arma3contact}}
arma3 Contact logo black.png
This content is exclusive to the Arma 3 Contact Expansion.
Template:Feature arma3contact
{{Feature arma3contact|
You gotta come down here with an attitude,
actin' all big and bad.
And what the hell is that smell?}}
arma3 Contact logo black.png
You gotta come down here with an attitude, actin' all big and bad. And what the hell is that smell?
Template:Feature Eden Editor
{{Feature Eden Editor|
Everyone is playing on this Military-themed Mario Maker :D}}
edenEditor logo.png
Everyone is playing on this Military-themed Mario Maker :D
Template:Feature AFM
{{Feature AFM}}
BIS Helicopter DLC Icon v2.png
For this command to have any effect, the Arma 3 Advanced Helicopter Flight Model (AFM) has to be enabled. If AFM is enabled can be checked with difficultyEnabledRTD.
Template:Feature AFM
{{Feature AFM|text}}
BIS Helicopter DLC Icon v2.png
text
Template:Feature dayz
{{Feature dayz|text}}
dayz logo white.png
text
Template:GVI
{{GVI|arma3|version}}
Introduced with Arma 3 Development Branchdev?
Template:Informative
{{Informative|text}}
text
Template:Important
{{Important|important text!}}
important text!
Template:Warning
{{Warning|text}}
text
Template:note
{{note|text}}
📝
text
Template:unbalanced
{{unbalanced}}
This article may be unbalanced towards certain viewpoints.
Template:cn
{{cn}}
[citation needed]
Template:example
{{example|text|title}}
Example title
text
Template:merge
{{merge|article}}
This article has been proposed to merge with article.
Template:wip
{{wip}}
🏗
This article is a work in progress!
Template:AnswerMe
{{AnswerMe|question}}
?
Article contains open question: « question »
Once the question is answered, please remove the {{AnswerMe}} tag.
Template:Stub
{{Stub}}
Template:quote
{{quote|Gastovski, out!|James Gastovski
|https://www.youtube.com/watch?v{{=}}TGKFY1QiIGA}}
«
« Gastovski, out! » – James Gastovski (source)
Template:ServerExec
{{ServerExec}}
Server execution
Template:outdated
{{outdated}}
🗑
The following information is outdated.