Extension:HttpImage

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
HttpLink

Release status: beta

Implementation Parser function
Description Provides a clickable image link using an external image stored in an external site and an article title (which may or may not existin the database).
Author(s) Eric Larcher (derived from work by Jean-Lou Dupont).
Latest version 0.1 })
Latest preview version
MediaWiki 1.8.2, 1.9.3, 1.10, 1.11, 1.12
License No license specified
Download HttpImage.0.1.tar.gz

Translate the HttpImage extension if it is available at translatewiki.net

Check usage and version matrix; code metrics

Provides a clickable image link using an image (accessible through an http:// link) and an article title (which may or may not exist in the database).

The extension also supports the link-less mode thereby enabling a one-stop solution for both link and link-less external image requirements.

Furthermore, the extension also supports events but only on edit protected pages.

This work is derivated from the Extension:ImageLink version 1.7.1

Usage[edit | edit source]

Please use the #httpimg parser function instead of the older #httpimage one.

  • {{#httpimage: http-image-link | page name |alternate text | width | height | border }}
  • {{#httpimg: image=http-image-link [|page=page-to-link-to] [|alt=alternate-text] [|height=height-parameter] [|width=width-parameter] [|border=border-parameter] [|title=title-parameter] [|default-image]}}

See W3Schools on IMG tag for more details.

Link-Less option[edit | edit source]

If no page name is given, then no anchor (i.e. HTML < a> element) will be generated.

Default Image[edit | edit source]

When the parameter image points to a non-existing image, then default parameter (if specified) is used as image page.

List of supported HTML attributes[edit | edit source]

HTML attribute Notes
target e.g. target=_blank for opening link in new window
alt
height value in pixels
width value in pixels
alt
title e.g. for tooltip functionality
border
class

Event Attributes[edit | edit source]

Event attributes supported: onchange, onsubmit, onreset, onselect, onsubmit, onreset, onselect, onblur, onfocus, onkeydown, onkeyup, onkeypress, onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup.

Examples[edit | edit source]

  • {{#httpimage: http://upload.wikimedia.org/wikipedia/commons/5/5d/Crystal_Clear_action_run.png | Category:Extensions | Extension icon | 32 | 32 | 2 }}
  • {{#httpimg: http://upload.wikimedia.org/wikipedia/commons/5/5d/Crystal_Clear_action_run.png| page=Category:Extensions | height=80 | title=Extensions }}

Remarks : As the source image is an external image, whith no metadata stored in a wiki page, we can't specifie image size by using percent value.

Dependency[edit | edit source]

History[edit | edit source]

See Extension:ImageLink version 1.7.1 history


Sites using this extension[edit | edit source]