Page MenuHomePhabricator

Access information from a file description page where the file is used
Closed, ResolvedPublic

Description

Author: jamydlan

Description:
Basicaly CLASS:[insert class name(s) here] (or something along those lines), so by adding for
example CLASS:nsd to an image (for example embeded via a "no source" template) a class="nsd"
atribute would be added to the image tag on all pages that use the image.

This would allow the Wiki's global stylesheet/javascript to be set up to cause such images to be
"highlighted" in certain ways automaticaly.

I realise this might be slightly tricky to achieve. For example if the keyword is added to a
template that is transcluded on a number of images all those images would need to have theyr
class data updated, and that would mean that all articles that use those images would in turn
have to be re-parsed for the change to actualy have any noticable effect. I guess the first part
is easy enough as the job que will already work it's way though all pages that transclude a
changed template, but this would call for all pages that use those images touched by the job que
to also be added to the job que (preferably if and only if the "class data" was changed to avoid
a massive "cascade" due to a simple typo fix). Not sure how problematic this would be.

Using a combination of CSS and JavaScript there is almost no limit to what could be done, I'm
sure there are lots of usefull applications for an ability to asign a class to an image beyond
highlighting images slated for deletion.


Version: unspecified
Severity: enhancement

Details

Reference
bz8298

Event Timeline

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

cohesion wrote:

This would be very helpful for image tagging. Currently there is no way to
inform all the users that might care about the pending deletion of an image.

This was also brought up in the mailing list for fair use. We could have a much
more subtle indication that an image is fair use so that people could think
about replacing it if they can.

There are probably many more uses for such an open system that people could come
up with later.

admin wrote:

Idea is useless and redundant to image description page.

ejsanders wrote:

Not it isn't Matthew - it provides an in-line alert. People watching a page
don't usually watch all the images on the page as well.

Keep into mind that having them not only changing the page (just as templates do) but firing a notice on watchlists is harder. You'd need some fake revision trickiness.

you would not need to edit the watchlist. This would allow users to highlight images that have problems while viewing the article. not for watchlists

Could you please reformulate this request in terms of what the actual problem is, and what you would like to achieve, rather than on possible solutions? The proposed implementation looks awfully complicated.

cohesion wrote:

Restating from my understanding: It would be useful if there was a way to make a visual change to images in article space based on some aspect of the image description page. This would most likely be used to alert people looking at the article that an image was about to be deleted, or had some other urgent issue.

happy.melon.wiki wrote:

This effect can be achieved with javascript; I use such a script on enwiki (http://en.wikipedia.org/wiki/User:Anomie/linkclassifier.js). Among other things, it highlights non-free images and images marked for deletion, based on the presence of particular categories. Recommend WONTFIX for this, or as an extension if people are absolutely desperate to have a server-side solution. Certainly this is not something that is ever likely to make it into MW core.

And even if the madness does take us, it should be a parser function: {{CLASS:foo}} or {{#class:foo}}. Behaviour switches (SWITCH) are parameterless.

  • Bug 9616 has been marked as a duplicate of this bug. ***

(In reply to comment #7)

Restating from my understanding: It would be useful if there was a way to make
a visual change to images in article space based on some aspect of the image
description page. This would most likely be used to alert people looking at the
article that an image was about to be deleted, or had some other urgent issue.

Thank you. I have changed the summary accordingly (broadening it a bit). Basically what this request is about is the ability to access information from the file description page on pages where the file is used.

(In reply to comment #8)

Recommend WONTFIX for this, or as an
extension if people are absolutely desperate to have a server-side solution.
Certainly this is not something that is ever likely to make it into MW core.

I'm not sure. If we manage to somehow structure metadata, we will routinely want to access information such as author, license, etc. and we could use some specific flags for a limited number of cases such as copyright violation.

  • Bug 12497 has been marked as a duplicate of this bug. ***
  • bug 31257 - File properties storage
  • bug 31210 - Transclude image description from Wikimedia Commons into [[File:]] caption on Wikipedias
  • bug 25624 - Making license and author information api accessible
  • This bug has been marked as a duplicate of bug 25624 ***