Difference between revisions of "Template:Navimg"

From Worms Knowledge Base

Jump to: navigation, search
(new template code (for MediaWiki 1.14+))
m (Reverted edits by Explorer09 (talk) to last revision by CyberShadow)
Line 1: Line 1:
<includeonly>[[File:{{{image|{{{1}}}}}}{{#if:{{{size|}}}{{{xsize|}}}{{{width|}}}{{{4|}}} | {{!}}{{{size|{{{xsize|{{{width|{{{4}}}}}}}}}}}}px }}
+
{{#if:{{{inline|}}}|<span /><div class="imagemap-inline" style="display:inline;">}}{{#tag:imagemap|
{{#if:{{{link|}}}{{{2|}}} | {{!}}link={{{link|{{{2}}}}}} }}
+
Image:{{{image|{{{1}}}}}}{{#if:{{{size|}}}{{{xsize|}}}{{{width|}}}{{{4|}}}|{{!}}{{{size|{{{xsize|{{{width|{{{4}}}}}}}}}}}}px}}{{!}}{{{Alt|{{{tooltip|{{{3|{{{link|{{{2|&nbsp;}}}}}}}}}}}}}}}
|alt={{{alt|{{{tooltip|{{{3|{{{link|{{{2|}}}}}}}}}}}}}}}
+
{{#if:{{{link|}}}{{{2|}}}
|{{{tooltip|{{{3|{{{link|{{{2}}}}}}}}}}}}]]</includeonly><noinclude>__NOTOC__
+
|
===Usage===
+
default {{#switch: {{#titleparts:{{{link|{{{2}}}}}}|1|1}}
<nowiki>{{</nowiki> Navimg<br/>
+
|Http:|Https:|Ftp:|Ftps: = [{{{link|{{{2}}}}}} {{{tooltip|{{{link|{{{2}}}}}}}}}]
| image (1) = ''file.png''<br/>
+
|#default = [[{{{link|{{{2}}}}}}|{{{tooltip|{{{link|{{{2}}}}}}}}}]] }}
| link (2) = ''image link'' (e.g. ''[[Main Page]]'' (internal link) or ''http://worms2d.info/'' (external link))<br/>
+
desc {{{desc|none}}}
| tooltip (3) = ''tooltip''<br/>
+
}}
| size (4) / xsize / width = ''image size'' (e.g. ''100'' or ''200x150'')<br/>
+
{{{form|}}}
| alt = ''alternate text''<br/>
+
}}{{#if:{{{inline|}}}|</div>}}
<nowiki>}}</nowiki>
+
 
+
<nowiki>{{ Navimg | image | link | tooltip | size }}</nowiki>
+
 
+
The "image" and "link" parameter are required; the others are optional.
+
 
+
===Notes===
+
* If the "alt" parameter is not specified, the alt text will be the same as the tooltip.
+
* Do not add square brackets in the "link" parameter. (use <code>Main Page</code> instead of <code><nowiki>[[Main Page]]</nowiki></code>, for example)
+
* The equal sign "<code>=</code>" in URLs '''must be escaped with <code>&#123;&#123;=&#125;&#125;</code>''' if used in the unnamed parameter. For example: <code>&#123;&#123;navimg|Wkblarge.png|<nowiki>http://worms2d.info/?title</nowiki>'''&#123;&#123;=&#125;&#125;'''Main_Page&#125;&#125;</code></noinclude>
+

Revision as of 10:08, 19 September 2010

Error: Must specify an image in the first line.

Personal tools