Difference between revisions of "Template:DYK talk/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Mr. Stradivarius
(use Module:Check DYK hook to check the hook text)
imported>Mr. Stradivarius
(handle DYK hooks containing equals signs)
 
Line 37: Line 37:
 
{{#iferror:{{#expr:{{{entry|{{{3|{{{2|}}}}}}}}}}}
 
{{#iferror:{{#expr:{{{entry|{{{3|{{{2|}}}}}}}}}}}
 
|<!-- If there is an expr error, that means there is an entry specified-->
 
|<!-- If there is an expr error, that means there is an entry specified-->
{{#if:{{#invoke:Check DYK hook|isValidHook|{{{entry|{{{3|{{{2|}}}}}}}}}}}
+
{{#if:{{#invoke:Check DYK hook|isValidHook|1={{{entry|{{{3|{{{2|}}}}}}}}}}}
 
|<!-- Don't output anything if the hook is valid -->
 
|<!-- Don't output anything if the hook is valid -->
 
|[[Category:Pages with a malformed DYK entry]]
 
|[[Category:Pages with a malformed DYK entry]]

Latest revision as of 07:14, 27 November 2020

Template documentation[view] [edit] [history] [purge]

Usage

Basic usage: Place {{DYK talk|date|hook}} on the talk pages of articles from which a DYK entry was featured. The template should be placed at the top of the page, above any discussion text and project tags but below other tags.

Parameters

  • {{{1}}}Required: Date (day, month and year) e.g. 2 March 2010
  • {{{2}}} – Hook, in the form ... text? (note the "..." and "?" and the lack of a bullet); adds "Did you know {{{2}}}"
  • {{{3}}} – Image (without "File:" or "Image:" prefix) that was part of the DYK entry, if any; replaces the default Wikipedia image on the right-hand side; use only with the {{{2}}} a.k.a. {{{entry}}} parameter.
  • {{{nompage}}} – The name of the subpage where the nomination discussion/review was conducted (e.g., Template:Did you know nominations/Article title; do not use brackets). The template can sometimes generate a link to the nomination subpage without this, but adding |nompage= ensures that it generates the link, and that the link remains even if this article title is moved (on the other hand, the automatically-generated link can be lost if the article is moved).
  • {{{views}}} – Number of page views dated to the DYK period; adds , and was viewed approximately {{{views}}} times (disclaimer)
  • {{{article}}} – If the page has been moved since it was on DYK, putting its former name in this parameter will ensure the "check views" link to obtains the number of page views dated to the DYK period for the former name rather than the new name.
  • {{{small}}} – If yes, makes the tag smaller and floated to the right-hand side of the page
  • {{{entry}}} – Identical to {{{2}}}
  • {{{image}}} – Identical to {{{3}}}

Examples

{{DYK talk|2 March 2007|... that modern [[cue sport#Chalk|billiard chalk]] ''(pictured)'', which is not actually [[chalk]] but a compound of [[silica]] and [[corundum]], was invented by player '''[[William A. Spinks]]''' and a chemist friend in 1897?|views=1136}}

{{DYK talk|2 March 2007|... that modern [[cue sport#Chalk|billiard chalk]] ''(pictured)'', which is not actually [[chalk]] but a compound of [[silica]] and [[corundum]], was invented by player '''[[William A. Spinks]]''' and a chemist friend in 1897?|views=1136|small=yes}}

Maintenance categories