Template:Widepic: Difference between revisions

From Hydrogenaudio Knowledgebase
(New page: <includeonly><div class="thumb" style="clear: both; border: 0; width:{{{4|100%}}}; max-width:{{#expr:{{str sub|{{{2}}}|0|{{#expr:{{str find|{{{2}}}|px}} -1}}}} + 8}}px; margin-left: auto; ...)
 
No edit summary
 
(34 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="thumb" style="clear: both; border: 0; width:{{{4|100%}}}; max-width:{{#expr:{{str sub|{{{2}}}|0|{{#expr:{{str find|{{{2}}}|px}} -1}}}} + 8}}px; margin-left: auto; margin-right:auto;">
<includeonly><div class="thumb" style="border: 0; width:{{{4|100%}}}; max-width:{{#expr:{{str sub|{{{2}}}|0|{{#expr:{{str find|{{{2}}}|px}} -1}}}} + 8}}px; margin-left: auto; margin-right:auto;">
<div class="overflowbugx" style="overflow:auto;">[[Image:{{{1}}}|{{{2}}}|alt={{{alt||}}}|{{{3|}}}]]</div>{{#if: {{{3}}}|<div class="thumbcaption" style="text-align: center;">{{{3|}}}</div>}}</div></includeonly><noinclude>
<div class="overflowbugx" style="overflow:auto;">[[Image:{{{1}}}|{{{2}}}|alt={{{alt||}}}|{{{3|}}}]]</div></div></includeonly><noinclude>
==Usage==
==Usage==


:<code><nowiki>{{</nowiki>Wide image-noborder|''name''|''image width''|''caption''|''box width''|alt=''alt text''<nowiki>}}</nowiki></code>
:<code><nowiki>{{</nowiki>Widepic|''img url''|''image width''|''caption''|''box width''<nowiki>}}</nowiki></code>


A <code>''caption''</code> option is optional. If the caption contains an equal sign, use the parameter <code>|3=''caption''</code> in the place of <code>|''caption''</code>.
The <code>''box width''</code> option is optional, and if given a value in pixels followed by "px", or a value in percent followed by "%", will set the width of the box to that amount.


The <code>''box width''</code> option is optional, and if given a value in pixels followed by "px", or a value in percent followed by "%", will set the width of the box to that amount.


The <code>''alt text''</code> describes the image's visual appearance to visually disabled readers. Please see [[WP:ALT]] for details.
==ignore this, this caption part doesn't work for whatever reason, even if [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23if it should]==
<nowiki>{{ #if: {{{3|}}} | <div class="thumbcaption" style="text-align:center; font-size: 80%; font-weight: normal;">{{{3}}}</div> |  }}</nowiki>
 
</noinclude>
</noinclude>

Latest revision as of 02:01, 18 April 2010

Usage

{{Widepic|img url|image width|caption|box width}}

The box width option is optional, and if given a value in pixels followed by "px", or a value in percent followed by "%", will set the width of the box to that amount.


ignore this, this caption part doesn't work for whatever reason, even if it should

{{ #if: {{{3|}}} | <div class="thumbcaption" style="text-align:center; font-size: 80%; font-weight: normal;">{{{3}}}</div> | }}