Wikipedia:WikiProject user warnings/Help:Everything
From Wikipedia, the free encyclopedia
Please note that some of the guidelines in these page have not yet been discussed, and may change in the future. These pages exist to provide both basic and advanced documentation to various aspects of templates, from guidelines to usage. Due to the complexity of some topics, the documentation is split among several pages.
- Everything includes all documentation.
- Introduction is a basic introduction to user warnings, relevant policies, et cetera.
- Glossary of terms used by the WikiProject and this documentation.
- Template usage outlines general usage guidelines.
- Template coding describes technical template design guidelines.
Contents |
[edit] Introduction
This page is is meant as an introduction to user warnings. If you would like more information on any particular subject, see the appropriate inline wikilinks. For a basic introduction to Wikipedia, see Wikipedia:Introduction.
[edit] About warnings
Any edit deliberately intended to damage Wikipedia's content, attack a person, or oppose the community is termed vandalism. Particularly, edits which go against Wikipedia's policies and guidelines are generally considered vandalism.
If you spot someone vandalising Wikipedia, you should revert their changes to a previous version. You can leave a message on their talk page to notify them that they've violated a policy or guideline, and that you've reverted their changes. There are various user warning templates available to simplify this by outputting automatic, standardised messages directly onto the talk page.
[edit] Using warnings
To use a user warning template, choose a standardised template from the main page of the WikiProject on User Warnings or a legacy template from Category:User warning templates. On the talk page you'd like to place the message on, type {{subst:name}}, where name is the name of the template. For example, if you want to use Template:test1, you can type {{subst:test1}}.
The "subst" causes the text of the template to be substituted into the page when you save it, rather than having the page link to the template every time it is viewed. The reason for doing this is that accessing the template each time the page is viewed leaves hundreds of pages (ironically) open to vandalism, since any edit to the template will then show up on every page the tag is placed on. Substituting the template text also reduces server load. For these reasons, user warning templates should always be substituted for text.
Every template has a family of about four levels, from a polite pointer to the sandbox to a stern demand that the user cease and desist or face the consequences. It's not necessary to start at the first level; rather, you should choose one based on how vicious the vandalism is. For example, {{test1}} is appropriate for someone who adds "Hi Joe!" to a page, whereas a rapid multiple-revert vandal should only be given one warning ({{test4}}).
[edit] After using warnings
If the user doesn't stop vandalising after being warned a few times, you can report them to administrators for intervention. To do so, you can add their name to Wikipedia:Administrator intervention against vandalism. Note that this usually gets the attention of an admin within minutes, often within seconds.
[edit] See also
- Category:User warning templates (Category of legacy templates)
- Template:TestTemplates (A table of legacy template families)
- Main list of user_talk templates
- Wikipedia:Dealing with vandalism
[edit] Glossary
The glossary is a list of terms used by the WikiProject or the documentation to allow more concise explanation. These terms are either common outside the WikiProject or have been carefully chosen to be logical and easy to remember.
- Bad faith: Denotes anything that is intentionally harmful or malicious. A bad faith edit, for example, may be deliberately destructive or misleading. [contrast Good faith]
- Custom template: Any template created by a user for personal use, optionally shared. [compare Legacy template, Standard template]
- Derivative: A template intended to mirror another with slight changes. For example, l-template test-n adds the ability to name the article vandalised, which l-template Test lacks.
- Expert syntax: Template usage (or the coding that allows it) that requires exact awareness of the template. For example, the parameter "reason" in
{{template|reason=}}
consists of expert syntax because the user must be aware of the parameter name. - Extra parameter: A parameter that is not needed for most use of the template, although they may or may not be helpful for some uses (such as providing an optional signature space).
- Family: A set of all templates sharing the same intent and purpose. These generally share a base name, such as "test" or "blanking". [compare Series]
- Good faith: Denotes anything that is meant to be constructive. [contrast Bad faith]
- L-template: Shortened form Legacy template.
- Legacy template: Any of a set of semi-standardised templates existing before and alongside the WikiProject templates. As of the last count, there were 120 such templates categorised by the WikiProject. [compare Custom template, Standard template]
- Parameter: A tag in template syntax that allows the user to input a value.
- Series: Includes all severity levels of a particular family, but excludes all derivatives. For example, "test0" to "test5" are in the same series, but "test-n" is not. [compare Family]
- Standard template: Any of the set of templates conforming to the guidelines outlined by this documentation. [compare Legacy template, Custom template]
- Syntax: Any system of symbols or rules parsed to do something in particular. This can be used general or specifically; for example, expert syntax to refer to a particular set of syntaxes versus list syntax, referring to the portion of template syntax that outputs HTML lists.
- Template: A block of code or text, possibly accepting inputted values, that can be output onto a page using a template tag. For example, if template "elite" contains "1337 V53R", using the tag
{{elite}}
on a page will output "1337 V53R" on the page.
[edit] Template usage
[edit] In general
All standard templates take several parameters that are entirely optional. That is, you can completely ignore them (For example, use "block
" instead of "block|~~~~|1 hour|vandalism
") and the template will automagically insert generic text. Further, all parameters are designed to be very flexible; you can typically write anything in them, from diff links to in-depth messages to HTML.
See the WikiProject on user warning layout standardisation for general layout and usage guidelines on user talk pages.
[edit] User warning templates
Usage depends largely on the particular series. See documentation on template talk pages or summary instructions in the list of templates (main page).
[edit] Block templates
Block templates differ from user warning templates in two fundamental ways. First, they're enclosed inside a message box, which means that that placing your signature outside the template will place it visually seperate from the message. This is resolved by typing out your signature (typically ~~~~) as the first parameter.
The second difference is the order of the parameters: whereas user warning templates are in order of use, block templates are not. This is because some of the parameters are less optional than in user warning templates, and they happen to be at the end.
- The signature should always be used; although there's an auto-signature as default value, it converts the username link to plaintext (ie, [[User:Pathoschild|Pathoschild]]).
- The time parameter is almost always used, as it signifies when the block expires.
- The reason parameter is rarely used, and by default blames the block on vandalism.
As such, although the order of parameters in the templates are time-reason-signature, the template parameters are input as signature-time-reason. This way, you can ignore the more optional parameters by using "block|~~~~
" instead of "block|||~~~~
".
[edit] General design guidelines
- Severity levels
- Every series has a family of four templates of increasing severity, designating a tone ranging from kindly to stern. Note that these don't necessarily designate a chronological order; a user may simply use a level of his choice based on the severity desired. For example, the test family is test0, test1, test2, test3.
- 0. Assumes good faith; welcome with polite pointer to sandbox and/or to relevant help and policy pages.
- No faith assumption; pointer to sandbox with polite request to stop and mention of consequences.
- Assumes bad faith; stern cease and desist.
- Assumes bad faith; strong cease and desist, last warning.
- Every series has a family of four templates of increasing severity, designating a tone ranging from kindly to stern. Note that these don't necessarily designate a chronological order; a user may simply use a level of his choice based on the severity desired. For example, the test family is test0, test1, test2, test3.
- Civility
- Regardless of the severity level of the template, the user warning should be a model of civility (even for the most destructive vandal). Remember than when you use a warning template, you do so in Wikipedia's name. See Please do not bite the newcomers, Civility, and Etiquette.
- Derivatives
- No template should ever have derivatives.
[edit] Template coding guidelines
[edit] Specific cases
[edit] User warning and block templates
- Categorisation: user warning templates should be categorised to Category:User warning templates (if the template is a redirect page to another template, it should be categorised using the sort key "Redirect"). User block templates should be categorised to Category:User block templates, with the sort key "Temporary" or "Indefinite" as appropriate. The category tag should be on the template page within noinclude syntax.
- Block template CSS style: Wikipedia allows registered users to maintain a personal stylesheet located at user:username/skin.css, where 'username' is the username and 'skin' is the name of the skin in use (usually monobook). To help users take full advantage of this feature, block templates should be enclosed in a CSS container with the "user-block" class.
<div class="user-block">template message</div>
Should the user wish to, he can customise the appearance of all block templates by adding CSS to his user stylesheet. For example, the following code adds a dark red background with white text.
* .user-block { background:#C00; color:#FFF; }
- Compatibility with lists
-
All user warning and block templates should be natively compatible with lists. For optimal intervention efficiency, talk pages with numerous warnings are sometimes organised into formatted lists sectioned by date (see the WikiProject on user warning layout standardisation. Due to the way Wikipedia parses wikisyntax into HTML, list items are closed at any newline. Thus many templates will break any list they are placed in: the first paragraph will be in the list, the others out, and any subsequent templates in the list will begin a new list. By using HTML paragraph syntax directly, Wikipedia's paragraph parsing is circumvented and multiple-paragraph templates can then be added to organised warning lists without problem.
<p>Paragraph 1.</p><p>Paragraph 2.</p><p>Paragraph 3.</p>To prevent the problem with newlines, templates must be on a single codeline; however, this is highly illegible to humans in edit view. To restore legibility, HTML comments can be inserted to emulate the appearance of newlines. Although this looks ungainly with two-term lines, the comments are much less bulky when used with more realistic paragraphs.
<p>Paragraph 1.</p><!--
--><p>Paragraph 2.</p><!--
--><p>Paragraph 3.</p>
-
[edit] Optional decategorisation
- Optional decategorisation
- Any template that places pages it's used on into a category should surround the category tags with the category parameter. If the template uses
}}
- Any template that places pages it's used on into a category should surround the category tags with the category parameter. If the template uses
[edit] Parameters
- Default values
-
Nearly all parameters should have a default value, such that misuse does not break the template; exceptions can be made for extra parameters. You can set the default value of a parameter by using piped syntax (
{{{1|default value}}}
). For example, the template below takes a parameter which expects the user to supply the proper pronoun (she, he, it, they, et cetera).{{{1|They}}} are cool.Supplied the pronoun with{{template|He}}
, the template will expand to "He are cool" (grammar aside). Ignoring the parameter with{{template}}
, the template will default the value and expand to "They are cool".
-
- Expert syntax
-
Where use could conceivably include symbols that break templates (notably the pipe (|) and equals sign (=)), an expert syntax should allow these. In such cases, an expert syntax and simple syntax can coexist as needed. For example, let us say we want to make a wikilink template.
[[{{{1}}}]]Using
{{template|article}}
is straightforward enough, and will expand to[[article]]
. A problem arises if the user tries to use certain symbols; for example, using{{template|article|name}}
will not output[[article|name]]
, because the pipe symbol is part of the parameter syntax. In cases where a user might conceivably want to use the template like this, the template can be modified to use expert syntax instead.[[{{{link}}}]]The template now uses a named parameter to get the user's input. Using
{{template|link=article|name}}
will now output[[article|name]]
, as long as the named parameter is specified after any unnamed parameter. However, it's not at all a one-or-the-other proposition; it's possible to allow both named and unnamed parameters at once. Using the same example, the below template will accept the simple syntax on all parameters except those for which the expert syntax is used.[[{{{link|{{{1}}}}}}]]Although this may look complex, it's relatively simple. The named parameter uses the unnamed parameter as the default value, such that if the expert syntax isn't used the simple syntax is. The unnamed parameter can be given a default value of it's own, which will be used if neither syntaxes are used.
[[{{{link|{{{1|Main_page}}}}}}]]The above template used as
{{template}}
,{{template|article}}
, and{{template|link=article|name}}
will respectively output as[[Main_page]]
,[[article]]
, and[[article|name]]
.
-
[edit] Optional nested substitution
Any template containing templates, magic variables, or ParserFunctions should include an optional "subst" parameter at the appropriate location for a subst: modifier. This allows users to easily substitute a template and all nested templates. For example, consider the following template code:
>!-- -->
Attempting to substitute the template using {{subst:template}}
will output "This template is called {{template}}", leaving the nested template unsubstituted. However, this can be resolved by adding the substitution modifer to all nested dynamic content using the subst parameter ({{subst:template|subst=subst:}}
), which will output "This template is called template".