Page MenuHomePhabricator

Allow images in the bad image to be used on specific pages
Closed, ResolvedPublic

Description

The MediaWiki:Bad_image_list feature would be much more useful if the images
listed in it could be allowed on specific pages. I'd propose the following
syntax for specifying such exceptions:

  • [[:Image:Bad image.jpg]] : [[Page to allow it on]], [[Another page]],

[[Namespace:Third page]]

or, alternatively, using definition list syntax:

; [[:Image:Bad image.jpg]] : [[Page to allow it on]], [[Another page]],
[[Namespace:Third page]]


Version: 1.7.x
Severity: enhancement

Details

Reference
bz5985

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:14 PM
bzimport set Reference to bz5985.
bzimport added a subscriber: Unknown Object (MLST).

Patch to allow exceptions to to bad image list

This patch implements the syntax proposed above. Both variants are supported.
Exceptions may also be listed on a separate line (or lines), prefixed with a
colon, just like in normal MediaWiki definition lists.

attachment badimagelist.diff ignored as obsolete

New patch against revision 14260

I've made a new patch that works with the ImageGallery.php fixes committed by
robchurch. I make no comment on whether mParsing is (or was) a descriptive
name for the property I've co-opted -- nonetheless, I've left it as is for now.

attachment badimagelist.diff ignored as obsolete

The ImagePage.php code should ideally link the image name to the image
description page. This is, however, a very low priority issue.

Updated patch: link to image page in galleries, don't show bad images in categories

This is an update of the previous patch with better gallery rendering,
including a link to the image description page. This involved a significant
reorganization of ImageGallery::toHTML(), which, however, was IMO in need of
one anyway. Also, this patch contains a one-line addition to CategoryPage.php
that makes the bad image list also affect galleries.

attachment badimagelist.diff ignored as obsolete

Patch to allow exceptions to to bad image list (simplified, against svn HEAD)

This is a simplified patch that does not include unrelated cleanup to
ImageGallery.php (bug 6490) and does not extend the scope of the bad image list
to galleries (bug 6491).

Attached:

Patch to allow exceptions to to bad image list (simplified, depends on bugs 6490 and 6491)

Alternative patch that may be applied on top of the patches for bug 6490 and
bug 6491.

Attached:

Note that the two patches above differ from the previous ones in that the syntax
for the exceptions is stricter: lines must begin with "*" (not ";") and all
exceptions must be listed on the same line as the image. However, the colon
between the image and the exceptions is no longer required.

I wasn't aware of this patch so I just wrote my own feature that does the same
thing.