Template talk:Click

From Wikipedia, the free encyclopedia

Protected Template:Click has been protected indefinitely. Use {{editprotected}} on this page to request an edit.
Template for deletion This template page was nominated for deletion on 10 March 2006. The result of the discussion was no consensus. An archived record of this discussion can be found here.
Templates for deletion This template was considered for deletion on 17 December 2006 . The result of the discussion was no consensus.


Contents

[edit] Documentation

This template causes an image to link to a specified page when clicked, rather than its image description page. It should be used sparingly as image description pages contain copyright information and should normally be easily accessible. There is also an alternative Version of this Template, Click-Inline. It does practically the same as Click, but without generating a new paragraph (newline). For more information see Discussion on Click-Inline.

[edit] Syntax

{{Click |
| image = <location of image>
| link = <page to link to>
| width = <width of image> (not more than 100px)
| height = <height of image> (not more than 100px)
}}

[edit] Examples

{{Click |
| image = Nuvola apps browser.png
| link = :Category:Geography
| width = 40px
| height = 40px
}}
:Category:Geography
{{Click |
| image = Wikinews-logo-textless.png
| link = n:Main Page
| width = 35px
| height = 19px
}}
n:Main Page

[edit] Unlinked image

This template can also be used to produce images that are not clickable, by using as the link parameter:

link = {{FULLPAGENAME}}

The cursor can also be changed to appear normal when over the image by using styles

<div style="cursor:default;">
{{Click |
| image = Nuvola mimetypes info.png 
| Link = {{FULLPAGENAME}}
| width = 30px 
| height = 30px
}}
</div>
   
Template talk:Click
See also: Wikipedia:Images

[edit] Discussion

[edit] Wont work

I can click that pic, and my cursor turns into a hand. (i'm using mozilla firefox 1.5x on a windows xp)--85.164.186.121 13:25, 16 May 2006 (UTC)

You're right. I can click the image which is supposed to be "unclickable", and the other examples go to the normal image page rather than the page they were supposed to go to. This template is broken on Firefox 1.5. --Tim1988 talk 09:23, 15 June 2006 (UTC)

I think the <pre> </pre> tags break the template. The images here didn't work correctly for me at first, but when I moved them so they came before the first <pre>, they worked. -- kenb215 01:47, 26 July 2006 (UTC)

[edit] A simpler template for Mediawiki sites that support embedding external images

See m:Template:Clickpic. This will not work with main Wikimedia projects (i.e. Wikipedia and Meta) buts works very well on sites that support embedding external images - i.e. most personal, public websites and corporate intranet sites that use Mediawiki.

[edit] Can this be used on the same line as text?

Can the image in this template appear on the same line as text? Take a look at the album link in the right box for Stairway to Heaven to see what I mean. --Oldak Quill 17:43, 20 December 2005 (UTC)

I don't know. I assumed it would work but ran into a similar problem when trying to add it to Wikipedia:Browse. Perhaps it could be done using tables? the wub "?!" 18:08, 20 December 2005 (UTC)
Since the template uses div tags, which are block elements in HTML, it won't work inline with text, but you use a table to force it onto the same line as text. – Minh Nguyễn (talk, contribs) 05:26, 21 December 2005 (UTC)
Use Template:Click-Inline --PSIplus Ψ 00:04, 23 June 2006 (UTC)

[edit] Confusing

I believe this template to be inherently confusing to some editors and especially many readers. If people click on a small image, they expect to see it enlarged, and/or to see info on it. Could anybody please give good reasons for the existence of this, considering that this talk page already basically tells us not to use it? Radiant_>|< 03:33, 24 December 2005 (UTC)

I agree. Images work the way they do by design. As Radiant says, there is an expectation that when you click any image on WP, you go to the image page. If the developers or community wanted them to have optional alternate targets, they would already be part of the [[Image:]] tag. The problem is that these Click templates are already being used for very casual uses. Any proliferation could be quite unbearable over time. The creators should instead pursue filing a MediaWiki feature request, rather than implementing this. Please remove all instances of them from any active use. -- Netoholic @ 04:44, 24 December 2005 (UTC)
Actually I would argue it is the current system that is inherently confusing. For every other website, if you click on an image on the main page, you go to the article it is associated with. Thousands of people per day click on the image for the featured article expecting to go to the article, when in fact they simply get to a highly technical image description page. Editors such as ourselves know where to click, but I doubt most readers do. - SimonP 14:22, 24 December 2005 (UTC)

Agree with SimonP. The intention is for this to be used in a very limited number of cases. The main place I created it for was the sister projects box on the Main Page, to let the images link directly to the sister projects. People who are new to Wikipedia will not be expecting details on the picture at all, and I feel we should be making Wikipedia as easy to use as possible for new users. I believe this has already been submitted as a feature request, but there seems to be little point wasting the developers time on it when this is an adequate solution. the wub "?!" 15:00, 25 December 2005 (UTC)

  • While I see Simon's point, wouldn't it be better to talk to the devs about this one? Radiant_>|< 10:42, 26 December 2005 (UTC)

Also agree with SimonP. There are a few cases where the typical WP action of going to the image info isn't what's needed. As for talking to the devs, there's already a feature request in bugzilla asking for this; once it gets implemented (assuming it meets the needs addressed by this template) I'm sure we can move over to that. I'd like to think this template (and others like it) are temporary. —Locke Cole 13:12, 26 December 2005 (UTC)

For reference, Locke is referring to Bug 539. This template is indeed only temporary; the Dutch Wikipedia only created this CSS-based hack because they wanted a large number of icon-style images on their front page, all linking to portals or entries, rather than the image description pages. – Minh Nguyễn (talk, contribs) 22:56, 26 December 2005 (UTC)

Yes, that's the one. 12 votes so far– anyone even remotely interested in this might consider signing up and voting for this. —Locke Cole 02:25, 27 December 2005 (UTC)

I agree with Netoholic, this is confusing and shouldn't be used. It also seems to fail completely in Safari. SimonP complains that the status quo is contrary and confusing, but it is at least consistent. Adding this template breaks the consistency, making things more confusing. Then it gets worse: because this template fails in some browsers, it makes its effect unpredictable, so editors don't know what other readers will see—there isn't even a warning here, so it's going to fail unexpectadly for most editors. Still worse, the way images work reflects design and policy, and using this template is a way to sneak around Wikipedia's normal restrictions without any votes.

Finally, this is a CSS-based hack, and not an actual linked image, which breaks a priority-one WAI accessibility checkpoint[1] by making the site work differently for users with visual browsers than for users of text-only and screen readers. It creates a link before the image whose text is just three white-space characters. It will likely not appear in most HTML-only browsers, but its effect in all browsers is impossible to predict. Michael Z. 2006-02-12 01:00 Z

Ah, I see this template is on the main page. Nice: completely breaking A, AA, and AAA accessibility on the front page of a "free" and "open" encyclopedia. Michael Z. 2006-02-12 01:09 Z
In Lynx this renders fine, for what it's worth. I'd be interested to hear how it renders in screen readers though (with the understanding that we can't possibly test every software, but getting a general idea would help). Please don't knee-jerk, BTW; unlike WP:AUM, the people here are a lot more thoughtful and generally care about accessibility. —Locke Cole • tc 02:53, 12 February 2006 (UTC)
Not true. Surprisingly, the links render as intended in Lynx, but the "unlinked image" breaks in different ways in both Lynx and Safari. In Safari the example above doesn't show the link cursor, shows a bogus tooltip indicating a link to Template talk:Click, but actually links to Image:Nuvola mimetypes info.png. In Lynx, it just links to Template_talk:Click, with the underscore. This template breaks in different, unexpected ways in different browsers. Editors are being told to expect one thing, but something elso shows up for substantial numbers of readers, probably including users of assistive technology. Broken, broken, broken.
This is what happens when we try to subvert the standards. The general principle behind this hack is to use CSS to change the apparent content of HTML, rather than go through the proper channels to make WikiMedia generate the desired HTML. The underlying concept is flawed, and contrary to the word and spirit of the the HTML and CSS standards and the WAI accessibility guidelines and technical recommendations. The underlying concept breaks A, AA, and AAA accessibility.
Yes, there is an understanding that we can't test in every software. That's why we shouldn't ignore standards this way. If we care so much about accessibility, let's remove and delete this template now, and start a campaign to add linked images to WikiMedia. Michael Z. 2006-02-12 18:10 Z


I don't think it is too bad. Very Many userpages use it, though they put subt and you can't conut them with "What links here". but probably more users will like it. —Argentino (talk/cont.) 21:29, 28 May 2006 (UTC)

[edit] One hundred–pixel restriction

We can lift that 100px restriction on the height or width of an image by changing font-size: 100px; to font-size: {{{height}}}; and line-height: 100px; to line-height: {{{height}}};. I've tested this at the Vietnamese Wikipedia, and it seems to be working just fine. – Minh Nguyễn (talk, contribs) 22:49, 26 December 2005 (UTC)

Nice! Hopefully someone with admin access will modify the template to include this change. —Locke Cole 02:23, 27 December 2005 (UTC)

There is in fact an issue that I'm having a hard time figuring out: the specified link doesn't extend all the way to the right edge of the image, leaving the description page link exposed. I've worked around the problem at vi: with font-size: 1{{{height}}}; and line-height: 100px; to line-height: 1{{{height}}}; (note the extra digit). I'm not sure, however, if this'll cause any serious issues with browsers, since I know that Mozilla on Linux used to crash with very large font sizes. – Minh Nguyễn (talk, contribs) 06:37, 27 December 2005 (UTC)

The width is controlled by two factors: 1) the font size, 2) the characters used. The link is made with the following– [[link|...]], so if for some reason the three periods don't take up all the space, it's possible clicking on the right side of the image to still take you to the image info. You could try working around this by adding more periods (maybe [[link|........]]), or maybe using another character? Perhaps underscores ([[link|________]])? There might be side effects from doing that thought, so be careful. =) —Locke Cole 07:17, 27 December 2005 (UTC)
Actually, the Dutch template originally used underscores, but later changed it to non-breaking spaces (which are invisible to the user) by the time I adapted it for the Vietnamese Wikipedia. I'm not sure exactly why the wub ended up using periods, though. – Minh Nguyễn (talk, contribs) 05:31, 28 December 2005 (UTC)
For some reason I couldn't get the non-breaking spaces to form a link on the English Wikipedia at first so used periods instead. I thought it must have been a difference between the language configurations. But I just went back and tried nbsp again and it worked fine, so it was probably just me making a stupid mistake. the wub "?!" 22:39, 31 December 2005 (UTC)

[edit] Fix for images with more than 100px

This works pretty good with all (major) browsers on de.wikt:

<div style="position: relative; overflow: hidden; width: {{{width}}}; height: {{{height}}}; z-index: 2;">[[Image:{{{image}}}|{{{width}}}]]<div class="nodeco" style="position: absolute; top: 0px; left: 0px; z-index: 3;">[[{{{link}}}|<span style="float: left; width: {{{width}}}; height: {{{height}}}; font-size: {{{height}}}; line-height: {{{height}}}; word-spacing: {{{width}}}; cursor: pointer;">   </span>]]</div></div>

Add to MediaWiki:Common.css:

.nodeco a:hover {text-decoration: none !important}

Best regards, Melancholie 11:41, 31 December 2005 (UTC)

[edit] Titles

Could the titles (that is, the popup hints) that appear over the image be specified in the template somehow? Lupin|talk|popups 14:09, 26 January 2006 (UTC)

Answer: yes. {{titled-click}} Lupin|talk|popups 04:13, 2 February 2006 (UTC)

[edit] Parameters

How is it possible to pass the normal image parameters like 'thumb', align, etc. ?

Poupoune5 19:26, 9 March 2006 (UTC)

[edit] Nominated for deletion

This template was nominated for deletion on 10 March, 2006. The result was no consensus. The archive of the discussion can be found here. Zzyzx11 (Talk) 00:13, 18 March 2006 (UTC)

[edit] A less evil way of achieving the same thing?

Clone the image (foo.png is copied to, say, link-foo.png), and make Image:link-foo.png into a redirect page. Shimmin 12:04, 8 April 2006 (UTC)

If that works, it's a much better idea. Include some info in the redirect image page to indicate the original image? — Omegatron 15:25, 8 April 2006 (UTC)
We used to do that here, but the main problem was that the linked image would actually show up at the top of the destination page (if it was a page at the English Wikipedia). I don't know if that's still an issue. The problem now is that redirects across wikis no longer work. For example, if you were to redirect an image with the code #redirect [[wikt:Main Page]], you'd get end up at the redirect page. But I suppose that wouldn't be as confusing as seeing the image description page, so it might be a good compromise for the sister project links at least. – Minh Nguyễn (talk, contribs) 03:52, 22 May 2006 (UTC)

[edit] This does work in Safari

I noticed the comment on the template page says this does not work in Safari. I am currently using Safari 2.0.3 and it works fine. Could someone change the message? I'll see if I can find some other Mac users and determine what version of Safarai works on it and what doesn't, so maybe it could say it works on Safari X.0 and later or something. -- Ned Scott 03:40, 5 May 2006 (UTC)

Ok, this is odd, the examples on this talk page do not work, but the ones found at User:Nightstallion/linkage work perfectly. -- Ned Scott 03:42, 5 May 2006 (UTC)
Yay, I'm an example. ;) —Nightstallion (?) Seen this already? 23:32, 5 May 2006 (UTC)
The functionality of the template breaks inconsistently. Another reason to avoid using this. Michael Z. 2006-05-22 04:26 Z
Using Firefox 1.5.0.4 (need to upgrade!) on Windows and getting a continuously running script when I click on an image. Let's not use templates that require readers to upgrade their browsers, please. - BT 21:15, 7 June 2006 (UTC)

[edit] Eu InterWiki

Please, add the next interwiki if it is possible: eu:Txantiloi:Lotura iruditik. Thanks.--Berria · (talk) 22:01, 12 July 2006 (UTC)

Done.--Commander Keane 08:20, 16 July 2006 (UTC)

[edit] Better Version

<div style="position:relative; width:{{{width}}}; height:{{{height}}}; overflow:hidden;"><div style="position:absolute; font-size:{{{height}}}; overflow:hidden; line-height:{{{height}}}; letter-spacing:{{{width}}};">[[{{{link}}}|<span title="{{{title|{{{link}}}}}}" style="text-decoration:none;">&nbsp; &nbsp;</span>]]</div>[[Image:{{{image}}}|{{{width}}}|{{{title|{{{link}}}}}}]]</div>

As demonstrated at m:Template:Click.--65.141.141.145 23:49, 14 July 2006 (UTC)

The one at meta works, however, there is something wrong with this version. --DavidHOzAu 06:46, 22 July 2006 (UTC)

Yes, that's why I called this one a "Better Version". I'm not a wikipedian, but I noticed this one is constricted to 100px x 100 px images and its invisible overlay gets underlined in some cases. I cleaned it up some of the css and fixed the aforementioned issues.
Edit: You'll also notice you can title it, obsoleting {{Titled-click}}.--65.147.170.213 21:20, 3 August 2006 (UTC)
It also works in Safari—at least the example on the template page does. –Ian Spackman 21:56, 14 August 2006 (UTC)
Applied. Thanks for the suggestion, and sorry about the long wait. JesseW, the juggling janitor 21:49, 31 August 2006 (UTC)

[edit] Underlining

All images using this template seem to be underlined like normal links, despite the text-decoration: none; -- is this a problem with my own settings? Is there a way to fix this problem? — Dan | talk 05:45, 2 September 2006 (UTC)

See #Fix for images with more than 100px! --84.156.96.213 20:26, 25 October 2006 (UTC)

[edit] Add to category

Could Template:Click be added to Category:Wikipedia workaround templates? It seems to be a textbook example of one.-- kenb215 04:39, 14 September 2006 (UTC)

[edit] Erm... copyright violation central

So, the "issue" that this template "works around" is that images in Mediawiki automatically link to the image description page? Well, except for public domain images and those out of copyright that is a legal requirement. (And, yes, that includes GFDL, a licence under which authors are entitled to receive credit for their work). Of course, everyone using this template is only linking to PD images or otherwise attributes the image, right? --kingboyk 17:25, 12 October 2006 (UTC)

Probably the main use for this template is to make neat clickable icons on userpages for quick links. It souldn't be too big an issue I'd imagine, or there'd be 'regulations' on use (Eek, instruction creep). Certainly most images used in website interfaces don't link to the image (the Wikipedia logo for instance, which links to the main page). Doesn't seem to me like a big issue however, or the template wouldn't exist. Probably not worth fretting about :D Michael Billington (talkcontribs) 11:52, 18 October 2006 (UTC)

[edit] This does not work any more

This does not work on an English Wikipedia page as of December 2006. I have attempted to use this template to links from images at User:PockBot and it does not work - PocklingtonDan 18:59, 4 December 2006 (UTC)

[edit] Nominated for deletion

Yeah, I'm nominating this for deletion. -Amarkov blahedits 01:35, 17 December 2006 (UTC)

This second deletion request was closed as no consensus here. --CBD 23:20, 31 December 2006 (UTC)
It was? — Omegatron 16:21, 1 January 2007 (UTC)
Hrrm? Yes. See the link in my prior note above. --CBD 19:06, 1 January 2007 (UTC)

[edit] Edit request

  1. It works in Safari.
  2. The statement that the template itself breaks accessability criteria is disputed. The arguments should be moved to this talk page with only neutral information on the template page itself.

--GunnarRene 06:26, 15 January 2007 (UTC)

It does not work in all browsers. Thus, it breaks the accessability criterion of working in all browsers. -Amarkov blahedits 06:27, 15 January 2007 (UTC)
We're not going to remove all images, css and javascript though, right? Because lynx doesn't show them? The point here is that essential functionality should not depend on CSS, but it can be used to enhance text links with an image that you can actually click on and get the expected response.--GunnarRene 07:04, 15 January 2007 (UTC)
See also Template:Reflist. You might want to include that one in future deletion discussions. It only works in certain Mozilla versions. --GunnarRene 07:07, 15 January 2007 (UTC)

It doesn't work in all browsers and it breaks accessibility. Neither of those two things is disputed. — Omegatron 14:58, 15 January 2007 (UTC)

It doesn't work in Firefox now, either, at least in the examples used above.—Ryūlóng () 21:46, 15 January 2007 (UTC)
The existence of this discussion makes the second point ipso facto disputed. The related project page also has a dispute tag slapped on it. Not by me. --GunnarRene 05:45, 16 January 2007 (UTC)
 ??? How can you dispute that it breaks accessibility? — Omegatron 15:01, 16 January 2007 (UTC)
Easily, if it's used correctly or if it enforces correct use by its code, then it doesn't break stuff. Believe me, I've been browsing the web with non-CSS 1990s vintage computers, so I know how frustrating it would have been to deal with incorrect use. But now: Imagemap. Yay. (?) :-) --GunnarRene 00:52, 18 January 2007 (UTC)

[edit] Replacement

A potential replacement for this template has been coded into the MediaWiki software. This feature can duplicate the existing functionality of 'Click', always includes a separate clickable icon for the image description page, and even allows different portions of a single image to link to different pages. See ImageMap for details. Hopefully transitioning to this new methodology can be performed carefully and with a minimum of insanity. --CBD 15:03, 17 January 2007 (UTC)

Thankyou to Tim Starling for the new extension. As the person who created this template on the English Wikipedia, or more precisely copied it from other language editions, I fully support changing to the new software based method as quickly and smoothly as possible. This template was only ever intended as a stop-gap solution, mainly for the clickable logos on the Main Page (which have already been changed). As people have pointed out it has a number of problems, and its use has extended far beyond what I originally envisioned. I am keen to help with the transition, and also to explore the new opportunities this extension opens up. the wub "?!" 16:39, 17 January 2007 (UTC)
I am glad that something proper has been implemented. The first attempt at replacing this with the imagemap tag didn't work on any of the pages I viewed, though. — Omegatron 17:25, 17 January 2007 (UTC)
Yes, the 'imagemap' syntax apparently doesn't play well with template parameters... which means that every call to this click template will have to be replaced with the corresponding 'imagemap' logic. --CBD 17:30, 17 January 2007 (UTC)
If that is true, we should immediately introduce a unique template comment in the code for both this and other templates so that we can track it if it's subst'ed. Right? --GunnarRene 00:55, 18 January 2007 (UTC)
After further review I'm afraid 'imagemap' just isn't ready for primetime yet. The fact that it cannot accept parameters or magic words (e.g. {{PAGENAME}} breaks it) means that it can't be used in place of 'click' logic in Template:Portal and the like. The clickable images on the Main Page have been updated to use imagemap and there are other places where it could be implemented, but replacing the thousands of pages currently passing parameters to 'clickable templates' with hard-coded imagemaps just isn't feasible (and would quickly result in chaos as imagemaps for the same location got set to different images/sizes/et cetera on different pages). Hopefully 'imagemap' will be updated to be able to handle parameters and can then be used to phase out other forms of clickable images entirely. --CBD 14:51, 20 January 2007 (UTC)

[edit] Get the story straight

Either the "Use the imagemap feature instead" language should come out; or this template should be tagged with {{Historical}} or TfD'd. — SMcCandlish [talk] [contrib] 17:49, 29 January 2007 (UTC)

{{tdeprecated}} would be a better tag. Polonium 17:01, 31 January 2007 (UTC)
I disagree. The text should absolutely tell people to use ImageMap instead of this. ImageMap can't do everything 'Click' can, but that's not a reason to continue using Click for the things ImageMap can do. --CBD 22:41, 31 January 2007 (UTC)

[edit] Replace

This template should be replaced as fast as possible (once the bug in ImageMap gets fixed, in all places). This CSS hack doesn't work for me in firefox (all the example links point to the image page). Polonium 17:58, 31 January 2007 (UTC)

{{Click-Inline}} works in firefox, but {{click}} doesn't. Polonium 18:01, 31 January 2007 (UTC)
Odd. I've been using 'click' in Firefox just fine for over a year. --CBD 22:37, 31 January 2007 (UTC)

[edit] Template:Click

This should be added to the image. --Indolences 21:36, 7 March 2007 (UTC)

Edit: haha wrong talk page. -Indolences 21:44, 7 March 2007 (UTC)