Extension:TemplateInfo

From MediaWiki.org
Jump to: navigation, search


MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
TemplateInfo

Release status:Extension status experimental

ImplementationTemplate:Extension#type Tag, API
DescriptionTemplate:Extension#description Defines a tag, <templateinfo>, that templates can use to provide an XML description of themselves
Author(s)Template:Extension#username Yaron Koren, Roan Kattouw
Latest versionTemplate:Extension#version 0.3.1 (July 2010)
MediaWikiTemplate:Extension#mediawiki 1.16.* or greater
LicenseTemplate:Extension#license GPL
Download
ExampleTemplate:Extension#example Demo page for extension
Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit

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

Check usage and version matrix.

TemplateInfo is an extension to MediaWiki that defines a tag, <templateinfo>, that templates can use to provide an XML description of themselves. This extension was developed in 2010 as part of the Wikipedia Usability Initiative, with the intention of using TemplateInfo in order to provide forms to edit template calls within pages. You can read more about the overall project here.

TemplateInfo was created to support a user interface in which each template call within an edit pages is replaced by a small image which, when clicked on, brings up a popup form in which users can edit the template call's rows. Unfortunately, usability testing showed that this interface was confusing to users who wanted to edit that template-based data. Therefore, for the time being the overall project, and the TemplateInfo extension, have been abandoned. However, there's no reason why TemplateInfo can't be used for future template-editing projects.

Download[edit]

The extension can be retrieved directly from Git [?]:

  • Browse code
  • Some extensions have tags for stable releases.
  • Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).

Extract the snapshot and place it in the extensions/TemplateInfo/ directory of your MediaWiki installation.

If you are familiar with git and have shell access to your server, you can also obtain the extension as follows:

cd extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/TemplateInfo.git

Installation[edit]

  • Download and place the file(s) in a directory called TemplateInfo in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/TemplateInfo/TemplateInfo.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage[edit]

<templateinfo>
  <group id="main">
    <param id="author">
      <label>
        <msg language="en">Author</msg>
        ...
      </label>
      <description>
        <msg language="en">The creator of this image; preferably a link to a user page</msg>
        ...
      </description>
    </param>
    <param id="license">
      <label>
        <msg language="en">License</msg>
        ...
      </label>
      <description>
        <msg language="en">The license under which this image will be published</msg>
        ...
      </description>
      <options>
        <option name="CC-by">
          <msg language="en">Creative Commons Attribution</msg>
          ...
        </option>
        <option name="CC-by-sa">
          <msg language="en">Creative Commons Attribution-Share Alike</msg>
          ...
        </option>
      </options>
    </param>
  </group>
</templateinfo>

Author[edit]

TemplateInfo was written by Yaron Koren and Roan Kattouw, and based on planning work also done by Trevor Parscal and Nimish Gautam.

Contributing to the project[edit]

Bugs and feature requests[edit]

Send any bug reports and requests to Yaron Koren, at yaron57 -at- gmail.com.

Contributing patches to the project[edit]

If you found some bug and fixed it, or if you wrote code for a new feature, please create a patch by going to the "TemplateInfo" directory, and typing:

svn diff > descriptivename.patch

Then send this patch, with a description, to Yaron Koren.