Расширение:SandboxLink
![]() Статус релиза: стабильно |
|
---|---|
Реализация | Пользовательский интерфейс, MyWiki |
Описание | Adds a link to user's personal sandbox to personal tools menu |
Автор(ы) | Bartosz Dziewoński (Matma Rexобсуждение) |
Последняя версия | Continuous updates |
Политика совместимости | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.25+ |
Изменения в БД | Нет |
Лицензия | MIT License |
Скачать | |
|
|
Quarterly downloads | 70 (Ranked 112nd) |
Переведите расширение SandboxLink, если оно доступно на translatewiki.net | |
Проблемы | Открытые задачи · Сообщить об ошибке |
The SandboxLink extension adds a link to user's personal sandbox to personal tools menu. The sandbox is assumed to exist, or will be created, at a "/sandbox" subpage of user's userpage. The extension accurately reflects the existence of the page (redlink, vs always-a-bluelink in the gadget) which will be useful for bringing it to the attention of newcomers. The extension also keeps the link available on restricted special pages (special:preferences and special:userlogin).
More limited version of this functionality can be achieved with a JavaScript snippet: Snippets/MySandbox . This snippet was previously used as a gadget on many Wikimedia wikis, most of which had it set to default=on. The main disadvantages of the gadget are performance and mis-clicks: Because the snippet only loads after everything else is rendered, it causes a distracting "movement" in the personal bar. This also leads to many mis-clicks, when an editor tries to visit their userpage or usertalkpage, and those links moved just before the click. On the other hand, the disadvantage of the extension is that when installed on a wiki, there is no way for a user to opt out of the sandbox link appearing on the personal toolbar.
Использование
See Help:Extension:SandboxLink.
Установка
- Скачайте и распакуйте файл(ы) в папку с названием
SandboxLink
в вашей папкеextensions/
. - Добавьте следующий код внизу вашего
LocalSettings.php
:wfLoadExtension( 'SandboxLink' );
- Configure as required.
- Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Для использующих MediaWiki 1.24 или более ранние версии:
В приведенных выше инструкциях описывается новый способ установки этого расширения с использованием wfLoadExtension()
.
Если вам нужно установить это расширение на более ранние версии (MediaWiki 1.24 и более ранние), вместо wfLoadExtension( 'SandboxLink' );
, вам необходимо использовать:
require_once "$IP/extensions/SandboxLink/SandboxLink.php";
Настройка
Server-side configuration
This extension provides one configuration option:
$wgSandboxLinkDisableAnon
- (Default:
true
) - Whether to disable the functionality for anonymous users.
On-wiki configuration
The sandbox link generated by this extension can be tweaked by modifying some system messages.
- sandboxlink-subpage-name
- (Default in English: "sandbox", varies per language)
- The name of user's subpage where the sandbox should be created. By default, the page used will be "User:Example/sandbox".
- Set this message to '-' to remove the sandbox link for all users.
- The value in wiki's content language will always be used, regardless of user's chosen language. If you're running a multilingual wiki, this can be overridden with the
$wgForceUIMsgAsContentMsg
MediaWiki configuration setting. - sandboxlink-portlet-label
- (Default in English: "Sandbox", varies per language)
- The label of the link in the user's personal toolbar.
- tooltip-pt-sandbox
- (Default in English: "Your sandbox", varies per language)
- The text contained in the "title" attribute of the link to the sandbox. This text is displayed when the user hovers their mouse over the link.
- sandboxlink-editintro-pagename
- sandboxlink-preload-pagename
- (Default: '-')
- When the sandbox page does not exist, the page title to use for the 'editintro' and 'preload' parameters of the link. See Manual:Parameters to index.php#Options affecting the edit form. Not enabled by default.
См. также
Это расширение используется в одном или нескольких проектах Викимедиа. Вероятно, это означает, что расширение стабильно и работает достаточно хорошо, чтобы использоваться такими сайтами с высоким трафиком. Найдите название этого расширения в файлах конфигурации Викимедиа CommonSettings.php и InitialiseSettings.php, чтобы узнать, где оно установлено. Полный список расширений, установленных на конкретной вики, можно увидеть на странице Special:Version wiki. |
Это расширение включено в следующие пакеты и/или вики-фермы: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |