Jump to content

Template:Verify/doc

Unchecked
From Wikinews, the free news source you can write!

This template can be used in two ways. It can be used to indicate the source of a specific statement or it can be used to indicate that a statement needs a source.

The markup produced by this template is not meant to appear in published articles and must be removed by the reviewer before the article is published. This markup is intended to facilitate and expedite the review process.

Note to authors: Use of this template is not sufficient for citing sources. Any URL mentioned using this template must also be listed in the Sources section as required by WN:Source.

Examples

[edit]

To indicate the source of a given statement, use {{Verify|https://someURL.com}}, which will render:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisi. Vestibulum vitae elit non velit accumsan gravida.[Source]

To indicate a statement needs a source, use {{Verify}} with no parameters to render:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisi. Vestibulum vitae elit non velit accumsan gravida.[Unsourced]

To hide the template but still provide source information to the reviewer, use {{Verify|https://someURL.com|visibility=hidden}}, which will render:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisi. Vestibulum vitae elit non velit accumsan gravida.

Parameters

[edit]
  • visibility: This template accepts an optional parameter to hide rendered text in an article. This is useful to remove unwanted clutter within the article during the drafting phase.
    • hidden will hide the template making it only visible using source editor.

Note for reviewers

[edit]

All occurrences of this template in an article must be removed before publishing an article, as the template, even when hidden, will remain in the published article.

It is possible to use TemplateScript[1] to remove all occurrences of {{Verify}} from an article with a single click. The following code works:

{ name: 'Remove {{Verify}} template', script: function(editor) { // Remove all occurrences of {{Verify}} with or without parameters editor.replace(/\{\{Verify.*?\}\}/gi, ''); editor.appendEditSummary('Remove all instances of the {{Verify}} template.'); }, enabled: true },

The following code will hide all occurrences of the template in an article:

{ name: 'Hide {{Verify}} templates', script: function(editor) { // Find all instances of {{Verify}} that do not already have "visibility=hidden" editor.replace(/\{\{Verify(?![^}]*visibility\s*=\s*hidden)(.*?)\}\}/gi, '{{Verify$1|visibility=hidden}}'); editor.appendEditSummary('Add "visibility=hidden" to all instances of the {{Verify}} template without it.'); }, enabled: true },