Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / docs / sitelist.txt
1 This document describes the XML format used to represent information about external sites known
2 to a MediaWiki installation. This information about external sites is used to allow "inter-wiki"
3 links, cross-language navigation, as well as close integration via direct access to the other
4 site's web API or even directly to their database.
5
6 Lists of external sites can be imported and exported using the importSites.php and exportSites.php
7 scripts. In the database, external sites are described by the sites and site_ids tables.
8
9 The formal specification of the format used by importSites.php and exportSites.php can be found in
10 the sitelist-1.0.xsd file. Below is an example and a brief description of what the individual XML
11 elements and attributes mean:
12
13
14 <sites version="1.0">
15 <site>
16 <globalid>acme.com</globalid>
17 <localid type="interwiki">acme</localid>
18 <group>Vendor</group>
19 <path type="link">http://acme.com/</path>
20 <source>meta.wikimedia.org</source>
21 </site>
22 <site type="mediawiki">
23 <globalid>de.wikidik.example</globalid>
24 <localid type="equivalent">de</localid>
25 <group>Dictionary</group>
26 <forward/>
27 <path type="page_path">http://acme.com/</path>
28 </site>
29 </sites>
30
31
32 The XML elements are used as follows:
33
34 * sites: The root element, containing a set of site tags. May have a version attribute with the value 1.0.
35 * site: A site entry, representing an external website. May have a type attribute with one of the following values:
36 ** ''unknown'': (default) any website
37 ** ''mediawiki'': A MediaWiki site
38 * globalid: A unique identifier for the site. For a given site, the same unique global ID must be used across all wikis in a wiki farm (aka wiki family).
39 * localid: An identifier for the site, for use on the local wiki. Multiple local IDs may be assigned to a given site. The same local ID can be used to refer to different sites by different wikis on the same farm/family. The localid element may have a type attribute with one of the following values:
40 ** interwiki: Used as an "interwiki" link prefix, for creating cross-wiki links.
41 ** equivalent: Used as a "language" link prefix, for cross-linking equivalent content in different languages.
42 * group: The site group (e.g. wiki family) the site belongs to.
43 * path: A URL template for accessing resources on the site. Several paths may be defined for a given site, for accessing different kinds of resources, identified by the type attribute, using one of the following values:
44 ** link: Generic URL template, often the document root.
45 ** page_path: (for mediawiki sites) URL template for wiki pages (corresponds to the target wiki's $wgArticlePath setting)
46 ** file_path: (for mediawiki sites) URL pattern for application entry points and resources (corresponds to the target wiki's $wgScriptPath setting).
47 * forward: Whether using a prefix defined by a localid tag in the URL will cause the request to be redirected to the corresponding page on the target wiki (currently unused). E.g. whether http://wiki.acme.com/wiki/foo:Buzz should be forwarded to http://wiki.foo.com/read/Buzz. (CAVEAT: not yet implement, can be specified but has no effect)