Difference between revisions of "Reference:ContentTransfer"
(Tag: Visual edit) |
Extension: ContentTransfer
Overview | |||
---|---|---|---|
Description: | Copies new or existing wiki pages into a different wiki. (v3.2 and up) | ||
State: | stable | Dependency: | BlueSpice |
Developer: | HalloWelt | License: | GPL v3 |
Type: | Category: | Quality Assurance | |
Edition: | BlueSpice Farm (deactivated) | ||
Features[edit source]
ContentTransfer copies new or existing wiki pages in a different wiki on the same farm.
Usage / Features[edit | edit source]Users Users with the appropriate authorization can copy up to 200 pages per transfer form one from a wiki to the same namespace in of a selected target wiki. This extension usually requires BlueSpice Farm.
Depending on the settings selected on the ContentTransfer special page, the following files are copied:
- the selected wiki pages
- the related category pages
- the book page associated with wiki pages
- the templates associated with wiki pages
- attached files
Technical information[edit | edit source]
Important! The extension is deactivated by default and must first be activated in 060-ContentTransfer under settings.d - or in the LocalSettings.custom.php in the installation folder (not just in a single farm instance):
wfLoadExtension ('ContentTransfer');
Configuration[edit | edit source]
To setup the "Push and Merge" mechanism for wiki instances within the farm you need the following informationThe following information is necessary to transfer content between two wiki instances:
<source-instance-name>
The name
Name of the
Wiki instance that acts as the source of the "push"source wiki. This
must be
is the directory name from /opt/mediawiki/w/_sf_instances/
.
<target-instance-name>
The name
Name of the
Wiki instance that acts as the target of the "push"target wiki. This
must be
is the directory name from /opt/mediawiki/w/_sf_instances/
. It can be extracted from the url of the wiki instance.
<target-instance-label>
The display name for the target wiki. It can contain empty spaces. This information is optional and can be commented out.
<servername>
Server-url
<bot-username-provided>
A user name in the form of <username>@<id>
.
Has to be generated
using
from Special:BotPasswords
When provided with the required information, please open the file . The bot user has to be created in the target wiki.
<bot-password-provided>
The password is created in the wiki and needs to be used in the settings below.
With all this info, open /opt/mediawiki/w/_sf_instances/<source-instance-name>/LocalSettings.custom.php
and add .
Add the following info:
$wgContentTransferTargets['<target-instance-name>'] = [ "url" => "https://<servername>/<target-instance-name>/api.php", "user" => "<username<bot-providedusername-by>provided>", "password" => "<password<bot-providedpassword-byprovided>", "draftNamespace" => "Draft", "pushToDraft" => true, "displayText" => "<target-instance-name>label>", ];
If ContentTransfer is used without the extension MergeArticles, the information about drafts has to be deactivated in the settings block:
# "draftNamespace" => "Draft",
"pushToDraft" => false,
Example:
$wgContentTransferTargets['MeinWiki'] = [
"url" => "http://172.16.200.23/MeinWikiName/api.php",
"user" => "Snow@Schneewittchen",
"password" => "uuicqdv9mubfrepbpqu1bvsl5957cpa9",
# "draftNamespace" => "Draft",
"pushToDraft" => false,
"displayText" => "Mein Wiki",
];
Additional settings:
$wgContentTransferIgnoreInsecureSSL = false; // Ignore invalid SSL certificates (for test systems) $wgContentTransferPageLimit = 200; // Max number of pages to be allowed at one $wgContentTransferOnlyContentNamespaces = true; // Only allow content namespaces to be selected in filters $wgContentTransferAllowTalkNamespaces = false; // Allow talk namespaces to be selected in filters
Rights (permissions)Anforderungen[edit | edit source]
Requirements[edit | edit source]
ContentTransfer requires BlueSpiceFoundation. To merge wiki pages Pages that already exist in the target namespacewiki, can be merged using the extension MergeArticles is necessary.
{{BSExtensionInfobox |desc=Copies new or existing wiki pages into a different wiki. (v3.2 and up) |status=stable |developer=HalloWelt |type=BlueSpice |edition=BlueSpice Farm (deactivated) |active=No |compatible=BlueSpice |category=Quality Assurance |license=GPL v3 }} ContentTransfer copies new or existing wiki pages in a different wiki on the same farm. ==Usage / Features== Users can copy up to 200 pages per transfer form one wiki to the same namespace in a selected target wiki. ==Technical information== ===Configuration=== To setup the "Push and Merge" mechanism for wiki instances within the farm you need the following information: ;<source-instance-name> :The name of the Wiki instance that acts as the source of the "push". This must be Users with the appropriate authorization can copy up to 200 pages per transfer from a wiki to the same namespace of a target wiki. This extension usually requires BlueSpice Farm. Depending on the settings selected on the ContentTransfer special page, the following files are copied: * the selected wiki pages * the related category pages * the book page associated with wiki pages * the templates associated with wiki pages * attached files ==Technical information== {{Box Note|boxtype=important|Note text=The extension is deactivated by default and must first be activated in 060-ContentTransfer under settings.d - or in the LocalSettings.custom.php in the installation folder (not just in a single farm instance): wfLoadExtension ('ContentTransfer');}} === <span class="mw-headline" id="Konfiguration" style="box-sizing: inherit;">Configuration</span> === The following information is necessary to transfer content between two wiki instances: '''<source-instance-name>''' Name of the source wiki. This is the directory name from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">/opt/mediawiki/w/_sf_instances/</code> ;<target-instance-name> :The name of the Wiki instance that acts as the target of the "push". This must be . '''<target-instance-name>''' Name of the target wiki. This is the directory name from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">/opt/mediawiki/w/_sf_instances/</code> ;<servername> ;<username-provided-by> :<span>. It can be extracted from the url of the wiki instance.</span> '''<target-instance-label>''' The display name for the target wiki. It can contain empty spaces. This information is optional and can be commented out. '''<servername>''' Server-url '''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="2" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-username-provided>''' A user name in the form of <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><username>@<id></code>. Must firstHas to be generated using [https://wiki.hallowelt.com/wiki/Spezial:BotPasswords Special:BotPasswords] on the '''target instance''' ;<password-provided-by> :An automatically generated password of that particular user When provided with the required information, please open the file from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Special:BotPasswords</code> . The bot user has to be created '''in the target wiki'''. '''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="3" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-password-provided>''' The password is created in the wiki and needs to be used in the settings below. With all this info, open <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">/opt/mediawiki/w/_sf_instances/<source-instance-name>/LocalSettings.custom.php</code> and add . Add the following info: <span class="nv" style="box-sizing: inherit;">$wgContentTransferTargets</span><span class="p" style="box-sizing: inherit;">[</span><span class="s1" style="box-sizing: inherit;">'<target-instance-name>'</span><span class="p" style="box-sizing: inherit;">]</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="p" style="box-sizing: inherit;">[</span> <span class="s2" style="box-sizing: inherit;">"url"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<span class="mw-lingo-term" data-lingo-term-id="5e056c500a1c4b6a7110b50d807bade5" data-hasqtip="4" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">https</span>://<servername>/<target-instance-name>/api.php"</span><span class="p" style="box-sizing: inherit;">,</span> <span class="s2" style="box-sizing: inherit;">"user"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<username-provided-by><<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="5" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-username-provided>"</span><span class="p" style="box-sizing: inherit;">,</span> <span class="s2" style="box-sizing: inherit;">"password"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<password-provided-by<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="6" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-password-provided>"</span><span class="p" style="box-sizing: inherit;">,</span> <span class="s2" style="box-sizing: inherit;">"draftNamespace"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"Draft"</span><span class="p" style="box-sizing: inherit;">,</span> <span class="s2" style="box-sizing: inherit;">"pushToDraft"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="k" style="box-sizing: inherit;">true</span><span class="p" style="box-sizing: inherit;">,</span> <span class="s2" style="box-sizing: inherit;">"displayText"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<target-instance-name><target-instance-label>"</span><span class="p" style="box-sizing: inherit;">,</span> <span class="p" style="box-sizing: inherit;">];</span> If ContentTransfer is used without the extension [[:de:Referenz:MergeArticles|MergeArticles]], the information about drafts has to be deactivated in the settings block: # "draftNamespace" => "Draft", "pushToDraft" => false, Example: $wgContentTransferTargets['MeinWiki'] = [ "url" => "<nowiki>http://172.16.200.23/MeinWikiName/api.php</nowiki>", "user" => "Snow@Schneewittchen", "password" => "uuicqdv9mubfrepbpqu1bvsl5957cpa9", # "draftNamespace" => "Draft", "pushToDraft" => false, "displayText" => "Mein Wiki", ]; Additional settings: <span class="nv" style="box-sizing: inherit;">$wgContentTransferIgnoreInsecureSSL</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Ignore invalid SSL certificates (for test systems)</span> <span class="nv" style="box-sizing: inherit;">$wgContentTransferPageLimit</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="mi" style="box-sizing: inherit;">200</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Max number of pages to be allowed at one</span> <span class="nv" style="box-sizing: inherit;">$wgContentTransferOnlyContentNamespaces</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">true</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Only allow content namespaces to be selected in filters</span> <span class="nv" style="box-sizing: inherit;">$wgContentTransferAllowTalkNamespaces</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Allow talk namespaces to be selected in filters</span> ===Rights (permissions)=== ===Requirements=== {{PAGENAME}} requires [[Reference:BlueSpiceFoundation|BlueSpiceFoundation]]. To merge wiki pages <span class="mw-headline" id="Anforderungen" style="box-sizing: inherit;">Anforderungen</span> === ContentTransfer requires [[:de:Referenz:BlueSpiceFoundation|BlueSpiceFoundation]]. Pages that already exist in the target namespace, the extension [[Reference:MergeArticles|MergeArticles]] is necessary. wiki, can be merged using the extension [[:de:Referenz:MergeArticles|MergeArticles]]. [[Category:Extension]]
Line 10: | Line 10: | ||
|license=GPL v3 | |license=GPL v3 | ||
}} | }} | ||
− | + | Users with the appropriate authorization can copy up to 200 pages per transfer from a wiki to the same namespace of a target wiki. This extension usually requires BlueSpice Farm. | |
− | + | ||
− | + | Depending on the settings selected on the ContentTransfer special page, the following files are copied: | |
+ | |||
+ | * the selected wiki pages | ||
+ | * the related category pages | ||
+ | * the book page associated with wiki pages | ||
+ | * the templates associated with wiki pages | ||
+ | * attached files | ||
==Technical information== | ==Technical information== | ||
− | ===Configuration=== | + | {{Box Note|boxtype=important|Note text=The extension is deactivated by default and must first be activated in 060-ContentTransfer under settings.d - or in the LocalSettings.custom.php in the installation folder (not just in a single farm instance): |
− | + | ||
+ | |||
+ | wfLoadExtension ('ContentTransfer');}} | ||
+ | |||
+ | === <span class="mw-headline" id="Konfiguration" style="box-sizing: inherit;">Configuration</span> === | ||
+ | The following information is necessary to transfer content between two wiki instances: | ||
+ | |||
+ | '''<source-instance-name>''' | ||
+ | |||
+ | Name of the source wiki. This is the directory name from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">/opt/mediawiki/w/_sf_instances/</code> . | ||
+ | |||
+ | '''<target-instance-name>''' | ||
+ | |||
+ | Name of the target wiki. This is the directory name from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">/opt/mediawiki/w/_sf_instances/</code> <span>. It can be extracted from the url of the wiki instance.</span> | ||
+ | |||
+ | '''<target-instance-label>''' | ||
− | + | The display name for the target wiki. It can contain empty spaces. This information is optional and can be commented out. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | '''<servername>''' | |
− | <span class="nv">$wgContentTransferTargets</span><span class="p">[</span><span class="s1">'<target-instance-name>'</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span> | + | |
− | <span class="s2">"url"</span> <span class="o">=></span> <span class="s2">"https://<servername>/<target-instance-name>/api.php"</span><span class="p">,</span> | + | Server-url |
− | <span class="s2">"user"</span> <span class="o">=></span> <span class="s2">"<username-provided | + | |
− | <span class="s2">"password"</span> <span class="o">=></span> <span class="s2">"<password-provided | + | '''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="2" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-username-provided>''' |
− | <span class="s2">"draftNamespace"</span> <span class="o">=></span> <span class="s2">"Draft"</span><span class="p">,</span> | + | |
− | <span class="s2">"pushToDraft"</span> <span class="o">=></span> <span class="k">true</span><span class="p">,</span> | + | A user name in the form of <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);"><username>@<id></code>. Has to be generated from <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">Special:BotPasswords</code> . The bot user has to be created '''in the target wiki'''. |
− | <span class="s2">"displayText"</span> <span class="o">=></span> <span class="s2">"<target-instance- | + | |
− | <span class="p">];</span> | + | '''<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="3" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-password-provided>''' |
+ | |||
+ | The password is created in the wiki and needs to be used in the settings below. | ||
+ | |||
+ | With all this info, open <code style="box-sizing: inherit; font-family: monospace, Courier; font-size: 13.5px; padding: 1px 4px; color: black; background-color: rgb(249, 249, 249); border-radius: 2px; border: 1px solid rgb(221, 221, 221);">/opt/mediawiki/w/_sf_instances/<source-instance-name>/LocalSettings.custom.php</code> . | ||
+ | |||
+ | Add the following info: | ||
+ | <span class="nv" style="box-sizing: inherit;">$wgContentTransferTargets</span><span class="p" style="box-sizing: inherit;">[</span><span class="s1" style="box-sizing: inherit;">'<target-instance-name>'</span><span class="p" style="box-sizing: inherit;">]</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="p" style="box-sizing: inherit;">[</span> | ||
+ | <span class="s2" style="box-sizing: inherit;">"url"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<span class="mw-lingo-term" data-lingo-term-id="5e056c500a1c4b6a7110b50d807bade5" data-hasqtip="4" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">https</span>://<servername>/<target-instance-name>/api.php"</span><span class="p" style="box-sizing: inherit;">,</span> | ||
+ | <span class="s2" style="box-sizing: inherit;">"user"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="5" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-username-provided>"</span><span class="p" style="box-sizing: inherit;">,</span> | ||
+ | <span class="s2" style="box-sizing: inherit;">"password"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<<span class="mw-lingo-term" data-lingo-term-id="fabcaa97871555b68aa095335975e613" data-hasqtip="6" style="box-sizing: inherit; border-bottom: 1px dotted rgb(187, 187, 255); cursor: default;">bot</span>-password-provided>"</span><span class="p" style="box-sizing: inherit;">,</span> | ||
+ | <span class="s2" style="box-sizing: inherit;">"draftNamespace"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"Draft"</span><span class="p" style="box-sizing: inherit;">,</span> | ||
+ | <span class="s2" style="box-sizing: inherit;">"pushToDraft"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="k" style="box-sizing: inherit;">true</span><span class="p" style="box-sizing: inherit;">,</span> | ||
+ | <span class="s2" style="box-sizing: inherit;">"displayText"</span> <span class="o" style="box-sizing: inherit;">=></span> <span class="s2" style="box-sizing: inherit;">"<target-instance-label>"</span><span class="p" style="box-sizing: inherit;">,</span> | ||
+ | <span class="p" style="box-sizing: inherit;">];</span> | ||
+ | If ContentTransfer is used without the extension [[:de:Referenz:MergeArticles|MergeArticles]], the information about drafts has to be deactivated in the settings block: | ||
+ | # "draftNamespace" => "Draft", | ||
+ | "pushToDraft" => false, | ||
+ | Example: | ||
+ | $wgContentTransferTargets['MeinWiki'] = [ | ||
+ | "url" => "<nowiki>http://172.16.200.23/MeinWikiName/api.php</nowiki>", | ||
+ | "user" => "Snow@Schneewittchen", | ||
+ | "password" => "uuicqdv9mubfrepbpqu1bvsl5957cpa9", | ||
+ | # "draftNamespace" => "Draft", | ||
+ | "pushToDraft" => false, | ||
+ | "displayText" => "Mein Wiki", | ||
+ | ]; | ||
Additional settings: | Additional settings: | ||
− | <span class="nv">$wgContentTransferIgnoreInsecureSSL</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span> <span class="c1">// Ignore invalid SSL certificates (for test systems)</span> | + | <span class="nv" style="box-sizing: inherit;">$wgContentTransferIgnoreInsecureSSL</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Ignore invalid SSL certificates (for test systems)</span> |
− | <span class="nv">$wgContentTransferPageLimit</span> <span class="o">=</span> <span class="mi">200</span><span class="p">;</span> <span class="c1">// Max number of pages to be allowed at one</span> | + | <span class="nv" style="box-sizing: inherit;">$wgContentTransferPageLimit</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="mi" style="box-sizing: inherit;">200</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Max number of pages to be allowed at one</span> |
− | <span class="nv">$wgContentTransferOnlyContentNamespaces</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span> <span class="c1">// Only allow content namespaces to be selected in filters</span> | + | <span class="nv" style="box-sizing: inherit;">$wgContentTransferOnlyContentNamespaces</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">true</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Only allow content namespaces to be selected in filters</span> |
− | <span class="nv">$wgContentTransferAllowTalkNamespaces</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span> <span class="c1">// Allow talk namespaces to be selected in filters</span> | + | <span class="nv" style="box-sizing: inherit;">$wgContentTransferAllowTalkNamespaces</span> <span class="o" style="box-sizing: inherit;">=</span> <span class="k" style="box-sizing: inherit;">false</span><span class="p" style="box-sizing: inherit;">;</span> <span class="c1" style="box-sizing: inherit;">// Allow talk namespaces to be selected in filters</span> |
− | |||
− | |||
− | === | + | === <span class="mw-headline" id="Anforderungen" style="box-sizing: inherit;">Anforderungen</span> === |
− | + | ContentTransfer requires [[:de:Referenz:BlueSpiceFoundation|BlueSpiceFoundation]]. Pages that already exist in the target wiki, can be merged using the extension [[:de:Referenz:MergeArticles|MergeArticles]]. | |
[[Category:Extension]] | [[Category:Extension]] |