Extension:Semantic Image Input

About
Semantic Image Input allows for automatic adding of images from Wikipedia pages via a Semantic Forms input.

Feature overview

 * Image input that automatically fetches the first image from a Wikipedia page.
 * Wikipedia redirect resolving.
 * Support for multiple instance templates in forms.

Requirements
requires:


 * MediaWiki 1.17 or above
 * Semantic Forms 2.2 or above
 * PHP 5.3 or above

Download
You can find the current version of on the Google Code download page, as well as a list of legacy downloads.

You can get the code directly from SVN. Tags can be obtained via

Where 'version' is the version number of the tag, such as 0_1 (see the available tags). The latest code can be obtained from trunk:

Installation
Once you have downloaded the code, place the SemanticImageInput directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

You will also need to enable instant commons for the embedding of images to work. This can be done with:

Beware that in recently installed MediaWikis, this setting might already be present, in which case you should make sure it's set to true instead of adding another copy.

Configuration
Configuration of is done by assigning to $egSIISettings in your LocalSettings.php file. The options are listed below and their default is set in the settings file. You should NOT modify the settings file, but can have a look at it to get an idea of how to use the settings, in case the below descriptions do not suffice.

Example of how to change a setting:

Available settings:

Usage
The input added by this extension is called "instantimage" and it has 2 modes, which can be chosen using the "type" parameter.

Page mode
In page mode, the input will pull an image from the Wikipedia page with the same name as the page being edited or created.

Item mode
Item mode is for in multiple instance templates. The input will find the first input in the multiple instance template, and on every change of the value in this input, look up a corresponding image.

Form example
Example of a form with an input in page mode and one in item mode:

Description:

Image:

Authors
Name:

Image:

No image shows
When there is no matching Wikipedia article, or the matching article has no images, no image will be shown. Furthermore, only images under open licences that can be found on Wikimedia Commons will be shown. In case the first image of a Wikipedia article is not under such a licence, but used under fair usage policy, it will not be shown.

Version
This is a copy of the release notes file on SVN, which might be more up to date then this page.

Version 0.1
2011-11-10


 * Image input that automatically fetches the first image from a Wikipedia page.
 * Wikipedia redirect resolving.
 * Support for multiple instance templates in forms.

Internationalization
is fully internationalized. Translation of messages is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.

Authors
has been written by Jeroen De Dauw.