Extension:MsInsert/ru
![]() Статус релиза: стабильно |
|
---|---|
Реализация | Пользовательский интерфейс |
Описание | Adds a dropdown menu for inserting into the editor the content of certain pages |
Автор(ы) | Martin Schwindl, Martin Keyler |
Поддерживающий(ие) | Sophivorus |
Последняя версия | 3.2 (2020-04-16) |
MediaWiki | 1.21+ |
PHP | 5.3+ |
Лицензия | GNU General Public License 2.0 или позднее |
Скачать | |
|
|
Переведите расширение MsInsert, если оно доступно на 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.
Installation
- Скачайте и распакуйте файл(ы) в папку с названием
MsInsert
в вашей папкеextensions/
. - Добавьте следующие строки в конец файла LocalSettings.php:
wfLoadExtension( 'MsInsert' );
Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Для использующих MediaWiki 1.24 или более ранние версии:
В приведенных выше инструкциях описывается новый способ установки этого расширения с использованием wfLoadExtension()
.
Если вам нужно установить это расширение на более ранние версии (MediaWiki 1.24 и более ранние), вместо wfLoadExtension( 'MsInsert' );
, вам необходимо использовать:
require_once "$IP/extensions/MsInsert/MsInsert.php";
Configuration
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.
Usage
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.