Manual:$wgImportSources/th

From mediawiki.org
This page is a translated version of the page Manual:$wgImportSources and the translation is 7% complete.
Import/Export: $wgImportSources
List of interwiki prefixes for wikis we'll accept as sources for Special:Import
Introduced in version:1.3.0 (r3119)
Removed in version:still in use
Allowed values:Unspecified
Default value:[]

Details

This setting lists allowable "import sources" for interwiki import. It contains interwiki prefixes for wikis from which pages can be imported using Special:Import. Since complete page history can be imported, these wikis should be "trusted".

The transwiki import interface is available to users with the "import" right.

Syntax

$wgImportSources อาจเป็นเรียงเรียบง่ายที่มีค่าตั้งค่าระหว่างวิกิที่มีค่า This example allows import from Wikinews, Wikiquote, Wikipedia, and an additional wiki that has been added to the interwiki map:

$wgImportSources = [
      'wikinews',
      'wikiquote',
      'wikipedia',
      'myotherwiki'
];
เวอร์ชันมีเดียวิกิ:
1.24

For more complex scenarios, a two-level array can be used. Sites can be listed as standalone wikis (like wikispecies in the example below), or they can be listed as projects with a list of subprojects (for example, the Wikipedia project with Czech, English, etc. subprojects).

Note that the subproject prefixes are resolved using the other wiki's interwiki map – so in the example below, wikia would be looked up in your wiki's interwiki map, while the subproject prefix (animanga etc) would be handed off to the wikia site for an additional redirection.

$wgImportSources = [
      'wikipedia' => [ 'cs', 'en', 'fr', 'zh' ],
      'wikispecies',
      'wikia' => [ 'animanga', 'brickipedia', 'desserts' ],
];
เวอร์ชันมีเดียวิกิ:
1.26

For even more advanced scenarios, you can use the ImportSources hook.

See also