Issue:Find unused files

From FollowTheScore
Jump to: navigation, search
Description: Return unused files
Extension / Version: DPL   /   ?
Type / Status: Change Request   /   open


Is there a way to select images that are used (il_to NOT NULL, linked to by any other page)) or unsed?
I want to return a simple list of unused images, but also in combination, e.g. unused files, uploaded by a specifed user.
This should actually return a simple list of 5 unused files (if I understand the parameter correctly), but it doesn't.



The problem is that notlinksfrom expects an exact article name; it does not understand 'LIKE %'.

Work around

You can nest two queries; the first one produces a list of all images and calls another template for each ofg the images. The second query produces output only if the imageused clause is false.

---------------------------------------- Code in a page named 'check list for unused images' (e.g.)
===Unused Images===
 |format=,²{Unused Image¦%PAGE%}²,
---------------------------------------- Code in page 'Template:Unused Image'
 |noresultsheader=\n* [[{{{1}}}]]
---------------------------------------- end

The code in the second template generates the lsit of articles which use an image; the #replace throws the whole list away if there was at least one match; otherwise it outputs the name of the image under question.

Gero 21:20, 1 May 2009 (UTC)

Oh thanks for the code. It returns the pages it checked as well. But those links which are images are really unused. Link (will remove my link after next reply).
Ok so I guessed right that there is no standard way to return unlinked pages (pages which are not linked to on other pages)? What about a new format symbol for that? There is the BOOL page.il_to, so it should be easy query. E.g.
Result: All unused image pages. --Subfader 21:44, 1 May 2009 (UTC)