Help:KLIcon

Jump to: navigation, search

KLicon is a MediaWiki extension used to insert an image into any article. It differs from the normal method by allowing you to link the image to any URL, or leave it unlinked.

Usage

Use the tag {{#icon:parameters}} with the require parameter image and optional parameters link, width, height, alt, and css.

Supplying width and/or height will cause MediaWiki to produce a thumbnail such that neither of the supplied parameters is exceeded. You might call them “maximum” boundaries. You can also define width and height in the CSS parameter, but this will cause the web browser to download the full-size image and resize it using it's own image algorithms. This is slower and usually produces a visually inferior image.

Example

This code:

{{#icon:
| image =Vogue.jpg
| link  =Gallery
| width =50
| height=50
| alt   =Cat test.
| css   =float:left;border:solid red 1px;padding:10px 5px;
}}

Cat test.will produce the image to the left. It is a thumbnail of Image:Vogue.jpg a maximum dimension of 50. Clicking the icon will take you to my gallery from whence the cat photo came. The CSS styling made the photo float left, added a red border, a small left/right padding and a larger top/bottom padding.

Code

You can see the code here.

 
Personal tools