Template:Click: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
(Now works for images of any height, and widths upto 5 times the height)
(Undo revision 1901380 by Thegeneralbot Seriously? Control your bot.)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><div style="position:relative; width:{{{width}}}; height:{{{height}}}; overflow:hidden"><div style="position:absolute; top:0; left:0">[[Image:{{{image}}}|{{{width}}}]]</div>
<includeonly><div style="display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; height:{{{height}}}; width: {{{width}}}; overflow:hidden; vertical-align:text-bottom">[[Image:{{{image}}}|{{{width}}}|link={{{link}}}|{{{mouseover|{{{link}}}}}}]]</div></includeonly><noinclude>
<div style="position:absolute; top:0; left:0; font-size:{{{height}}}; line-height:1; overflow:hidden">[[{{{link|Example Page}}}|&emsp;&emsp;&emsp;&emsp;&emsp;]]</div></div></includeonly><noinclude>
===Usage===
===Usage===
Give images your own link.
Give images your own link.


*''link'' and ''image'' don't need square brackets.
*''link'' and ''image'' don't need square brackets.
*''height'' and ''width'' must be specified in px and should match the image's size.
*''mouseover'' is optional (and will default to ''link'')
*Warning: This will fail for images over five times wider than they are tall, the link will not extend across the whole way.
 
*Note: Not recommended for signature images, stick with image redirects.
<span style="color:#f00">'''This template is [[wikipedia:deprecated|deprecated]] due to the wiki software update on 2011-04-21.'''</span> <code><nowiki>[[File:Example.jpg|link=Example Page|width=200px|Whatever mouseover text you want]]</nowiki></code> fullfills this function. The template has been simplified to make use of this feature. It is advised to not bother with this template.


===Example===
===Example===
Line 16: Line 15:
  |width=200px
  |width=200px
  |height=150px
  |height=150px
|mouseover=You'll see this when you mouseover the image
}}
}}
</pre>
</pre>
Line 24: Line 24:
  |width=200px
  |width=200px
  |height=150px
  |height=150px
|mouseover=You'll see this when you mouseover the image
}}
}}


[[Category:Utility Templates|{{PAGENAME}}]]</noinclude>
[[Category:Utility Templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 09:51, 5 June 2011

Usage

Give images your own link.

  • link and image don't need square brackets.
  • mouseover is optional (and will default to link)

This template is deprecated due to the wiki software update on 2011-04-21. [[File:Example.jpg|link=Example Page|width=200px|Whatever mouseover text you want]] fullfills this function. The template has been simplified to make use of this feature. It is advised to not bother with this template.

Example

{{Click
 |link=Example Page
 |image=Example.jpg
 |width=200px
 |height=150px
 |mouseover=You'll see this when you mouseover the image
}}

Will produce:

You'll see this when you mouseover the image