Difference between revisions of "Template:Image"

From Coastal Wiki
Jump to: navigation, search
Line 2: Line 2:
 
This is a template which allows you to easily include images in the wiki in a predetermined following format.
 
This is a template which allows you to easily include images in the wiki in a predetermined following format.
 
I can be used for both images stored in the wiki as for extenal images
 
I can be used for both images stored in the wiki as for extenal images
 +
 +
== Wiki pictures ==
  
 
For images inside the wiki use the following format
 
For images inside the wiki use the following format
Line 33: Line 35:
 
|wikiimage = Figure_1.jpg
 
|wikiimage = Figure_1.jpg
 
|captionposition = right
 
|captionposition = right
 +
|title = insert text
 
|fontsize = 80
 
|fontsize = 80
 
|caption = Foto: Ignacio Bárbara
 
|caption = Foto: Ignacio Bárbara
Line 38: Line 41:
  
 
<br style="clear:both"/>
 
<br style="clear:both"/>
 +
 +
== External pictures ==
  
 
For images outside the wiki use the following format
 
For images outside the wiki use the following format
Line 47: Line 52:
 
|source= http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg
 
|source= http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg
 
|captionposition = right
 
|captionposition = right
 +
|title = insert text
 
|fontsize = 80
 
|fontsize = 80
 
|caption = Foto: Ignacio Bárbara
 
|caption = Foto: Ignacio Bárbara
Line 60: Line 66:
 
* fontsize: in percentage relative to the normal font-size
 
* fontsize: in percentage relative to the normal font-size
 
* caption: the caption displayed below the image
 
* caption: the caption displayed below the image
 +
* title: the text you would like to have displayed upon hovering above the image
  
 
This code renders the exact same image as the one above.
 
This code renders the exact same image as the one above.
  
  
To position a singe image in the centre use the code:
+
To position a singe image in the center use the code:
 
<pre>
 
<pre>
 
{{Image
 
{{Image
Line 73: Line 80:
 
|fontsize = 80
 
|fontsize = 80
 
|caption = Foto: Ignacio Bárbara
 
|caption = Foto: Ignacio Bárbara
 +
|title = insert text
 
}}
 
}}
 
</pre>
 
</pre>
Line 84: Line 92:
 
|fontsize = 80
 
|fontsize = 80
 
|caption = Foto: Ignacio Bárbara
 
|caption = Foto: Ignacio Bárbara
 +
|title = insert text
 
}}
 
}}
  
 +
<br style="clear:both"/>
 +
 +
== VLIZ picture galery ===
 +
 +
For images from the VLIZ picture galery use the following format
 +
<pre>
 +
{{Image
 +
|position = right
 +
|margin = 5px 5px 5px 5px
 +
|width = 250
 +
|vlizpicid=11482
 +
|captionposition = right
 +
|fontsize = 80
 +
|caption = Foto: Ignacio Bárbara
 +
|title = insert text
 +
}}
 +
</pre>
 +
 +
Parameters:
 +
* "{{Image" calls up the template 
 +
* Position: "left" or "right"
 +
* width: insert the width in px
 +
* vlizpicid: the id of the image in the VLIZ picture gallery
 +
* captionposition: left, right or center
 +
* fontsize: in percentage relative to the normal font-size
 +
* caption: the caption displayed below the image
 +
* title: the text you would like to have displayed upon hovering above the image
 +
 +
this renders
 +
 +
{{Image
 +
|position = right
 +
|margin = 5px 5px 5px 5px
 +
|width = 250
 +
|vlizpicid=11482
 +
|captionposition = right
 +
|fontsize = 80
 +
|caption = Foto: Ignacio Bárbara
 +
|title = insert text
 +
}}
  
  
Line 92: Line 141:
 
<includeonly>
 
<includeonly>
 
<div style="float:{{{position}}};width:{{{width}}}px;margin:{{{margin}}}">
 
<div style="float:{{{position}}};width:{{{width}}}px;margin:{{{margin}}}">
{{#if:{{{source|}}}|<img title="insert text" src="{{{source}}}" style="width:{{{width}}}px"/>|
+
{{#if:{{{source|}}}|<img title="{{{title}}}" src="{{{source}}}" style="width:{{{width}}}px"/>
[[Image:{{{wikiimage}}}|caption|{{{position}}}|{{{width}}}px|]]}}
+
|{{#if:{{{wikiimage|}}}|[[Image:{{{wikiimage}}}|caption|{{{position}}}|{{{width}}}px|]]|
 +
<img title="{{{title}}}" src="http://images.vliz.be/resized/{{{vlizpicid}}}.jpg" style="width:{{{width}}}px"/>
 +
}}}}
 
<div style="text-align:{{{captionposition}}};font-size:{{{fontsize}}}%">{{{caption}}}</div></div>
 
<div style="text-align:{{{captionposition}}};font-size:{{{fontsize}}}%">{{{caption}}}</div></div>
  
 
</includeonly>
 
</includeonly>

Revision as of 13:05, 3 August 2016

This is a template which allows you to easily include images in the wiki in a predetermined following format. I can be used for both images stored in the wiki as for extenal images

Wiki pictures

For images inside the wiki use the following format

{{Image
|position = right
|margin = 5px 5px 5px 5px
|width = 250
|wikiimage = Figure_1.jpg
|captionposition = right
|fontsize = 80
|caption = Foto: Ignacio Bárbara
}}

Parameters:

  • "{{Image" calls up the template
  • Position: "left" or "right"
  • margin: determines the margin between your image and the text. The first value is the margin between the image and the text (or images) above it. The second to the right, the third below and the fourth value the margin between the image and the text (or images) to the left of it.
  • width: insert the width in px
  • wikiimage : provide the name of the wikipage storing the image (not the complete url)
  • captionposition: left, right or center
  • fontsize: in percentage relative to the normal font-size
  • caption: the caption displayed below the image


The code as shown above renders:

Figure 1.jpg
Foto: Ignacio Bárbara



External pictures

For images outside the wiki use the following format

{{Image
|position = right
|margin = 5px 5px 5px 5px
|width = 250
|source= http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg
|captionposition = right
|title = insert text
|fontsize = 80
|caption = Foto: Ignacio Bárbara
}}

Parameters:

  • "{{Image" calls up the template
  • Position: "left" or "right"
  • width: insert the width in px
  • source: provide the url storing the image.
  • captionposition: left, right or center
  • fontsize: in percentage relative to the normal font-size
  • caption: the caption displayed below the image
  • title: the text you would like to have displayed upon hovering above the image

This code renders the exact same image as the one above.


To position a singe image in the center use the code:

{{Image
|margin = 0.4em auto 0.4em auto
|width = 250
|source= http://www.coastalwiki.org/w/images/1/1e/Figure_1.jpg
|captionposition = center
|fontsize = 80
|caption = Foto: Ignacio Bárbara
|title = insert text
}}

which renders

Foto: Ignacio Bárbara



VLIZ picture galery =

For images from the VLIZ picture galery use the following format

{{Image
|position = right
|margin = 5px 5px 5px 5px
|width = 250
|vlizpicid=11482
|captionposition = right
|fontsize = 80
|caption = Foto: Ignacio Bárbara
|title = insert text
}}

Parameters:

  • "{{Image" calls up the template
  • Position: "left" or "right"
  • width: insert the width in px
  • vlizpicid: the id of the image in the VLIZ picture gallery
  • captionposition: left, right or center
  • fontsize: in percentage relative to the normal font-size
  • caption: the caption displayed below the image
  • title: the text you would like to have displayed upon hovering above the image

this renders

Foto: Ignacio Bárbara