Template:Fix: Difference between revisions
Creating sub-template for inline cleanup messages |
m 62 revisions imported from wikipedia:Template:Fix |
||
(63 intermediate revisions by 22 users not shown) | |||
Line 1:
{{#switch:{{{subst|¬}}}
|¬={{category handler
|template=[[Category:Templates needing substitution checking]]
|nocat={{{nocat|<noinclude>true</noinclude>}}}
}}
|SUBST=[[Category:Pages with incorrectly substituted templates]]
}}{{Category handler
|main={{Fix/category
|cat-date={{{cat-date|}}}
|cat={{{cat|}}}
|cat-date2={{{cat-date2|}}}
|cat2={{{cat2|}}}
|cat-date3={{{cat-date3|}}}
|cat3={{{cat3|}}}
|date={{{date|}}}
}}
|template={{#if:{{{name|}}}|{{#ifeq:{{{name}}}|{{ROOTPAGENAME}}||{{#if:{{{date|}}}||[[Category:Templates including undated clean-up tags]]}}}}}}
|subpage=no
}}{{#if:{{{text|}}}
|<sup class="noprint Inline-Template {{{class|}}}" style="white-space:nowrap;">[<i>{{#if:{{{pre-text|}}}
|{{{pre-text}}} 
}}[[{{{link|Wikipedia:Cleanup}}}|<span title="{{#invoke:string|replace|source={{delink|1={{{title|{{{link|Wikipedia:Cleanup}}}}}}{{#if:{{{date|}}}| ({{{date}}})}}}}|pattern=" |replace=" |plain=true}}">{{{text|}}}</span>]]{{#if:{{{post-text|}}}
| {{{post-text}}}
}}</i>]</sup>|{{{special|}}}
}}<noinclude>
{{Documentation}}
<!-- Add cats and interwikis to the /doc subpage, not here! -->
</noinclude>
|
Latest revision as of 17:58, August 8, 2023
This template is used on approximately 901,000 pages, or roughly 16664% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This meta-template can be used to create in-line tags with clean up messages which can be used to tag article issues on a line-by-line basis. Many templates are based upon it, like {{Citation needed}}.
It should not be used directly on articles by itself — instead, use one of the pre-existing derivatives if at all possible. Should there be no suitable derivative already, new ones can be created using the syntax that follows, but please discuss the need for any new template at Wikipedia talk:WikiProject Inline Templates first. Otherwise, the sub-template in question is likely to end up at Wikipedia:Templates for discussion, as it is better for Wikipedia to have a finite and well-tested set of in-line tags than to allow for endless variation.
Usage
{{Fix
| subst = <includeonly>{{subst:substcheck}}</includeonly>
| link = <!-- Page which text should link to, without brackets --> (default = Wikipedia:Cleanup)
| text = <!-- Text to be displayed for the link -->
| pre-text = <!-- Optional text to print before the linked text -->
| post-text = <!-- Optional text to print after the linked text -->
| class = <!-- Class(es) to set text to --> (in addition to the default ones, "noprint" and "Inline-Template")
| title = <!-- Tool-tip text to display when mouse is hovered over link -->
| special = <!-- Optional replacement for text, link, title, pre-text, and post-text - allowing user to define a non-standard format -->
| date = <!-- Optional date parameter to be displayed at end of 'title' and/or in cat-date -->
| cat = [[<!-- Category name to include page in -->]]
| cat-date = <!-- First part of category name to include page in; there is an optional date parameter -->
}}
Categories are ignored if the template is used on a talk page or on any other non-article page.
- The value specified via
|cat=
must be in wikicode, including square brackets.
- The value specified via
|cat-date=
is used as part of a category name. It must be specified without square brackets, but with a "Category:" prefix. The full category name is obtained from the cat-date value, the word "from", and the date value.
- For example, given
|cat-date=Category:Articles with dead external links |date=August 2024
, the article will be placed in Category:Articles with dead external links from August 2024. - The
|date=
parameter is not normally pre-filled by any template using{{Fix}}
or{{Fix-span}}
as a meta-template; rather, it is coded in those derived templates as|date={{{date|}}}
so that an editor provided date is passed through (or null, otherwise).
See also
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
nocat | nocat | no description | Unknown | optional |
cat-date | cat-date | no description | Unknown | optional |
cat | cat | no description | Unknown | optional |
cat-date2 | cat-date2 | no description | Unknown | optional |
cat2 | cat2 | no description | Unknown | optional |
cat-date3 | cat-date3 | no description | Unknown | optional |
cat3 | cat3 | no description | Unknown | optional |
date | date | no description | Unknown | optional |
name | name | no description | Unknown | optional |
Text | text | Text to be displayed for the link | Unknown | optional |
class | class | Additional CSS classes to add to the tag | String | optional |
Pre-text | pre-text | Optional unlinked text to be printed before the linked text | Line | optional |
Link | link | The page that the text should link to
| Page name | optional |
Hover text | title | Text that will be shown when the link is hovered over
| String | optional |
Post-text | post-text | Optional unlinked text to print after the linked text | Line | optional |
special | special | no description | Unknown | optional |