Difference between revisions of "Template:FileCaption/doc"

From WikiCorporates
Jump to navigation Jump to search
m (GrayanOne moved page Template:Img Title/doc to Template:FileCaption/doc without leaving a redirect)
Line 3: Line 3:
  
 
Found [https://www.mediawiki.org/wiki/Template:Image a template], which looks very similar to MediaWiki's [https://www.mediawiki.org/wiki/Template:Image_frame own version].
 
Found [https://www.mediawiki.org/wiki/Template:Image a template], which looks very similar to MediaWiki's [https://www.mediawiki.org/wiki/Template:Image_frame own version].
−
 
−
ToDo: Rename to FileCaption" to denote this template is used with "File:..." syntax.
 
  
 
=== Usage ===
 
=== Usage ===
Line 24: Line 22:
  
 
=== Example ===
 
=== Example ===
−
<pre>{{Img Title|Nuclear-Waste-Low-Level-Site.png|200|137|float=right|border=#a0a0a0|caption=[http://news.bbc.co.uk/ BBC Guide] to UK Nuclear Power{{plink|http://news.bbc.co.uk/}}}}</pre>
+
<pre>{{FileCaption|Nuclear-Waste-Low-Level-Site.png|200|137|float=right|border=#a0a0a0|caption=[http://news.bbc.co.uk/ BBC Guide] to UK Nuclear Power{{plink|http://news.bbc.co.uk/}}}}</pre>
 
Gives:
 
Gives:
−
{{Img Title|Nuclear-Waste-Low-Level-Site.png|200|137|float=right|border=#a0a0a0|caption=[http://news.bbc.co.uk/2/shared/spl/hi/guides/456900/456932/html/nn3page1.stm BBC Guide] to UK Nuclear Power{{plink|http://news.bbc.co.uk/2/shared/spl/hi/guides/456900/456932/html/nn3page1.stm}}}}
+
{{FileCaption|Nuclear-Waste-Low-Level-Site.png|200|137|float=right|border=#a0a0a0|caption=[http://news.bbc.co.uk/2/shared/spl/hi/guides/456900/456932/html/nn3page1.stm BBC Guide] to UK Nuclear Power{{plink|http://news.bbc.co.uk/2/shared/spl/hi/guides/456900/456932/html/nn3page1.stm}}}}
  
 
<includeonly>[[Category:WikiPolitiks templates]]</includeonly>
 
<includeonly>[[Category:WikiPolitiks templates]]</includeonly>

Revision as of 00:05, 21 December 2019

Template which uses MediaWiki's "File:" syntax for images with captions and borders, as an alternative to the not-very-pretty ones that are come built-in. Very similar to Template:img, but only uses uploaded files.
MediaWiki did something similar in 2014, but ditched it due to problems with videos. See Thumbnail style update.

Found a template, which looks very similar to MediaWiki's own version.

Usage

The first 3 parameters are mandatory; all others are optional.
{{FileCaption
|img-name  - filename of the image
|000       - width
|000       - height
|float=    - [none|left|right]. Default is float=right; margin-left=0.5em.
                                If float=right; ml=0.5em.
|ml        - margin-left. No default.
|mr        - margin-right. No default.
|border    - border colour. See ColorBoxes below for some choices.
|caption   - caption
}}

 Dark: #808080   Medium: #a0a0a0   Light: #bebebe 

Example

{{FileCaption|Nuclear-Waste-Low-Level-Site.png|200|137|float=right|border=#a0a0a0|caption=[http://news.bbc.co.uk/ BBC Guide] to UK Nuclear Power{{plink|http://news.bbc.co.uk/}}}}

Gives:

Nuclear-Waste-Low-Level-Site.pngBBC Guide to UK Nuclear Power[1]