Difference between revisions of "Template:Db-notice/doc"

From blackwiki
Jump to navigation Jump to search
imported>KDS4444
(beginning templatedata section)
imported>KDS4444
(→‎Parameters: replacing previous table with templatedata table, copying over most of the removed text)
Line 43: Line 43:
  
 
The template should usually be used with [[WP:SAFESUBST|safesubst]], so that the template can be both [[WP:TRANSCLUDE|transcluded]] and [[WP:SUBST|substituted]]. In most cases templates made with this meta-template will be substituted on user talk pages, but sometimes transclusion is necessary, for example when creating template documentation.
 
The template should usually be used with [[WP:SAFESUBST|safesubst]], so that the template can be both [[WP:TRANSCLUDE|transcluded]] and [[WP:SUBST|substituted]]. In most cases templates made with this meta-template will be substituted on user talk pages, but sometimes transclusion is necessary, for example when creating template documentation.
−
 
−
== Parameters ==
 
−
 
−
{| class="wikitable"
 
−
|-
 
−
! Parameter name !! Example values !! Description
 
−
|-
 
−
| <code>namespace</code> || <code><nowiki>{{{namespace|}}}</nowiki></code> || This is the [[WP:NAMESPACE|namespace]] of the page tagged for deletion. This should be passed through from the daughter template.
 
−
|-
 
−
| <code>target</code> || <code><nowiki>{{{1}}}</nowiki></code> || This is the name of the page which was tagged for deletion. It should always be set as the first positional parameter.
 
−
|-
 
−
| <code>nowelcome</code> || <code><nowiki>{{{nowelcome|}}}</nowiki></code>, <code>yes</code> || This template automatically welcomes users with {{tl|first article}} if their user talk page was previously a red link (i.e. the deletion template is the first edit to the page). If this parameter is set to "yes", then this welcome is omitted. This should usually be passed through from the daughter template, unless a welcome is never desired (for example for [[WP:G10|G10]], "attack pages").
 
−
|-
 
−
| <code>header</code> || <code><nowiki>{{{header|}}}</nowiki></code> || If this is set to "no", no section heading is generated before the deletion notification. This should be passed through from the daughter template to give end users control over whether they want to include a heading or not.
 
−
|-
 
−
| <code>header-text</code> || <code><nowiki>{{{header-text|}}}</nowiki></code> || This allows users to specify custom text for the section heading before the deletion notice. This should usually be passed through from the daughter template.
 
−
|-
 
−
| <code>nothanks</code> || <code>yes</code> || If the page the notification template is used on was previously a red link, and this parameter contains any text, then the text "thank you for your contributions" is omitted from the welcome message. This is used when the contributions are assumed not to be useful, such as in templates for vandalism or attack pages.
 
−
|-
 
−
| <code>icon</code> || <code>File:Information icon4.svg</code> || The filename of the image used in the top-left-hand corner of the notice.
 
−
|-
 
−
| <code>wizard</code> || <code>yes</code> || Shows a message box with advice about creating new articles.
 
−
|-
 
−
| <code>text</code> || || The main text of the notice. This does not include the last paragraph, which is included automatically in every notice. Some aspects of the last paragraph can be changed with other parameters, however.
 
−
|-
 
−
| <code>if you think that</code> || || If this parameter exists, it will replace the text "the page was nominated in error" with the text it contains.
 
−
|-
 
−
| <code>button</code> || <code>no</code> || Setting this to "no" removes the text about clicking on the button labelled "Click here to contest this speedy deletion" in the speedy deletion tag. Useful if the related speedy deletion template doesn't have such a button.
 
−
|-
 
−
| <code>willprovide</code>  || <code>no</code> || By default, the template will include the sentence, "If the page is deleted, and you wish to retrieve the deleted material for future reference or improvement, you can place a request [[WP:RFUD|here]]." If willprovide is equal to "no" then this sentence will be omitted. [[Template:Db-copyvio-notice]], for instance, is set up to not include this sentence.
 
−
|-
 
−
| <code>additionally</code> || || This text will be appended to the very end of the notice.
 
−
|-
 
−
| <code>rfudlink</code> || <code>no</code> || If this parameter exists, the text prompting the user to go to [[WP:RFUD]] won't display. Useful as an alternative to <code>willprovide</code> if one can contact the deleting administrator to retrieve the article, but can't place a request on that page. [[Template:Db-notability-notice]], for example, is set up to omit this part of the sentence.
 
−
|}
 
  
 
<templatedata>
 
<templatedata>
Line 83: Line 48:
 
"description": "This template is a meta-template used to create speedy deletion notifications. It is typically transcluded into another template.
 
"description": "This template is a meta-template used to create speedy deletion notifications. It is typically transcluded into another template.
  
−
All of the speedy deletion notification templates that use Twinkle are based on this template.  Twinkle will automatically add this message to a user's talk page whenever a page that user has created is nominated for Speedy Deletion. As such, users are unlikely to ever have cause to manually add this template to any page.",
+
All of the speedy deletion notification templates that use the Wikipedia tool known as Twinkle are based on this template.  Twinkle will automatically add this message to a user's talk page whenever a page that user has created is nominated for Speedy Deletion. As such, users are unlikely to ever have cause to manually add this template to any page.  The information below is intended for users who are creating their own deletion templates and as reference for those interested in modifying existing templates.",
 
"params": {
 
"params": {
 
"first parameter": {
 
"first parameter": {
Line 100: Line 65:
 
"label": "target",
 
"label": "target",
 
"description": "This is the name of the page targeted for deletion, given without brackets of any kind",
 
"description": "This is the name of the page targeted for deletion, given without brackets of any kind",
−
"required": false,
+
"required": true,
 
"suggested": false,
 
"suggested": false,
 
                         "example": "Ham sandwich with mustard and mayo",
 
                         "example": "Ham sandwich with mustard and mayo",
Line 115: Line 80:
 
"suggested": false,
 
"suggested": false,
 
                         "example": "yes",
 
                         "example": "yes",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "[blank]",
 +
"type": "string"
 +
},
 +
"fourth parameter": {
 +
"label": "header",
 +
"description": "If this is set to 'no', no section heading is generated before the deletion notification. This should be passed through from the daughter template to give deletion template creators control over whether they want to include a section heading or not.  If left blank, a new section heading is generated.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "no",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "[blank]",
 +
"type": "string"
 +
},
 +
"fifth parameter": {
 +
"label": "header-text",
 +
"description": "This allows users to specify custom text for the section heading before the deletion notice. This should usually be passed through from the daughter template.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "",
 +
"default": "",
 +
"type": "string"
 +
},
 +
"sixth parameter": {
 +
"label": "nothanks",
 +
"description": "If the page the notification template is used on was previously a red link, and this parameter contains any text, then the text 'thank you for your contributions' is omitted from the welcome message. This is used when the contributions are assumed not to be useful, such as in templates for vandalism or attack pages.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "yes",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "[blank]",
 +
"type": "string"
 +
},
 +
"seventh parameter": {
 +
"label": "icon",
 +
"description": "The filename of the image used in the top-left-hand corner of the notice.  Most deletion notices are information notices (as opposed to warning notices), so the information icon4 is usually chosen.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "Information icon4.svg",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "",
 +
"type": "wiki-page-name"
 +
},
 +
"eighth parameter": {
 +
"label": "wizard",
 +
"description": "Optionally shows a message box with advice about creating new articles.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "yes",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "yes",
 +
"type": "string"
 +
},
 +
"ninth parameter": {
 +
"label": "text",
 +
"description": "The main text of the notice. This does not include the last paragraph, which is included automatically in every notice. Some aspects of the last paragraph can be changed with other parameters, however.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "default value",
 +
"type": "string"
 +
},
 +
"tenth parameter": {
 +
"label": "if you think that",
 +
"description": "If this parameter exists, it will replace the text 'the page was nominated in error' with the text it contains.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "default value",
 +
"type": "string"
 +
},
 +
"eleventh parameter": {
 +
"label": "button",
 +
"description": "Setting this to 'no' removes the text about clicking on the button labelled 'Click here to contest this speedy deletion' in the speedy deletion tag. Useful if the related speedy deletion template doesn't have such a button.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "no",
 
"deprecated": false,
 
"deprecated": false,
 
"aliases": [],
 
"aliases": [],
 
"autovalue": "auto value",
 
"autovalue": "auto value",
 
"default": "default value",
 
"default": "default value",
−
"type": "wiki-page-name"
+
"type": "string"
−
}
+
},
 +
"twelfth parameter": {
 +
"label": "willprovide",
 +
"description": "By default, the template will include the sentence, 'If the page is deleted, and you wish to retrieve the deleted material for future reference or improvement, you can place a request here.' If willprovide is equal to 'no' then this sentence will be omitted. Template:Db-copyvio-notice, for instance, is set up to not include this sentence.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "no",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "default value",
 +
"type": "string"
 +
},
 +
"thirteenth parameter": {
 +
"label": "additionally",
 +
"description": "This optional text will be appended to the very end of the notice.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "default value",
 +
"type": "string"
 
},
 
},
 +
"fourteenth parameter": {
 +
"label": "rfudlink",
 +
"description": "If this parameter exists, the text prompting the user to go to WP:RFUD won't display. Useful as an alternative to the willprovide parameter if one can contact the deleting administrator to retrieve the article but for some reason can't place a request on that page (such as when the user in question has been blocked from editing Wikipedia). Template:Db-notability-notice, for example, is set up to omit this part of the sentence.",
 +
"required": false,
 +
"suggested": false,
 +
                        "example": "yes",
 +
"deprecated": false,
 +
"aliases": [],
 +
"autovalue": "auto value",
 +
"default": "[blank]",
 +
"type": "string"
 +
}
 +
}
 
}
 
}
 
</templatedata>
 
</templatedata>

Revision as of 02:09, 2 April 2017

Template:Speedy deletion notices

This template is a meta-template used to create speedy deletion notifications. It is typically transcluded into another template.

All of the speedy deletion notification templates that Twinkle uses are based on this template. Twinkle will automatically add this message to a user's talk page whenever a page that user has created is nominated for Speedy Deletion. As such, users are unlikely to ever have cause to manually add this template to any page.

Usage

Basic usage:

{{<includeonly>safesubst:</includeonly>db-notice
|namespace     = {{{namespace|}}}
|target        = {{{1}}}
|nowelcome     = {{{nowelcome|}}}
|header        = {{{header|}}}
|header-text   = {{{header-text|}}}
|text          = 
}}<!-- Template:Db-XX-notice --> <noinclude>
{{documentation}}
</noinclude>

All fields:

{{<includeonly>safesubst:</includeonly>db-notice
|namespace         = {{{namespace|}}}
|target            = {{{1}}}
|nowelcome         = {{{nowelcome|}}}
|header            = {{{header|}}}
|header-text       = {{{header-text|}}}
|nothanks          = 
|icon              = 
|wizard            = 
|text              = 
|if you think that = 
|button            = 
|willprovide       = 
|additionally      = 
}}<!-- Template:Db-XX-notice --> <noinclude>
{{documentation}}
</noinclude>

The template should usually be used with safesubst, so that the template can be both transcluded and substituted. In most cases templates made with this meta-template will be substituted on user talk pages, but sometimes transclusion is necessary, for example when creating template documentation.

Syntax error in JSON.

See also