Template:Click/doc: Difference between revisions

From FamilySearch Wiki
(remove instructions; mark deprecated and link to File syntax help)
(Clean up)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{documentation subpage}}  
{{documentation subpage}}  


'''Using this template is deprecated because regular File syntax is equivalent''': <nowiki>[[File:Example.jpg|link=Link title]]</nowiki> will just work the same as <nowiki>{{Click|image=File:Example.jpg|link=Link title}}</nowiki>.  
The template {{tl|Click}} should be deprecated due to the Rich Text Editor removing parameter. Otherwise, we would use [[wikipedia:Extended%20image%20syntax|<nowiki>[[File:Example.jpg|link=Link title]]</nowiki>]] instead.  


See [[Help:Images]] for more information on using the File syntax.
This template links an image to a page other than its image description page. It has been updated to avoid the accessibility problems caused by an earlier version. '''Using this template is deprecated to new wiki syntax''': <nowiki>[[File:Example.jpg|link=Link title]]</nowiki> will just work the same as {{tlx|Click|image=File:Example.jpg|link=Link title}}.  


There shouldn't be any [https://www.familysearch.org/wiki/en/index.php?title=Special%3AWhatLinksHere&limit=500&target=Template%3AClick&namespace=2&invert=1 pages using this template].
== Prerequisites  ==


<includeonly>
*MediaWiki 1.14 ([http://www.mediawiki.org/wiki/Special:Code/MediaWiki/41789 Rev:41789]) or later
 
== Usage  ==
 
To use this template, simply copy the text below and replace the text between the &lt;...&gt; with the desired result.
<pre>{{Click
|image  = &lt;image to be linked&gt;
|size  = &lt;size of the image&gt;
|width  = &lt;width of the image&gt; DEPRECATED
|height = &lt;height of the image, optional&gt; DEPRECATED
|link  = &lt;page the image must link to&gt;
|title  = &lt;the label for the image, optional&gt;
|desc  = &lt;location of a description link, optional&gt; DEPRECATED
}}
</pre>
*The <code>image</code> parameter specifies the image to be used. It defaults to [[:Image:Transparent.gif]] when not specified.
*The <code>size</code> parameter specified the maximum size of the image, either in the format <code>«width»x«height»px</code>, <code>«width»px</code>, or <code>x«height»px</code>.
*<s>The <code>width</code> parameter specifies the maximum width the image should be scaled to. It defaults to the default size of the image when not specified. '''Do not add "px" to the value'''.</s> '''DEPRECATED'''
*<s>The <code>height</code> parameter specifies the maximum height the image should be scaled to. It defaults to the default size of the image when not specified. '''Do not add "px" to the value'''.</s> '''DEPRECATED'''
*The <code>link</code> parameter specifies the page to which the image should link. It defaults to the [[Main Page]] when not specified.
*The <code>title</code> parameter specifies text to be used in the tooltip (text which appears on hovering the mouse over the image) and as alternative text if the image fails to load. It is entirely optional, and defaults to the text of the title of the page to which the image links.
*<s>The <code>desc</code> parameter specifies a location where an icon linking to the description page for the image can be placed. It is entirely optional, and can take any of the following values: <code>top-right</code>, <code>bottom-right</code>, <code>bottom-left</code>, <code>top-left</code>, or <code>none</code> to disable it completely. It defaults to <code>none</code> when not specified.</s> '''DEPRECATED'''
 
<br> <includeonly>
<!--Categories-->
<!--Categories-->
<!--[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]-->
<!--[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]-->

Revision as of 20:48, 8 March 2010

The template {{Click}} should be deprecated due to the Rich Text Editor removing parameter. Otherwise, we would use [[File:Example.jpg|link=Link title]] instead.

This template links an image to a page other than its image description page. It has been updated to avoid the accessibility problems caused by an earlier version. Using this template is deprecated to new wiki syntax: [[File:Example.jpg|link=Link title]] will just work the same as {{Click{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}.

Prerequisites[edit source]

Usage[edit source]

To use this template, simply copy the text below and replace the text between the <...> with the desired result.

{{Click
|image  = <image to be linked>
|size   = <size of the image> 
|width  = <width of the image> DEPRECATED
|height = <height of the image, optional> DEPRECATED
|link   = <page the image must link to>
|title  = <the label for the image, optional>
|desc   = <location of a description link, optional> DEPRECATED
}}
  • The image parameter specifies the image to be used. It defaults to Image:Transparent.gif when not specified.
  • The size parameter specified the maximum size of the image, either in the format «width»x«height»px, «width»px, or x«height»px.
  • The width parameter specifies the maximum width the image should be scaled to. It defaults to the default size of the image when not specified. Do not add "px" to the value. DEPRECATED
  • The height parameter specifies the maximum height the image should be scaled to. It defaults to the default size of the image when not specified. Do not add "px" to the value. DEPRECATED
  • The link parameter specifies the page to which the image should link. It defaults to the FamilySearch Research Wiki when not specified.
  • The title parameter specifies text to be used in the tooltip (text which appears on hovering the mouse over the image) and as alternative text if the image fails to load. It is entirely optional, and defaults to the text of the title of the page to which the image links.
  • The desc parameter specifies a location where an icon linking to the description page for the image can be placed. It is entirely optional, and can take any of the following values: top-right, bottom-right, bottom-left, top-left, or none to disable it completely. It defaults to none when not specified. DEPRECATED