Forum:Template Click (clickpic improvement) now in beta testing

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Template Click (clickpic improvement) now in beta testing
Archive
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 6 July 2009 by Calebchiam.

Template:Click

Template:Click should now be working as desired. This template allows you to have an image link to any page on the wiki as opposed to just the image description. With this template, images can be used as navigational tools to direct to related pages. This template allows image resizing and customized alt text for images. These are improved options over Template:Clickpic. Right now this template is adding line breaks before and after the image, which will disturb formating in certain situation. Nesting the template in a table helps work around this issue. This template can be used as follows.

The following code produces
{{Click
|image=Wise Old Man plotting.jpg
|size=200px
|link=Wise Old Man
|title=Sometimes you just have a rough day
}}
Sometimes you just have a rough day

Benefits & Drawbacks

Benefits

  • This template allows you to resize images
  • This template allows you to specify the alt (mouseover) text of an image
  • This template allows you to use just the image name as opposed to the entire URL
  • The wiki recognizes this link when showing what pages use the image (and link to the destination)

Drawbacks

  • This template adds line breaks before and after the image because of a hardcoded <div></div> block that is added
  • DO NOT use this template in your signature because the line breaks may cause formatting problems on the talk pages.
  • DO NOT start replacing every version of clickpic with this, it still needs testing

Feedback

So I'm inviting everyone who is interested to try it out and give feedback and suggestions here. I hope this is helpful and I think we can get it working even better than clickpic. I want to thank Robert Horning for doing the ground work on this template. Without him, I wouldn't have had the faintest clue of where to start. Air rune.png Tollerach hates SoF Fire rune.png 04:28, 19 April 2009 (UTC)

What's the title=Sometimes you just have a rough day line do? I don't see it in effect anywhere. Christine 05:11, 19 April 2009 (UTC)
It appears when you hover your mouse over the image. Dtm142 05:16, 19 April 2009 (UTC)
Won't work for me. I hover it, but it just says "Wise old man." Santa hat.png Powers38 おはようヾ(´・ω・`) 05:19, 19 April 2009 (UTC)
Same. Christine 06:51, 19 April 2009 (UTC)
Some browsers don't show the alt text when you move your mouse over it. It depends on what you're using. I know that Internet Explorer works, but Opera doesn't. Air rune.png Tollerach hates SoF Fire rune.png 05:58, 19 April 2009 (UTC)
It doesn't work in Firefox too.   az talk   06:36, 19 April 2009 (UTC)
Right, that's what I was in. Christine 06:51, 19 April 2009 (UTC)

I've added "align" and "thumb" parameters to the template, making it more useful. I don't know if the align parameter removes the line breaks, but the text seems to flow around the image when "align" or "thumb" is used.   az talk   06:36, 19 April 2009 (UTC)

Does that also come with the "none" parameter. I use that one a lot. Also, the hover does work for me and I am in firefox. 16:44, 19 April 2009 (UTC)

It's a nice improvement, but like Powers and Christine the 'Sometimes you just have a rough day' text doesn't appear for me. Is there a way we can fix this somehow? ~ Fire Surge icon.png Sentry Telos Talk  08:00, 19 April 2009 (UTC)

I've fixed the template so that the alternate HOVER text now appears in Firefox. It should work in all browsers.   az talk   08:31, 19 April 2009 (UTC)
The "none" parameter has been added.   az talk   17:06, 19 April 2009 (UTC)

Works fine for me (using Opera on Vista). Looks quite useful, I can see it being used. Quest.png Gaz Lloyd 7:^]Events!99s 18:51, 19 April 2009 (UTC)

I think this would be a great thing to use on here. Simple to understand. ~MuzTalk 20:13, 19 April 2009 (UTC)

Works for me.  Tien  12:41, 20 April 2009 (UTC)

Many thanks to Az for greatly improving the functionality of the template. That's one of the reasons why I brought this up in YG. I knew more people working on it could figure it out. I did some research and found out how to make it a truly inline template. The only explanation was on the German Wikimedia site and I don't speak German. But with the translation I found out that you can add a line to Common.css to get it working right. The code is as follows:

/* DIVs in ImageMaps inlinen (Vorschlag von Revolus) */
 div.imagemap-inline div { display: inline; }

If its working for everyone I don't see any reason to mess with it, but I just wanted to let you know what I found out. Air rune.png Tollerach hates SoF Fire rune.png 20:29, 20 April 2009 (UTC)