Diferenças entre edições de "Predefinição:Click-Inline"

Da Thinkfn

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home1/thinkfnw/public_html/wiki/includes/diff/DairikiDiff.php on line 390
Linha 1: Linha 1:
This template causes an image to link to a specified page when clicked, rather than its image description page. It doesn't generate a new paragraph (newline), eg. can be used inline in text. 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, [[Template:Click|Click]]. It does practically the same as Click-Inline, but it generates a new paragraph (newline). For more information see [[Template_talk:Click|Discussion on Click]].
+
<includeonly><span style="position:relative; overflow:hidden; width:{{{width}}}; height:{{{height}}}; z-index:2;">[[Image:{{{image}}}|{{{width}}}]]<span style="position:absolute; top:0; left:0; padding-top:3px; z-index:3;">[[{{{link}}}|<span style="float:left; width:{{{width}}}; height:{{{height}}}; font-size:{{{height}}}; line-height:{{{height}}}; word-spacing:{{{width}}}; cursor:pointer;">&nbsp; &nbsp;</span>]]</span></span></includeonly><noinclude>
  
==Syntax==
+
This Template is similar to [[Template:Click]], with the slight difference that it doesn't create a new paragraph (newline). This template is derived from [[:de:Vorlage:Link-Bild-Inline|Vorlage:Link-Bild-Inline]] from the [[:de:|German Wikipedia]].
  
<pre>
+
This template attempts to superimpose an invisible link on an image. It may not work as expected for all browsers, and creates accessibility problems.
{{Click-Inline |
+
| 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)
+
}}
+
</pre>
+
  
==Examples==
+
'''The [[mw:Extension:ImageMap|ImageMap]] extension has been installed on Wikipedia and should be used where possible.''' However ImageMap does not currently work with template parameters, [[Help:Magic words|'magic words']] or anchor links and thus cannot yet replace all uses of this template.
 +
[[de:Vorlage:Link-Bild-Inline]]
 +
[[it:Template:Img-Link]]
 +
[[lb:Template:Link-Bild-Inline]]
 +
[[nds:Vörlaag:Bildlenk]]
 +
[[ksh:Schablon:Link-Bild-Inline]]
  
<pre>
+
</noinclude>
{{Click-Inline |
+
| image = Nuvola apps package network.png
+
| link = :Category:Geography
+
| width = 40px
+
| height = 40px
+
}}
+
</pre>
+
 
+
{{Click-Inline |
+
| image = Nuvola apps package network.png
+
| link = :Category:Geography
+
| width = 40px
+
| height = 40px
+
}}
+
 
+
<pre>
+
{{Click-Inline |
+
| image = Wikinews-logo.svg
+
| link = n:Main Page
+
| width = 35px
+
| height = 19px
+
}}
+
</pre>
+
 
+
{{Click-Inline |
+
| image = Wikinews-logo.svg
+
| link = n:Main Page
+
| width = 35px
+
| height = 19px
+
}}
+
 
+
==Unlinked image==
+
This template can also be used to produce images that are not clickable, by using as the link parameter:
+
:<nowiki> link = {{FULLPAGENAME}}</nowiki>
+
The cursor can also be changed to appear normal when over the image by using styles
+
 
+
<pre>
+
<div style="cursor:default;">
+
{{Click-Inline |
+
| image = Nuvola mimetypes info.png
+
| link = {{FULLPAGENAME}}
+
| width = 30px
+
| height = 30px
+
}}
+
</div>
+
</pre>
+
 
+
<div style="cursor:default;">
+
{{Click-Inline |
+
| image = Nuvola mimetypes info.png
+
| link = {{FULLPAGENAME}}
+
| width = 30px
+
| height = 30px
+
}}
+
</div>
+

Revisão das 14h09min de 13 de outubro de 2007


This Template is similar to Template:Click, with the slight difference that it doesn't create a new paragraph (newline). This template is derived from Vorlage:Link-Bild-Inline from the German Wikipedia.

This template attempts to superimpose an invisible link on an image. It may not work as expected for all browsers, and creates accessibility problems.

The ImageMap extension has been installed on Wikipedia and should be used where possible. However ImageMap does not currently work with template parameters, 'magic words' or anchor links and thus cannot yet replace all uses of this template. de:Vorlage:Link-Bild-Inline it:Template:Img-Link lb:Template:Link-Bild-Inline nds:Vörlaag:Bildlenk ksh:Schablon:Link-Bild-Inline