|Look here, if nowhere else|
|Permission request||All of CommonsDelinker's user pages at local wikis, by default, will be linked to this page in meta-wiki. Please feel free to translate this page locally.||
CommonsDelinker is a service brought to local wikis by Wikimedia Commons administrators, maintained by Hoo man, Siebrand and Krinkle. It is aimed at increased trans-wiki cooperation and the prevention of broken image links (unplanned delinking) on local wikis after a Commons file deletion.
- An example of a broken or red link appears at right.
- File Delinking (between Commons and local wikis) is the remedial action that follows detection of a copyvio Commons file.
- CommonsTicker is the initial warning system to local wikis, enabling them to timely and manually delink from Commons copyvio files.
- CommonsDelinker is the 'safety net', should local wikis not react in a standard time to the ticker warning messages.
CommonsDelinker is akin to and shares common goals with, but is not a replacement for CommonsTicker. CommonsTicker gives the initial warning of copyvios, and the timely manual delinking by local communities is always the preferred delinking method, as it allows for both the removal of the copyvio file and manual replacement with an equivalent free file, preceding the Commons deletion. Although CommonsDelinker is a 'safety net' for delayed reaction, it cannot solve all situations.
Wikimedia Commons can't wait longer than the standard Commons deletion timeframe for communities to act on CommonsTicker messages - and local communities deserve something better than the consequent broken links when reactions to ticker messages are delayed. That is why CommonsDelinker is activated as a remedial action following a Commons file deletion.
As administrators we think that the edits of CommonsDelinker are a necessary evil, and not copyrighted. They should be considered Public Domain.
- 21:04, 8 November 2007 (UTC) CommonsDelinker is one of the first projects to run on the new stable toolserver
- 21:04, 8 November 2007 (UTC) CommonsDelinker logs are now available here
- 21:06, 8 November 2007 (UTC) Bugs and feature requests can be reported here
- 21:08, 8 November 2007 (UTC) CommonsDelinker is now running two plug-ins: on delinking media inside flag galleries on nl.wp, it does not delink, but replace with a place holder. It does the same on fr.wikibooks with other criteria.
- 23:42, 18 February 2014 (UTC) CommonsDelinker moved to tools
How it works
- The bot waits ten minutes to give the deleting administrator time to notice any mistakes he might have made.
- The bot consults CheckUsage. If the image "Foobar.jpg" were deleted, for example, the bot would retrieve 
- For each instance returned by CheckUsage:
- Download the current version of that page. (e.g.: en:Special:Export/Foobar)
- Search and remove (or replace) any instances of the deleted image (e.g., [[Image:Foobar.jpg]], [[Image:Foobar.jpg|description|other|parameters]], <gallery>Image:Foobar.jpg</gallery>) in case there is no local copy of the image in a particular wiki.
- The bot saves the page with a summary in English by default. The summary message can be overridden by creating a subpage of the bot.
The bot's edit summary can be translated via the subpage [[User:CommonsDelinker/summary-I18n]] for image removals or [[User:CommonsDelinker/replace-I18n]] for image replacements. Note: The subpage must be created on the wiki that will be edited, not on Meta. The English removal edit summary, for example, is en:User:CommonsDelinker/summary-I18n. If an edit summary is not available and the wiki is not a Wikipedia wiki, the bot will first look for an edit summary in the similar language Wikipedia, before falling back to the default summary.
It is recommended write protecting these sub pages at a later stage when the bot is in action in order to prevent vandalism of these messages.
The bot's edit summaries incorporate the collaborative beauty of wikis. Individual wikis should feel free not only to translate the edit summary, but to tweak it, modify the style, add links, etc. Just keep these variables in mind (all are optional and can be placed anywhere in the summary as many times as desired):
- $1 - The name of the file deleted on Commons. This does not include the prefix "Image:"
- $2 - The username of the administrator on Commons that deleted the image being delinked.
- $3 - The comment/summary/reason given by the Commons admin.
- $1 - The original filename
- $2 - The new filename
- $3 - The administrator that issued the replacement.
- $4 - The reason the administrator gave.
Comments, suggestions, complaints, etc.
The source of CommonsDelinker is available under the terms of the MIT license in the pywikipedia Git repository. The most recent operator's manual resides there. A local copy can be found on User:CommonsDelinker/For operators.
- If the deletion summary contains the string "no-orgullobot", the image will not be orphaned.