Difference between revisions of "Template:Check file on delete/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Davidgothberg
(Oops, good thing I do testing before deploying.)
imported>Adem20
m (+template)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{#if:
 
{{#if:
 
   {{#switch: {{PAGENAME}}
 
   {{#switch: {{PAGENAME}}
 +
  <!-- Images used in system messages: -->
 +
  | Lock icon blue.gif
 +
  | Example.jpg
 +
 +
  | Button redirect.png
 +
  | Button strike.png
 +
  | Button enter.png
 +
  | Button upper letter.png
 +
  | Button lower letter.png
 +
  | Button small.png
 +
  | Button hide comment.png
 +
  | Button gallery.png
 +
  | Button blockquote.png
 +
  | Button insert table.png
 +
  | Button reflink.png
 +
 +
  | Monobook-bullet.png
 +
  | Monobook-bullet-ga.png
 +
  | Monobook-bullet-star.png
 +
 +
  | Button link.png
 +
  | Crystal 128 kivio.png
 +
  | Gtk-dialog-info-14px.png
 +
  | Imbox content.png
 +
  | Imbox notice.png
 +
  | Imbox style.png
 +
  | Nuvola actions undo.png
 +
 +
  | Ambox warning orange.svg
 +
  | Ambox warning pn.svg
 +
  | Ambox warning yellow.svg
 +
  | Circle-style-warning.svg
 +
  | Commons-logo.svg
 +
  | Crystal Clear app amor.png
 +
  | Crystal Clear app help index.png
 +
  | Crystal Clear app ktip.png
 +
  | Crystal Clear app lphoto.png
 +
  | Emblem-question-yellow.svg
 +
  | Mail-send-receive.svg
 +
  | Namespace MediaWiki.svg
 +
  | Padlock.svg
 +
  | Padlock-red.svg
 +
  | Pango-name.svg
 +
  | Template-info.svg
 
   | User-info.svg
 
   | User-info.svg
   | Example.jpg = system
+
   | Yes check.svg
 +
  | Wiki letter w.svg
  
 +
  <!-- Other known high-risk images: -->
 +
  | Ambox deletion.png
 +
  | Padlock-silver-medium.svg
 +
  | Padlock-olive.svg
 +
  | Padlock-black.svg
 +
  | Padlock-skyblue.svg
 +
  | Cscr-featured.svg
 +
 +
  <!-- Images from the image upload interface: -->
 +
  | Icon - upload photo.svg
 +
  | Commons-logo-en.svg
 +
  | Questionmark copyright.svg
 +
  | Gtk-go-back-ltr.svg
 +
  | Emblem-important.svg
 +
  | Searchtool.svg
 +
  | Cc-nc white.svg
 +
  | Cc-nd white.svg
 +
  | Green check.png
 +
 +
  <!-- The 50 most used images on Wikipedia: -->
 
   | Information.svg
 
   | Information.svg
   | Symbol stub class.svg  
+
   | Symbol stub class.svg
 +
  | Information.png
 +
  | Crystal personal.svg
 +
  | P vip.svg
 +
  | Nuvola apps important.svg
 +
  | Symbol start class.svg
 +
  | Symbol question.svg
 +
  | Ambox warning pn.svg
 +
  | Folder Hexagonal Icon.svg
 +
  | Robot icôn.svg
 +
  | Question book-new.svg
 +
  | Stop hand nuvola.svg
 +
  | Flag of the United States.svg
 +
  | Commons-logo.svg
 +
  | To Commons.svg
 +
  | Red pog.svg
 +
  | Imbox deletion.png
 +
  | PD-icon.svg
 +
  | Nuvola apps korganizer.svg
 +
  | Ambox content.png
 +
  | Sports and games.png
 +
  | Video-x-generic.svg
 +
  | Wiki letter w.svg
 +
  | Vynil record.jpg
 +
  | Disambig gray.svg
 +
  | CC some rights reserved.svg
 +
  | Cc-by new white.svg
 +
  | Button sig.png
 +
  | Flag of France.svg
 +
  | Disambig.svg
 +
  | Cc-sa white.svg
 +
  | Flag of Poland.svg
 +
  | NotCommons-emblem-copyrighted.svg
 +
  | Camera-photo.svg
 +
  | Flag of Australia.svg
 +
  | Soccer ball.svg
 +
  | WikiProject United States logo.svg
 +
  | Heckert GNU white.svg
 +
  | Stop x nuvola with clock.svg
 +
  | Waricon.svg
 +
  | Stop x nuvola.svg
 +
  | Portal-puzzle.svg
 +
  | Flag of Canada.svg
 +
  | Copyright CD.svg
 +
  | A coloured voting box.svg
 +
  | Symbol c class.svg
 +
  | Flag of Germany.svg
 +
  | Stop hand.svg
 +
  | Flag of India.svg
 +
 
 +
  <!-- The 51-100 most used images on Wikipedia: -->
 +
  | Replacement filing cabinet.svg
 +
  | Symbol neutral vote.svg
 +
  | Edit-clear.svg
 +
  | Symbol template class.svg
 +
  | Flag of the United Kingdom.svg
 +
  | Symbol list class.svg
 +
  | Purple question mark.svg
 +
  | Feed-icon.svg
 +
  | Symbol b class.svg
 +
  | Bclass-checklist.svg
 +
  | Ambox warning yellow.svg
 +
  | Clipboard.svg
 +
  | Symbol support vote.svg
 +
  | Wikipedia-logo-v2.svg
 +
  | Imbox content.png
 +
  | Copyright-problem.svg
 +
  | Terrestrial globe.svg
 +
  | Flag of England.svg
 +
  | Flag of Italy.svg
 +
  | Flag of Russia.svg
 +
  | WP Canada Logo-.svg
 +
  | Flag of Japan.svg
 +
  | Exquisite-kfind.png
 +
  | Poland map flag.svg
 +
  | Symbol redirect vote2.svg
 +
  | Template-info.svg
 +
  | Flag of Spain.svg
 +
  | Olympic Rings.svg
 +
  | Gnome-mime-text-x-credits.svg
 +
  | OlympicsWP logo.svg
 +
  | Africa satellite orthographic.jpg
 +
  | Updated DYK query.svg
 +
  | Exquisite-microphone.png
 +
  | Nuvola apps package graphics.svg
 +
  | Flag of Sweden.svg
 +
  | Puppeter template.svg
 +
  | Insert-signature.png
 +
  | P train.svg
 +
  | Image-request.svg
 +
  | Three rail tracks 350.jpg
 +
  | Information icon.svg
 +
  | Red x.svg
 +
  | Gamepad.svg
 +
  | Flag of Brazil.svg
 +
  | Soccerball mask.svg
 +
  | Television icon.png
 +
  | Yes check.svg
 +
  | School ip.svg
 +
  | Crystal Clear app Login Manager 2.png
 +
  | Baseball (crop).jpg = high-risk
  
  | Stop hand.svg
+
   }} {{{demo1|}}} <noinclude>aaa</noinclude>
  | Flag of India.svg = high-risk
 
   }} {{{test1|}}} <noinclude>aaa</noinclude>
 
  
 
| {{fmbox
 
| {{fmbox
Line 16: Line 179:
 
   | id = mw-filedelete-intro-high-risk
 
   | id = mw-filedelete-intro-high-risk
 
   | text =  
 
   | text =  
'''Warning!''' This file is used in a system message or is one of the 100 most used images. Such images should be locally uploaded and protected here at the English Wikipedia. Don't delete this image, not even if it has a backup copy on Commons.
+
'''Warning!''' This file is used in a system message or is one of the most widely used images. Such high-risk images should be locally uploaded and protected here at the English Wikipedia. Don't delete this image, not even if it has a backup copy on Commons. <small>([[Wikipedia talk:Cascade-protected items#About high-risk images|more about this]])</small> {{
 +
    #if: {{PROTECTIONLEVEL:edit}} {{PROTECTIONLEVEL:move}} {{PROTECTIONLEVEL:create}} {{PROTECTIONLEVEL:upload}}
 +
    | <br />This file has the following protections set:
 +
      {{#if: {{PROTECTIONLEVEL:edit}}
 +
      | * Edit: {{PROTECTIONLEVEL:edit}}
 +
      }}{{#if: {{PROTECTIONLEVEL:move}}
 +
      | * Move: {{PROTECTIONLEVEL:move}}
 +
      }}{{#if: {{PROTECTIONLEVEL:create}}
 +
      | * Create: {{PROTECTIONLEVEL:create}}
 +
      }}{{#if: {{PROTECTIONLEVEL:upload}}
 +
      | * Upload: {{PROTECTIONLEVEL:upload}}
 +
      }}
 +
    | <br />Unfortunately this file is currently not protected.
 +
    }}
 
   }}
 
   }}
 
| <!-- Not listed as high-risk, so check if protected -->
 
| <!-- Not listed as high-risk, so check if protected -->
   {{#if: {{PROTECTIONLEVEL:edit}} {{PROTECTIONLEVEL:move}} {{PROTECTIONLEVEL:upload}} {{{test2|}}}
+
   {{#if: {{PROTECTIONLEVEL:edit}} {{PROTECTIONLEVEL:move}} {{PROTECTIONLEVEL:create}} {{PROTECTIONLEVEL:upload}} {{{demo2|}}}
 
   | {{fmbox
 
   | {{fmbox
 
     | type = warning
 
     | type = warning
Line 30: Line 206:
 
       }}{{#if: {{PROTECTIONLEVEL:move}}  
 
       }}{{#if: {{PROTECTIONLEVEL:move}}  
 
       | * Move: {{PROTECTIONLEVEL:move}}
 
       | * Move: {{PROTECTIONLEVEL:move}}
 +
      }}{{#if: {{PROTECTIONLEVEL:create}}
 +
      | * Create: {{PROTECTIONLEVEL:create}}
 
       }}{{#if: {{PROTECTIONLEVEL:upload}}  
 
       }}{{#if: {{PROTECTIONLEVEL:upload}}  
 
       | * Upload: {{PROTECTIONLEVEL:upload}}
 
       | * Upload: {{PROTECTIONLEVEL:upload}}
 
       }}
 
       }}
Images are usually locally uploaded and protected here at the English Wikipedia since they are used in an interface message or in some widely used template. Don't delete such images, not even if it is an image that has a backup copy on Commons.
+
Images are usually locally uploaded and protected here at the English Wikipedia since they are used in an interface message or in some widely used template. Don't delete such images, not even if it has a backup copy on Commons. <small>([[Wikipedia talk:Cascade-protected items#About high-risk images|more about this]])</small>
 
     }}
 
     }}
 
   | <!-- Not protected, do nothing -->
 
   | <!-- Not protected, do nothing -->
 
   }}
 
   }}
 
}}<noinclude>
 
}}<noinclude>
 
+
{{documentation}}
 
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:07, 9 May 2017

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

This is the {{check file on delete}} template.

This template is normally only used by the system, it is called from MediaWiki:Confirmdeletetext and MediaWiki:Filedelete-intro. It displays a warning message when an admin tries to delete a protected file or a known high-risk file.

This template detects all four kinds of protection: edit, move, create and upload protection. It warns even if it is only semi-protection. It then displays a message as seen above this documentation box.

This template also checks against a list of images used in system messages and a list of the most widely used images. If a match is found it displays this message:


If the file is not protected at all and is not a known high-risk image then this template produces no output.

See also

  • {{check page on delete}} – The warning message for normal pages, and for file pages that have no locally uploaded file.