Difference between revisions of "Template:Img"

From xat wiki
Jump to: navigation, search
(disabling scaling for arabic)
Line 1: Line 1:
<includeonly><div style="width:{{{width|275}}}px; {{#if:{{{margin-bottom|}}}|margin-bottom: {{{margin-bottom}}}px|}}" class="thumb {{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1|2}}|ar||{{#ifeq:{{{scalable}}}|no||scalable}}}} t{{{float|right}}}"><div style="background-color: #f9f9f9; padding: 3px; border: 1px solid #ccc"><div style="padding:0 !important" class="thumbinner plainlinks extimgthumb">[{{{link|{{{image}}}}}} {{{image}}}]</div>{{#if:{{{description|}}}|<div style="font-size: 11px" class="thumbcaption"><div class="magnify plainlinks">[{{{link|{{{image}}}}}} http://util.xat.com/wiki/skins/common/images/magnify-clip.png]</div>{{{description|}}}</div>|}}</div></div>{{Category|Utilizes Template:Img}}</includeonly><noinclude>
+
<includeonly><div style="width:{{{width|275}}}px; {{#if:{{{margin-bottom|}}}|margin-bottom: {{{margin-bottom}}}px|}}" class="thumb {{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1|2}}|ar||{{#ifeq:{{{scalable}}}|no||scalable}}}} t{{{float|right}}}"><div style="background-color: #f9f9f9; padding: 3px; border: 1px solid #ccc"><div style="padding:0 !important" class="thumbinner plainlinks extimgthumb">[{{{link|{{{image}}}}}} {{{image}}}]</div>{{#if:{{{description|}}}|<div style="font-size: 11px" class="thumbcaption"><div class="magnify plainlinks">[{{{link|{{{image}}}}}} https://util.xat.com/wiki/skins/common/images/magnify-clip.png]</div>{{{description|}}}</div>|}}</div></div>{{Category|Utilizes Template:Img}}</includeonly><noinclude>
 
Image thumbnails for external images.
 
Image thumbnails for external images.
  
Line 11: Line 11:
  
 
Example:
 
Example:
<nowiki>{{</nowiki>img|'''image'''=<nowiki>http://</nowiki>i.imgur.com/iwI7tfI.png|'''float'''=left|'''description'''=A screenshot<nowiki>}}</nowiki>
+
<nowiki>{{</nowiki>img|'''image'''=<nowiki>https://</nowiki>i.imgur.com/iwI7tfI.png|'''float'''=left|'''description'''=A screenshot<nowiki>}}</nowiki>
  
 
Will produce:
 
Will produce:
{{img|image=http://i.imgur.com/iwI7tfI.png|float=left|description=A screenshot}}</noinclude>
+
{{img|image=https://i.imgur.com/iwI7tfI.png|float=left|description=A screenshot}}</noinclude>

Revision as of 10:10, 20 July 2016

Image thumbnails for external images.

Attributes:

  • image - direct link to an image you're going to use
  • width - sets the width of an image thumb in pixels, defaults to 275px and should be kept that way, unless the image is smaller than that.
  • float - float right or left, defaults to right (optional)
  • description - short description of the image
  • link - where thumbnail links to, should not be set for regular thumbnails (optional)
  • scalable - value no to prevent image from scaling.

Example: {{img|image=https://i.imgur.com/iwI7tfI.png|float=left|description=A screenshot}}

Will produce:

A screenshot