Template:Img: Difference between revisions
From xat wiki
No edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div style="{{#if:{{{inline|}}}|display: inline-block; |}}width:{{{width|275}}}px; {{#if:{{{margin-bottom|}}}|margin-bottom: {{{margin-bottom}}}px|}}" class="thumb {{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1|2}}|ar||{{#ifeq:{{{scalable}}}|no||/*scalable*/}}}} {{#if:{{{inline|}}}||{{{float|right}}}}}t"><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 style="float: right" class="plainlinks">[{{{link|{{{image}}}}}} https:// | <includeonly>{{#ifeq:{{NAMESPACE}}|User|<div style="{{#if:{{{inline|}}}|display: inline-block; |}}padding-right:5px;width:{{{width|275}}}px; {{#if:{{{margin-bottom|}}}|margin-bottom: {{{margin-bottom}}}px|}}" class="thumb {{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1|2}}|ar||{{#ifeq:{{{scalable}}}|no||/*scalable*/}}}} {{#if:{{{inline|}}}||{{{float|right}}}}}t"><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 style="float: right" class="plainlinks">[{{{link|{{{image}}}}}} https://xat.wiki/w/resources/src/mediawiki.skinning/images/magnify-clip-ltr.png]</div>{{{description|}}}</div>|}}</div></div>{{Category|Utilizes Template:Img}}|<div style="background:pink; padding: 3px; border-radius: 3px">Template:Img is only allowed in User: namespace. Use [[File:]] (more on that [https://www.mediawiki.org/wiki/Help:Images here]) or [[Template:Gallery]] on articles instead.</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>https://</nowiki> | <nowiki>{{</nowiki>img|'''image'''=<nowiki>https://</nowiki>xat.wiki/w/images/7/7a/Tempimg1.png|'''float'''=left|'''description'''=A screenshot<nowiki>}}</nowiki> | ||
Will produce: | Will produce: | ||
{{img|image=https://util.xat.com/wiki/images/7/7a/Tempimg1.png|float=left|description=A screenshot}}</noinclude> | {{img|image=https://util.xat.com/wiki/images/7/7a/Tempimg1.png|float=left|description=A screenshot}}</noinclude> |
Latest revision as of 19:28, 31 July 2021
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, left, or none 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://xat.wiki/w/images/7/7a/Tempimg1.png|float=left|description=A screenshot}}
Will produce:
Template:Img is only allowed in User: namespace. Use [[File:]] (more on that here) or Template:Gallery on articles instead.