Extension:HttpImage

From MediaWiki.org

Jump to: navigation, search

         

Manual on MediaWiki Extensions
List of MediaWiki Extensions
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 (derivated from a Jean-Lou Dupont's work).
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 (experimental)

Contents

[edit] Purpose

Provides a clickable image link using an image (accessible through an http:// link) and an article title (which may or may not existin 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

[edit] Usage Note

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

[edit] Usage

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

[edit] Link-Less option

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

[edit] Default Image

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

[edit] List of supported HTML attributes

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

[edit] Event Attributes

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

[edit] Examples

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

[edit] Dependency

[edit] History

See Extension:ImageLink version 1.7.1 history


[edit] Sites using this extension