Difference between revisions of "Template:Image-png/doc"

From BotE Wiki
Jump to: navigation, search
(new)
 
(Improved parameter explanation)
Line 1: Line 1:
{{See also|T:Image}}
+
{{See also|Template:Image}}
The template '''image-png''' is used for easier image placement of images in non-png formats.
+
The template '''image-png''' is used for easier image placement of images. Especially for images which have the bob format in BotE and the png format in the wiki. Mainly used in other templates.  
The last 3 characters of parameter 1 get replaced by "png".
+
In contrast to the [[T:image|image template]] the last 3 characters of the first parameter get replaced by "png".
 
<pre><nowiki>{{image-png|}}
 
<pre><nowiki>{{image-png|}}
  
Line 8: Line 8:
 
{{image-png||}}</nowiki></pre>
 
{{image-png||}}</nowiki></pre>
  
 +
This template has three parameters separated by a "|" (vertical bar).
  
== Examples ==
+
 
<pre><nowiki>{{image-png|Planets/Han1.boj}}</nowiki></pre>
+
=== First parameter ===
results in:<br />
+
The first parameter is for the image path.
{{image-png|Planets/Han1.boj}}
+
<pre><nowiki>{{image-png|Planets/Han1.bop}}
 +
or
 +
http://birth-of-the-empires.de/wiki_files/Bilder/Planets/Han1.png</nowiki></pre>
 +
result both in:<br />
 +
{{image-png|Planets/Han1.bop}}
 +
 
 +
 
 +
=== Second parameter ===
 +
With the second parameter a wiki link can be added to the image.<br />
 +
<pre><nowiki>{{image-png|Planets/Han3.bop|Main_Page}}</nowiki></pre>
 +
{{image-png|Planets/Han3.bop|Main_Page}}
  
  
With the second parameter a link can be added to the image.<br />
+
=== Third parameter ===
<pre><nowiki>{{image-png|Planets/Han3.boj|Main_Page}}</nowiki></pre>
+
With the third parameter a external link can be added to the image. The second parameter must stay empty.<br />
{{image-png|Planets/Han3.boj|Main_Page}}
+
<pre><nowiki>{{image-png|Planets/Han5.bop||http://hp.birth-of-the-empires.de/}}</nowiki></pre>
 +
{{image-png|Planets/Han5.bop||http://hp.birth-of-the-empires.de/}}

Revision as of 00:20, 6 September 2013

See also: Template:Image

The template image-png is used for easier image placement of images. Especially for images which have the bob format in BotE and the png format in the wiki. Mainly used in other templates. In contrast to the image template the last 3 characters of the first parameter get replaced by "png".

{{image-png|}}

or

{{image-png||}}

This template has three parameters separated by a "|" (vertical bar).


First parameter

The first parameter is for the image path.

{{image-png|Planets/Han1.bop}}
or
http://birth-of-the-empires.de/wiki_files/Bilder/Planets/Han1.png

result both in:


Second parameter

With the second parameter a wiki link can be added to the image.

{{image-png|Planets/Han3.bop|Main_Page}}


Third parameter

With the third parameter a external link can be added to the image. The second parameter must stay empty.

{{image-png|Planets/Han5.bop||http://hp.birth-of-the-empires.de/}}