Extension:External Data/Configuration/en

External Data configuration settings consist of two parts: configuration for data sources and a few other settings.

Data sources
Most of the extension settings regulate calls to /  in standalone mode, or   parser functions in compatibility mode, or the corresponding Lua functions, configuring so called data sources. There are at least two data sources relevant to any parser function call; a more specific data source overriding a more universal one; and the last containing global fallback settings.

Settings for the data sources are stored in the associative array. Its keys are names of data sources and values are arrays containing settings for the data source.

The relevant data sources for the data retrieval parser functions (and their Lua analogues) and the relevant settings are:

Remember that /  in standalone mode or   can replace any of the   parser functions, as well as   can replace any of the   Lua functions.

Any parameter of  can be omitted, provided it is set in the corresponding   array. The obvious exception is the parameter used as the key to : ,  ,  ,  ,  ,   and   (see below).

The parameter  can replace ,  ,  ,  ,   and  , provided that the corresponding   contains all the settings necessary to choose and initialise the proper connector. Furthermore, if the value of  does not contain equal signs,   can be omitted, i.e., this parameter can be passed anonymously.

Any configuration setting can include wildcards surrounded by dollar signs, like this:. These wildcards will be substituted from additional parameters to. The additional parameters should be declared as required or receive a default value in, e.g.:. It is important that a validator is set up for these parameters:. This mechanism allows formation of shell commands used by server-side programs.

With, wiki admin can define hidden data sources, the very nature of which is hidden from wiki user. Example of such a source: Is such a source is defined, the following wikitext will show the SVG code for Israeli flag:

Hidden data sources can only be called with /  in standalone mode, or , or  , not using other specific   functions and there identifiers like  ,  , etc.

The default value for  is:

Other settings
Other settings are: Without the compatibility mode, the only way of accessing external data is the standalone mode of  and. When wikipages are parsed with Parsoid, only the standalone mode or using Lua guarantee that the data is fetched prior to its display, For default values of these three variables refer to the file.
 * — show error message, if an internal variable is not set. Note also, that  allows passing a default/fallback value as its second parameter,
 * switches on the compatibility mode, under which the  data retrival functions are still available, as well as   functions other than.
 * — a set of rules regulating the choice of class to handle connection to a data source depending on parameters of the  working in standalone mode. Injecting a new rule calling a new class extending   allows to add new functionality to this extension,
 * — an additiona set of rules regulating the choice of class to handle connection to a data source depending on the parser function invoked and its parameters in compatibility mode,
 * — a set of rules regulating the choice of text parser to convert text, returned by an external service, to variables. Injecting a new rule calling a new class extending  allows to add new functionality to this extension.