Template:X-To-DR

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Documentation icon Documentation[view] [edit] [history] [purge]

This documentation is transcluded from Template:X-To-DR/doc.

Helper template that adds a button that can be used to convert any type of deletion request to a regular deletion request or to simply remove the tag.

Usage

{{X-To-DR
 |regexp =
 |templateName =
 |declineReason =
}}

The second submatch - if present - will be used as the provided reason.

{{X-To-DR
 | regexp =<nowiki>/\{\{\s*([Dd]upe?|[Dd]uplicat(?:e|ion)|[Ee]xact duplicate)\s*(?:\|\s*(?:1\=)?)?([^\{\}]*)\}\}/</nowiki>
 | templateName =duplicate
 | declineReason =<nowiki>Not an exact or scaled-down [[Commons:Duplicate|duplicate]]</nowiki>
}}
Convert to DRx Remove this tag

Template parameters

Parameter Description Default Status
regexp JavaScript regular expression that matches the template that should be converted/removed and (optionally) - as first submatch - the template name and as second submatch - the reason. Don't forget to list the redirects. empty required
templateName The template name of the template that should be removed. This will be used to prefill the deletion request. E.g. This file was tagged as templateName by User:U for the following reason: ... empty required
declineReason The default decline reason will be filled-in in the removal form that asks for an edit-summary. empty required
demo empty optional

Additional information

The template is intended to be used in the following namespaces: the Template namespace

The template is intended to be used by the following user groups: no user group specified

Relies on:
MediaWiki:Gadget-AjaxQuickDelete.js

Localization

This template is localized by utilizing custom MediaWiki namespace messages.

If i18n is required, please create a MediaWiki message or a new template (like {{X-To-DR-tag}}) and use that.