Extension:MsInsert/pl

From Linux Web Expert

Revision as of 04:54, 6 December 2023 by imported>FuzzyBot (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Podręcznik rozszerzeń MediaWiki
MsInsert
Status wydania: stabilne
Realizacja Interfejs użytkownika
Opis Adds a dropdown menu for inserting into the editor the content of certain pages
Autor(zy) Martin Schwindl, Martin Keyler
Opiekun(owie) Sophivorus
Ostatnia wersja 3.2 (2020-04-16)
MediaWiki 1.21+
PHP 5.3+
Licencja Nie określono
Pobieranie
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Przetłumacz rozszerzenie MsInsert jeżeli jest dostępne na translatewiki.net

The MsInsert extension adds a dropdown menu to the editor (both the WikiEditor and the regular editor) that allows you to insert into the wikitext the content of any wiki page listed in the dropdown menu.

The wiki pages are added to the dropdown menu from LocalSettings.php.

Instalacja

  • <translate> [[<tvar name=2>Special:ExtensionDistributor/MsInsert/pl</tvar>|Download]] and move the extracted <tvar name=name>MsInsert/pl</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
    <translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MsInsert%2Fpl
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    wfLoadExtension( 'MsInsert/pl' );
    
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>

Konfiguracja

To add a page to the dropdown menu, add it to the $wgTemplates array in your LocalSettings.php, like so:

$wgTemplates = [ 'Template:Test', 'Main Page', 'Talk:Main Page' ];

Or alternatively:

$wgTemplates[] = 'Template:Test';
$wgTemplates[] = 'Main Page';
$wgTemplates[] = 'Talk:Main Page';

If the page does not exist yet, then it will not be added to the dropdown menu, even if it's listed in the $wgTemplates array. By default, the array is empty.

Użycie

Once a page has been added to the $wgTemplates, it will appear listed in the dropdown menu whenever you edit a page. By selecting it in the dropdown menu, the extension will fetch its contents and insert them into the wikitext, wherever you had the cursor.

Zobacz też