Help:MTA Wiki Specific Templates: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Updated template examples)
(Fixed it.)
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Information about the specific MTA wiki page templates for this wiki. (They do probably not exists on other Mediawiki wiki's)
Information about the specific MTA wiki page templates for this wiki. (They do probably not exists on other Mediawiki wiki's)
{{Tip|If you want to avoid spacing between the page title and the template itself, you should include the template before <nowiki>__NOTOC__</nowiki> other templates and/or [http://www.mediawiki.org/wiki/Help:Magic_words magic words].}}


== Funtion / Event Templates ==
== Funtion / event templates ==
=== Function Deprecated ===
=== Deprecated function/event ===
Functions that are being deleted from MTA because there is a more generic way.
Use this template to indicate functions or events that are being deleted from MTA because there is a more generic way to perform what they do (and they are necessary no longer). The last two arguments of this template aren't mandatory, and can be ignored if there isn't an alternative function or aditional text.


'''Format:''' <nowiki>{{Deprecated}}</nowiki>
'''Format:''' <nowiki>{{Deprecated|alternativeFunction|more text}}</nowiki>
{{MessageBox|
<noinclude>{{Deprecated}}
  bordercolorhex = FF0000 |
{{Deprecated|alternativeFunction|more text}}</noinclude>
  bgcolorhex = FF7777 |
  image = File:Emblem-important.png |
  message = This {{#ifeq: {{padleft:|2|{{lc:{{PAGENAME}}}}}}|on|event|function}} is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be an alternative (usually more generic) way of performing what it once did. |
}}
Wiki pages attached to this template will be added to the [[:Category:Deprecated]]


=== Function Deprecated With Alternative ===
Wiki pages containing this template will be added to the [[:Category:Deprecated]] for reference.
Same as above but now with a linked alternative function.


'''Format:''' <nowiki>{{DeprecatedWithAlt|functionAlternative|More Text}}</nowiki>
=== Function/event needs example ===
Use this template to indicate when a function or event needs a scripting example.


{{MessageBox|
'''Format:''' <nowiki>{{Needs Example}}</nowiki>
  bordercolorhex = FF0000 |
<noinclude>{{Needs Example}}</noinclude>
  bgcolorhex = FF7777 |
Wiki pages containing this template will be added to the [[:Category:Needs Example]] for reference.
  image = File:Emblem-important.png |
  message = This {{#ifeq: {{padleft:|2|{{lc:{{PAGENAME}}}}}}|on|event|function}} is deprecated. This means that its use is discouraged and that it might not exist in future versions. |
  subtext = Please use [[functionAlternative]] instead. More text |
}}
Wiki pages attached to this template will be added to the [[:Category:Deprecated]]


=== Function Needs Example ===
=== Disabled function/event ===
Use this template when a function or event needs an example.
Use this template to indicate when a function or event has been disabled in the MTA: SA source code. Normally there's an important reason for this. The last two parameters aren't mandatory and can be ignored.


'''Format:''' <nowiki>{{Needs Example}}</nowiki>
'''Format:''' <nowiki>{{Disabled|reason|bugTrackerIssueNumber}}</nowiki>
<noinclude>{{Disabled}}
{{Disabled|reason|bugTrackerIssueNumber}}</noinclude>


{{MessageBox|
Wiki pages containing this template will be added to the [[:Category:Needs Checking]] and [[:Category:Disabled Functions and Events]] for reference.
  bordercolorhex = 000000 |
  bordertype = dotted |
  bgcolorhex = EFEFEF |
  image = File:Accessories-text-editor.png |
  title = Script Example Missing |
  message = {{#ifeq: {{padleft:|2|{{lc:{{PAGENAME}}}}}}|on|Event|Function}} <includeonly>{{FULLPAGENAME}}</includeonly> <noinclude><nowiki>{{FULLPAGENAME}}</nowiki></noinclude> needs a script example, help out by writing one. |
  subtext = <span style="font-size: 85%;">''Before submitting check out [[MTA_Wiki:Editing_Guidelines#Script_Examples|Editing Guidelines Script Examples]].''</span> |
}}
Wiki pages attached to this template will also be added to the [[:Category:Needs Example]]


=== Disabled Function/Event ===
=== Function/event requirements ===
Use this template when a function or event has been disabled in the code.
Use this template to inform the reader that this function or event requires a minimum MTA build to work.


'''Format without parameters:''' <nowiki>{{Disabled}}</nowiki>
'''Format:''' <nowiki>{{Requirements|minServerBuild|minClientBuild}}</nowiki>
{{MessageBox|
<noinclude>{{Requirements|minServerBuild|minClientBuild}}</noinclude>
  bordercolorhex = FF0000 |
  bgcolorhex = E5E5E5 |
  image = File:Dialog-warning.png |
  title = {{#ifeq: {{padleft:|2|{{lc:{{PAGENAME}}}}}}|on|Event|Function}} has been disabled. |
}}
'''Format with parameters:''' <nowiki>{{Disabled|Function disabled because it crashes|1337}}</nowiki>
{{MessageBox|
  bordercolorhex = FF0000 |
  bgcolorhex = E5E5E5 |
  image = File:Dialog-warning.png |
  title = {{#ifeq: {{padleft:|2|{{lc:{{PAGENAME}}}}}}|on|Event|Function}} has been disabled. |
  subtext = '''Reason/Note:''' Function disabled because it crashes | - '''Bugtracker Issue:''' [http://bugs.mtasa.com/view.php?id=1337 #1337] |
}}
Wiki pages attached to this template will be added to the [[:Category:Needs Checking]] and [[:Category:Disabled Functions and Events]].


=== Function/Event Requirements ===
=== Module only function/event ===
Inform the reader that this function or event requires a specific MTA build.
Use this template to indicate a module only function/event template. That will inform readers that this function is module specific and not build-in to MTA itself.
Note: You only have to add the module name not the 'Modules/' prefix.


'''Format:''' <nowiki>{{Requirements|1.1.1-9.serverbuild|1.1.1-9.clientbuild}}</nowiki>
'''Format:''' <nowiki>{{ModuleFunction|Module Name}}</nowiki>
<noinclude>{{ModuleFunction|ModuleName}}</noinclude>


{| cellpadding="4" style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #FFF"
=== New function/event/change ===
|-
Use this template to indicate a function, event or change that will be applied in a future version of MTA. This template is best used when it contains the function/event/change description, because it removes itself when MTA gets updated (MTA version is greater than the ''targetVersion'' specified in this template parameters). All arguments of this template are mandatory.
!style="background-color: #FFAA44; border-style: solid; border-width: 1px; border-color: #FFF; color:#7A4A20"| Minimum supported server
Notes: ''targetVersion'' parameter must be a number in the format 3.0XXX, where XXX is the version when the function/event/change will be applied. For example, if a function will be added in MTA version ''2.0.1'', put 3.0''201'' in ''targetVersion''. ''showVersion'' parameter is only visual and specifies the text contained in "From version ... onwards".
!width=60 style="background-color: #FFCC66; border-style: solid; border-width: 1px; border-color: #FFF"| 1.1.1-9.serverbuild
|-
!style="background-color: #FF6666; border-style: solid; border-width: 1px; border-color: #FFF; color:#AA0028"| Minimum supported client
!style="background-color: #FFBBBB; border-style: solid; border-width: 1px; border-color: #FFF"| 1.1.1-9.clientbuild
|}Note: Using this function requires the resource to have the above minimum version declared in the [[Meta.xml|meta.xml]] '''<min_mta_version>''' section.


=== Module Only Function ===
'''Format:''' <nowiki>{{New feature/item|targetVersion|showVersion|Revision}}</nowiki>
Module only function template, inform readers that this function is module specific and not build-in to MTA itself.
<noinclude>{{New feature/item|3.0312|2.9|19999|
Note: You only have to add the module name not the 'Modules/' prefix.
This template has ''3.0157'' and ''2.9'' and ''19999'' as parameters, so it'll be removed and only this text will be shown when MTA version is 3.1.2 or higher.
}}</noinclude>


'''Format:''' <nowiki>{{ModuleFunction|Module Name}}</nowiki>


<div style="border:2px solid red;padding:3px;">This function is provided by the external module '''[[Modules/Module Name|Module Name]]'''. You must install this module to use this function.</div>
If you want to display a change from a previous version in the format of "Before version x.x", use the following code:


'''Format:''' <nowiki>{{Deprecated feature|untilVersion|showVersion}}</nowiki>
<noinclude>{{Deprecated feature|3.0300|3.0|
This template has ''3.0300'' and ''3.0'' versions as parameters, so this box will only be displayed until MTA's version is 3.0 or higher.  After that, it'll disappear completely.
}}</noinclude>


== Article/Page/Category Maintenance ==
== Article/Page/Category Maintenance ==
Line 95: Line 66:
   bordercolorhex = 0026FF |
   bordercolorhex = 0026FF |
   bordertype = dotted |
   bordertype = dotted |
   bgcolorhex = AAAAFF |
   bgcolorhex = CCCCFF |
   image = File:Dialog-information.png |
   image = File:Dialog-information.png |
   title = This article needs checking. |
   title = This article needs checking. |
Line 125: Line 96:
}}
}}
Wiki pages attached to this template will be added to the [[:Category:Outdated Pages]]
Wiki pages attached to this template will be added to the [[:Category:Outdated Pages]]
=== Article translation Outdated ===
If the article translation is outdated use this template.
'''Format without subtext:''' <nowiki>{{Outdatedtr}}</nowiki>
{{MessageBox|
  bordercolorhex = C0C0C0 |
  bgcolorhex = C9F9FF |
  bordertype = dotted |
  image = File:Preferences-desktop-locale.png |
  title = This translated article is (partially) outdated and the information may no longer apply. |
}}
'''Format with subtext:''' <nowiki>{{Outdatedtr|The subtext here}}</nowiki>
{{MessageBox|
  bordercolorhex = C0C0C0 |
  bgcolorhex = C9F9FF |
  bordertype = dotted |
  image = File:Preferences-desktop-locale.png |
  title = This translated article is (partially) outdated and the information may no longer apply. |
  subtext = The subtext here |
}}
Wiki pages attached to this template will be added to the Category:Outdated Pages


== General Templates ==
== General Templates ==
=== Warning ===
=== Warning ===
Warning template for in-line warnings.


'''Format:''' <nowiki>{{Warning|Warning info here}}</nowiki>
'''Format:''' <nowiki>{{Warning|Warning info here}}</nowiki>
{{MessageBox|
{{MessageBox|
   bordercolorhex = FF0000 |
   bordercolorhex = FFB2B2 |
   bgcolorhex = FFADAD |
   bgcolorhex = FFE5E5 |
  title = Warning: |
  message = Warning info here
}}
Warning template for article warnings.
 
'''Format:''' <nowiki>{{Warning|Warning info here|true}}</nowiki>
{{MessageBox|
  bordercolorhex = FFB2B2 |
  bgcolorhex = FFE5E5 |
   image = File:Dialog-warning.png |
   image = File:Dialog-warning.png |
   title = Warning: |
   title = Warning: |
   message = Warning info here
   message = Warning info here
}}
}}
=== Note ===
=== Note ===
<div style="border: 1px solid black; background: #FFFF7F; float: right; width: 200px; padding: 5px; margin: 5px; margin-right: 0px;">'''Note:''' Note info here</div>
<div style="border: 1px solid black; background: #FFFF99; float: right; width: 200px; padding: 5px; margin: 5px; margin-right: 0px;">'''Note:''' Note info here</div>
Note box is used for notes. The note box floats always right in the page/article.
 
The note box floats always right in the page/article.


'''Format:''' <nowiki>{{Note box|Note info here}}</nowiki>
'''Format:''' <nowiki>{{Note box|Note info here}}</nowiki>
Template for in-line note:
'''Format:''' <nowiki>{{Note|Note info here}}</nowiki>
{{MessageBox|
  bordercolorhex = BFBFFF |
  bgcolorhex = E0E0FF |
  message = '''Note:''' Note info here |
}}
Alternative in-line note:
'''Format:''' <nowiki>{{Important Note|Note info here}}</nowiki>
{{MessageBox|
  bordercolorhex = FFB2B2 |
  bgcolorhex = FFE5E5 |
  message = '''Important Note:''' Note info here |
}}
=== Tip ===
'''Format:''' <nowiki>{{Tip|Text here}}</nowiki>
{{MessageBox|
  bordercolorhex = 81C687 |
  bgcolorhex = E2FFE5 |
  message = '''Tip:''' Text here |
}}
== Localization ==
=== Localized article ===
Adds a link to a localized article in this wiki, with a flag which represents the language the article is written in.
'''Format:''' <nowiki>{{Localized article|Main Page|Wiki's main page|us|en}}</nowiki>
{{Localized article|Main Page|Wiki's main page|us|en}}
For more information about the use of the template, please refer to [[Template:Localized article|its page]].


== Special ==
== Special ==
Line 147: Line 190:
Mark a page for deletion, so administrators can decide if they remove the page.
Mark a page for deletion, so administrators can decide if they remove the page.


'''Format:''' <nowiki>{{Delete||Reason here}}</nowiki>
'''Format:''' <nowiki>{{Delete|Reason here}}</nowiki>


<div style="border:1px solid red;background:#FFADAD;padding:5px; margin-bottom:5px;">[[File:Edit-delete.png]] '''This page is marked for deletion.''' Reason: Reason here
{{MessageBox|
<hr style="background: red;"><span style="font-size: 85%; margin-left: 2px;">Actions: <span class="plainlinks">[[#Delete |'''Delete''']] (Administrators)</span> - [[#Delete |Discuss]] - [[#Delete |What links here]] - [[:Category:MTA Wiki:Delete|Category]]</span></div>
  bordercolorhex = FF0000 |
  bgcolorhex = FFADAD |
  image = File:Edit-delete.png |
  title = This page is marked for deletion. |
  subtext = '''Reason:''' Reason Here <div><span style="font-size: 85%; margin-left: 2px;">'''Actions:''' <span class="plainlinks">[[#Delete |'''Delete''']] (Administrators)</span> - [[{{TALKPAGENAME}}|Discuss]] - [[Special:Whatlinkshere/{{FULLPAGENAME}}|What links here]] - [[:Category:MTA Wiki:Delete|Category]]</span></div> |
}}


Wiki pages attached to this template will be added to the [[:Category:MTA Wiki:Delete]]
Wiki pages attached to this template will be added to the [[:Category:MTA Wiki:Delete]]


[[Category:MTA Wiki:Editing]]
[[Category:MTA Wiki:Editing]]
__HIDDENCAT__

Latest revision as of 22:10, 5 November 2018

Information about the specific MTA wiki page templates for this wiki. (They do probably not exists on other Mediawiki wiki's)

[[{{{image}}}|link=|]] Tip: If you want to avoid spacing between the page title and the template itself, you should include the template before __NOTOC__ other templates and/or magic words.

Funtion / event templates

Deprecated function/event

Use this template to indicate functions or events that are being deleted from MTA because there is a more generic way to perform what they do (and they are necessary no longer). The last two arguments of this template aren't mandatory, and can be ignored if there isn't an alternative function or aditional text.

Format: {{Deprecated|alternativeFunction|more text}}

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.


Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use alternativeFunction instead. more text


Wiki pages containing this template will be added to the Category:Deprecated for reference.

Function/event needs example

Use this template to indicate when a function or event needs a scripting example.

Format: {{Needs Example}}

Accessories-text-editor.png Script Example Missing Function Help:MTA Wiki Specific Templates needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


Wiki pages containing this template will be added to the Category:Needs Example for reference.

Disabled function/event

Use this template to indicate when a function or event has been disabled in the MTA: SA source code. Normally there's an important reason for this. The last two parameters aren't mandatory and can be ignored.

Format: {{Disabled|reason|bugTrackerIssueNumber}}

Dialog-warning.png Function has been disabled.


Dialog-warning.png Function has been disabled.

Reason/Note: reason - Bugtracker Issue: #bugTrackerIssueNumber


Wiki pages containing this template will be added to the Category:Needs Checking and Category:Disabled Functions and Events for reference.

Function/event requirements

Use this template to inform the reader that this function or event requires a minimum MTA build to work.

Format: {{Requirements|minServerBuild|minClientBuild}}

Minimum server version minServerBuild
Minimum client version minClientBuild

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="minServerBuild" client="minClientBuild" />

Module only function/event

Use this template to indicate a module only function/event template. That will inform readers that this function is module specific and not build-in to MTA itself. Note: You only have to add the module name not the 'Modules/' prefix.

Format: {{ModuleFunction|Module Name}}

Package-x-generic.png This function is provided by the external module ModuleName. You must install this module to use this function.


New function/event/change

Use this template to indicate a function, event or change that will be applied in a future version of MTA. This template is best used when it contains the function/event/change description, because it removes itself when MTA gets updated (MTA version is greater than the targetVersion specified in this template parameters). All arguments of this template are mandatory. Notes: targetVersion parameter must be a number in the format 3.0XXX, where XXX is the version when the function/event/change will be applied. For example, if a function will be added in MTA version 2.0.1, put 3.0201 in targetVersion. showVersion parameter is only visual and specifies the text contained in "From version ... onwards".

Format: {{New feature/item|targetVersion|showVersion|Revision}}

ADDED/UPDATED IN VERSION 2.9 r19999:

This template has 3.0157 and 2.9 and 19999 as parameters, so it'll be removed and only this text will be shown when MTA version is 3.1.2 or higher.


If you want to display a change from a previous version in the format of "Before version x.x", use the following code:

Format: {{Deprecated feature|untilVersion|showVersion}}

BEFORE VERSION 3.0

This template has 3.0300 and 3.0 versions as parameters, so this box will only be displayed until MTA's version is 3.0 or higher. After that, it'll disappear completely.

Article/Page/Category Maintenance

Article Needs Checking

These are functions that need to be checked to ensure they do work as specified. If there are any problems with a function, example or the wiki page itself, attach a note to the top of the page and describe the problems.

Format: {{Needs Checking|STATE_PROBLEM_HERE}}

Dialog-information.png This article needs checking.

Reason: STATE_PROBLEM_HERE

Wiki pages attached to this template will be added to the Category:Needs_Checking

Article Outdated

If the information in the article no longer applies and/or an alternative article exists you can use this template and link to the alternative article. If it is still useful and/or (partially) valid and needs to be updated or no alternative article exists use the 'Article Needs Checking' template.

Format without reason: {{Outdated}}

Dialog-information.png This article is (partially) outdated and the information may no longer apply.

Format with reason: {{Outdated|The Reason HERE}}

Dialog-information.png This article is (partially) outdated and the information may no longer apply.

Reason: The Reason HERE

Wiki pages attached to this template will be added to the Category:Outdated Pages

Article translation Outdated

If the article translation is outdated use this template.

Format without subtext: {{Outdatedtr}}

Preferences-desktop-locale.png This translated article is (partially) outdated and the information may no longer apply.

Format with subtext: {{Outdatedtr|The subtext here}}

Preferences-desktop-locale.png This translated article is (partially) outdated and the information may no longer apply.

The subtext here

Wiki pages attached to this template will be added to the Category:Outdated Pages

General Templates

Warning

Warning template for in-line warnings.

Format: {{Warning|Warning info here}}

[[{{{image}}}|link=|]] Warning: Warning info here

Warning template for article warnings.

Format: {{Warning|Warning info here|true}}

Dialog-warning.png Warning: Warning info here

Note

Note: Note info here

The note box floats always right in the page/article.

Format: {{Note box|Note info here}}

Template for in-line note:

Format: {{Note|Note info here}}

[[{{{image}}}|link=|]] Note: Note info here

Alternative in-line note:

Format: {{Important Note|Note info here}}

[[{{{image}}}|link=|]] Important Note: Note info here

Tip

Format: {{Tip|Text here}}


[[{{{image}}}|link=|]] Tip: Text here

Localization

Localized article

Adds a link to a localized article in this wiki, with a flag which represents the language the article is written in.

Format: {{Localized article|Main Page|Wiki's main page|us|en}}

Wiki's main page In English For more information about the use of the template, please refer to its page.

Special

Delete

Mark a page for deletion, so administrators can decide if they remove the page.

Format: {{Delete|Reason here}}


Edit-delete.png This page is marked for deletion.

Reason: Reason Here
Actions: Delete (Administrators) - Discuss - What links here - Category

Wiki pages attached to this template will be added to the Category:MTA Wiki:Delete