Difference between revisions of "Template:Gif image"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (~margin;)
(+a bit more documentation;)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>Corrects the corruption problem with <tt>.gif</tt> images.</noinclude><includeonly>{{#ifeq:{{{2|}}}|thumb|<div style="background:#F9F9F9;border:1px solid #CCCCCC;padding:0.4em;width:{{{width}}}px;float:{{{float|right}}};margin-right=0.8em">|}}
+
{{#ifeq:{{{2|<noinclude>thumb</noinclude>}}}|thumb|<div style="background:#F9F9F9;border:1px solid #CCCCCC;padding:0.4em;width:{{{width}}}px;float:{{{float|right}}};{{{additional css|}}}">|}}
[[File:{{{1|Image needed.svg}}}]]<br/>{{#if:{{{3|}}}{{{thumb|}}}|{{{3|{{{thumb|}}}}}}|}}{{#if:{{{2|}}}|</div>|}}</includeonly><noinclude>
+
[[File:{{{1<noinclude>|Ikes libration.gif</noinclude>}}}]]<br/>{{#if:{{{3|}}}{{{thumb<includeonly>|</includeonly>}}}|{{{3|{{{thumb|<noinclude>One animation that isn't working</noinclude>}}}}}}|}}{{#if:{{{2|<noinclude>thumb</noinclude>}}}|</div>|}}</includeonly><noinclude>[[File:Ikes libration.gif|thumb|How it should work.]]
 +
 
 +
Workaround for the corruption problem with <tt>.gif</tt> images. It should only be applied when a normal inclusion doesn't work. The following template should then be added to the file page:
 +
 
 +
{{Box|type=error|Thumbnails of this image don't render correctly. This is known but unfortunately it is unknown when it gets fixed. See also [[User_talk:N3X15#Gif_thumbnail_animations_aren.27t_working|N3X15's talk page]].}}
 +
 
 +
Code for the box: <pre style="white-space:normal">{{Box|type=error|Thumbnails of this image don't render correctly. This is known but unfortunately it is unknown when it gets fixed. See also [[User_talk:N3X15#Gif_thumbnail_animations_aren.27t_working|N3X15's talk page]].}}</pre>
 +
 
 
== Parameters ==
 
== Parameters ==
 
{{Parameter table|name=text|style=hover|parameters=
 
{{Parameter table|name=text|style=hover|parameters=
Line 8: Line 15:
 
{{Parameter row|width|The width of the picture. You can find it on the file's page. Important if parameter <tt>float</tt> is set as <tt>left</tt> or <tt>center</tt>}}
 
{{Parameter row|width|The width of the picture. You can find it on the file's page. Important if parameter <tt>float</tt> is set as <tt>left</tt> or <tt>center</tt>}}
 
{{Parameter row|float|Set the thumb location. Needs parameter #2 set as <tt>thumb</tt>.|right}}
 
{{Parameter row|float|Set the thumb location. Needs parameter #2 set as <tt>thumb</tt>.|right}}
 +
{{Parameter row|additional css|Adds additional CSS code to the thumb.|Hidden}}
 
}}
 
}}
 
</noinclude>
 
</noinclude>

Latest revision as of 01:26, 31 December 2014

Ikes libration.gif
One animation that isn't working
</includeonly>
How it should work.

Workaround for the corruption problem with .gif images. It should only be applied when a normal inclusion doesn't work. The following template should then be added to the file page:

Thumbnails of this image don't render correctly. This is known but unfortunately it is unknown when it gets fixed. See also N3X15's talk page.
Code for the box:
{{Box|type=error|Thumbnails of this image don't render correctly. This is known but unfortunately it is unknown when it gets fixed. See also [[User_talk:N3X15#Gif_thumbnail_animations_aren.27t_working|N3X15's talk page]].}}

Parameters

Name Optional Description Default
1 No File name. Don't write the File: prefix.
2 Yes If set as thumb, creates a thumb around the image. Hidden
3 Yes Adds text in the thumb. Needs parameter #2 set as thumb. Not set/Hidden
width No The width of the picture. You can find it on the file's page. Important if parameter float is set as left or center
float Yes Set the thumb location. Needs parameter #2 set as thumb. right
additional css Yes Adds additional CSS code to the thumb. Hidden