Page MenuHomePhabricator

Allow Image link= parameter when using thumb or frame
Closed, ResolvedPublic

Description

Author: apb

Description:
The link= parameter in an image is ignored, if the image has a caption. For example, [[Image:Example.png|link=Main Page|alt=Alt text|thumb|Caption goes here]] does not link to [[Main Page]], it links to [[File:Example.png]]. See [[Wikipedia:Images linking to articles]] at en.wikipedia.org for a demonstration.


Version: unspecified
Severity: enhancement

Details

Reference
bz17398

Event Timeline

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

This is caused by using 'thumb'. Summary updated accordingly.

Using "frame" causes the same problem; summary updated.

It is not ment to work with thumbs or frames. no bug here!

(In reply to comment #3)

It is not ment to work with thumbs or frames. no bug here!

What? Re-opening pending further explanation.

Well it isn't. Basically, it's designed to solve the issue with the protection icon link issue. The concern with adding it to other (frame/thumb) modes, was that part of our image "attribution" policy relies on an image to link to their description page, with full author and licensing information. The developers wanted to prevent that images are being included without a proper way to reach this information. (This is off the top of my head, i might be wrong).

Can't recall the dev I've chatted with about this issue on IRC (maybe Splarka) and he was very clear: thumbs should ALWAYS link to the image. Meanwhile I accept it, although I wish it was possible in galleries :)

herd wrote:

I ain't no dev, but it is intentional. Changing severity to enhancement and rewording summary.

michael.daly wrote:

I can understand the logic for not permitting "link=" for thumbs (as explained in the log of IRC from March 1, 2009, but I've seen no explanation of why "link=" is forbidden for frame. WHat would be the consequences of making this change to frame?

michael.daly wrote:

Referring to that IRC chat (http://toolserver.org/~amidaniel/chanlogs/%23mediawiki/20090301.txt), faking the thumb was the recommended workaround (using a <div to set a size etc). Faking a frame obviously does the same sort of thing. Hence it is relatively trivial to override the intended restriction on the use of thumb.

It seems to me that this faking just adds complexity to the situation (for the user) whereas just providing the capability would allow the user to do what they want to do without adding complexity.

If the objection is to using thumb in this manner as a way of removing access to the image's page with the attribution and copyright information and since it appears that the "link=..." functionality is done by invoking ImageMap in some way (an error can invoke an ImageMap error message - hence my assumption) it seems to me that this feature should use an additional capability of ImageMap and just put the info icon (i in a circle) onto the image with the link to the image's page provided by clicking on the info icon. This would provide full use of the "link=..." feature for all extended image options without loss of direct access to the image's page. From the user's perspective, we get less complexity all around and a more consistent rule for the feature's use.

yeah just link the magnify-clip.png in the caption to the image page if link= is used. good idea.

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

scott.yeadon wrote:

Can I just clarify the behaviour after the intended change - for images using 'frame' e.g. [[File:A030280.jpg|frame|270px|link=http://mysite]], clicking on the image will take the user to http://mysite and the magnify icon will take them to the image in MediaWiki?

I'm marking this works for me, as it works for me on latest svn. (It doesn't work on 'pedia, so presumably it was fixed sometime after the last major code update)