Extension:HttpImage

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
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).
Last version 0.1
MediaWiki 1.8.2, 1.9.3, 1.10, 1.11, 1.12
License No license specified
Download HttpImage.0.1.tar.gz
Check usage and version matrix

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

Contents

Usage [edit]

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]

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

Default Image [edit]

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]

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]

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

Examples [edit]

  • {{#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]

History [edit]

See Extension:ImageLink version 1.7.1 history


Sites using this extension [edit]