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

From blackwiki
Jump to navigation Jump to search
imported>Mr. Stradivarius
(Add parameters that need documenting)
imported>Mr. Stradivarius
(Add extended syntax & more parameter descriptions)
Line 7: Line 7:
  
 
===Syntax===
 
===Syntax===
 +
 +
Basic syntax:
 +
 
<pre>
 
<pre>
 
{{db-meta
 
{{db-meta
 
  |bot={{{bot|}}}
 
  |bot={{{bot|}}}
 +
|raw={{{raw|}}}
 
  |criterion=
 
  |criterion=
 
  |1=
 
  |1=
Line 17: Line 21:
 
}}</pre>
 
}}</pre>
  
Where:
+
Extended syntax:
*<tt>criterion</tt> is the Criterion number from [[Wikipedia:Speedy deletion criteria]].  '''Do not''' create a CSD template which does not already have a CSD criterion, or it will ''itself'' be deleted under [[WP:CSD#T2|CSD T2]]!
+
 
*<tt>1</tt> is the text which will go in bold immediately after "may qualify for speedy deletion".  Note that there is no space between the word "deletion" and the parameter - if you want to continue the sentence without punctuation, use an HTML space (&amp;#32;) to prevent the template 'eating' the leading space.  A trailing full stop is ''already'' included in db-meta, so don't add it to this parameter
+
<pre>
*<tt>2</tt> is the text which appears in italics after <tt>1</tt>. This should be a complete sentence, minus trailing punctuation (a full stop is included in db-meta).
+
{{db-meta
*<tt>temp</tt> is the [[Wikipedia:user warning template|user warning template]] which corresponds to the CSD criterion.  For instance, {{tlx|db-a1}} uses [[Template:empty-warn]], so passes the parameter {{para|temp|empty-warn}}. All such warning templates should be categorised at [[:Category:CSD warning templates]]
+
  |bot={{{bot|}}}
*<tt>summary</tt> is the brief summary which will be preloaded into the deletion confirmation screen.  There is no need to include the CSD criterion as this is added automatically.
+
|raw={{{raw|}}}
 +
|criterion=
 +
|1=
 +
|2=
 +
|temp=
 +
|summary=
 +
|rationale=
 +
|summary=
 +
|self=
 +
|notes=
 +
|anote=
 +
|temp=
 +
|temp2=
 +
|image=
 +
|wiki=
 +
|blanked=
 +
|pleaseblank=
 +
|divblank=
 +
}}</pre>
  
 
=== Parameters ===
 
=== Parameters ===
*'''raw''':
+
 
*'''1''':
+
;Required parameters
*'''2''':
+
 
*'''criterion''':
+
*<code>criterion</code> is the Criterion number from [[Wikipedia:Speedy deletion criteria]].  '''Do not''' create a CSD template which does not already have a CSD criterion, or it will ''itself'' be deleted under [[WP:CSD#T2|CSD T2]]!
 +
*<code>1</code> is the text which will go in bold immediately after "may qualify for speedy deletion".  Note that there is no space between the word "deletion" and the parameter - if you want to continue the sentence without punctuation, use an HTML space (&amp;#32;) to prevent the template 'eating' the leading space.  A trailing full stop is ''already'' included in db-meta, so don't add it to this parameter
 +
 
 +
;Recommended parameters
 +
These parameters are generally used in all speedy deletion templates based on db-meta, and some may break other templates/scripts if they are omitted.
 +
 
 +
*<code>2</code> is the text which appears in italics after <code>1</code>.  This should be a complete sentence, minus trailing punctuation (a full stop is included in db-meta).
 +
*<code>temp</code> is the [[Wikipedia:user warning template|user warning template]] which corresponds to the CSD criterion.  For instance, {{tlx|db-a1}} uses [[Template:empty-warn]], so passes the parameter {{para|temp|empty-warn}}. All such warning templates should be categorised at [[:Category:CSD warning templates]]
 +
*<code>summary</code> is the brief summary which will be preloaded into the deletion confirmation screen.  There is no need to include the CSD criterion as this is added automatically.
 +
*<code>bot</code> is the name of the bot account that tagged the page for deletion, if applicable. This should be passed through to the specific deletion template, using <code><nowiki>|bot={{{bot|}}}</nowiki></code>. It should not be called directly from db-meta.
 +
*<code>raw</code> is used for generating a simple deletion message with no message box. It should be passed through to the specific deletion template, using <code><nowiki>|raw={{{raw|}}}</nowiki></code>. This parameter is used by {{tl|db-multiple}} to generate the notices about individual speedy deletion criteria.
 +
 
 +
;Optional parameters
 +
 
 
*'''rationale''':
 
*'''rationale''':
*'''bot''':
 
*'''summary''':
 
 
*'''self''':
 
*'''self''':
 
*'''notes''':
 
*'''notes''':
 
*'''anote''':
 
*'''anote''':
*'''temp''':
 
 
*'''temp2''':
 
*'''temp2''':
 +
*'''sig''':
 
*'''image''':
 
*'''image''':
 
*'''wiki''':
 
*'''wiki''':

Revision as of 03:32, 23 June 2012


Usage

This template is a meta-template used to create the other speedy deletion templates used for nominating pages for speedy deletion. Do not attempt to use this template directly on articles. For a generic speedy deletion template, see {{db}}.

Syntax

Basic syntax:

{{db-meta
 |bot={{{bot|}}}
 |raw={{{raw|}}}
 |criterion=
 |1=
 |2=
 |temp=
 |summary=
}}

Extended syntax:

{{db-meta
 |bot={{{bot|}}}
 |raw={{{raw|}}}
 |criterion=
 |1=
 |2=
 |temp=
 |summary=
 |rationale=
 |summary=
 |self=
 |notes=
 |anote=
 |temp=
 |temp2=
 |image=
 |wiki=
 |blanked=
 |pleaseblank=
 |divblank=
}}

Parameters

Required parameters
  • criterion is the Criterion number from Wikipedia:Speedy deletion criteria. Do not create a CSD template which does not already have a CSD criterion, or it will itself be deleted under CSD T2!
  • 1 is the text which will go in bold immediately after "may qualify for speedy deletion". Note that there is no space between the word "deletion" and the parameter - if you want to continue the sentence without punctuation, use an HTML space (&#32;) to prevent the template 'eating' the leading space. A trailing full stop is already included in db-meta, so don't add it to this parameter
Recommended parameters

These parameters are generally used in all speedy deletion templates based on db-meta, and some may break other templates/scripts if they are omitted.

  • 2 is the text which appears in italics after 1. This should be a complete sentence, minus trailing punctuation (a full stop is included in db-meta).
  • temp is the user warning template which corresponds to the CSD criterion. For instance, {{db-a1}} uses Template:empty-warn, so passes the parameter |temp=empty-warn. All such warning templates should be categorised at Category:CSD warning templates
  • summary is the brief summary which will be preloaded into the deletion confirmation screen. There is no need to include the CSD criterion as this is added automatically.
  • bot is the name of the bot account that tagged the page for deletion, if applicable. This should be passed through to the specific deletion template, using |bot={{{bot|}}}. It should not be called directly from db-meta.
  • raw is used for generating a simple deletion message with no message box. It should be passed through to the specific deletion template, using |raw={{{raw|}}}. This parameter is used by {{db-multiple}} to generate the notices about individual speedy deletion criteria.
Optional parameters
  • rationale:
  • self:
  • notes:
  • anote:
  • temp2:
  • sig:
  • image:
  • wiki:
  • blanked:
  • pleaseblank:
  • divblank:

Other notes

  • All CSD templates based directly on db-meta should ideally use {{db doc}} for centralised documentation.
  • For templates which have variants, like {{db-g6}} and {{db-a7}}, it is recommended to base the variants on those templates, rather than directly on db-meta. For instance, {{db-band}} calls {{db-a7}} which in turn calls db-meta, rather than db-band calling db-meta directly.
  • All CSD templates using db-meta produce two invisible spans which may be useful for client-side java script:
    • <div id="delete-criterion"></div> contains only the CSD criterion ("A1", "P2", "R3", etc)
    • <div id="delete-reason"></div> contains a complete, legible deletion log summary which is suitable for preloading into the deletion confirmation screen.