Extension:Infobox Data Capture

What can this extension do
Enable typed data storage in a wiki.

Primarily this involves capturing typed data passed to templates, but is more flexible.

Usage
Creates a parser function called #dataentry with two arguments:

|Key1;Value1;1;Value is valid
 * Title: The name of the block of data to be stored. (Usually the template name)
 * Key-value pairs: A '|' deliminated list of key-value pairs separated by ';'.
 * validTag (Optional): Following each key value pair, a number 1=valid, 0=invalid. Non integer values and negative values will be treated as a comment. All information is stored, regardless of value of isValid tag.
 * comment (Optional): Following the valid tag, a comment on the valid tag.
 * Example:
 * Key2;Value2;0;Value is invalid

Data Entry tag example:

Handling Lists
List of values are handled using the #listsplit parser function: Unlike templates, the infobox data capture works with multiple entries with the same key. To handle deliminated lists passed to templates, the #listsplit function creates a key-value pair entry for each list item.

The #listsplit function takes 5 arguments:
 * key - The attribute name for the value list
 * list - The list of values separated by the separator
 * separator - (Optional) The separator used in the list, defaults to ",".
 * validTag- (Optional) The valid tag to be used for the entire list, defaults to 0.
 * comment - (Optional) The comment to be used for the entire list, defaults to "".

NOTE: Only for use within the dataentry parser function. Generates its own opening '|' (or not if no values), for use directly inside #dataentry. See example below.

Examples
The following:

Produces: |synonyms;function;1;All valid names for a function
 * synonyms;foo;1;All valid names for a function
 * synonyms;foobar;1;All valid names for a function
 * synonyms;method;1;All valid names for a function

The following example creates 7 records in the database for the "function" data block: one description record, four valid synonym records and two invalid synonym records. It displays nothing on the page:

Installation
Add the database table `infoboxdata`, move the code to the extensions folder and include the code in LocalSettings.php.

Database Table Addition
Requires one table called _infoboxdata.

Changes to LocalSettings.php
Add the following line: