Extension:PageNotice/ru
Appearance
Статус релиза: стабильно |
|
|---|---|
| Реализация | Уведомлять |
| Описание | Lets you define a fixed header or footer message for each page or namespace |
| Автор(ы) | Daniel Kinzler (Duesentriebобсуждение) |
| MediaWiki | 1.29+ |
| Лицензия | GNU General Public License 2.0 или позднее |
| Скачать | |
|
|
| Переведите расширение PageNotice, если оно доступно на translatewiki.net | |
| Проблемы | Открытые задачи · Сообщить об ошибке |
The PageNotice extension provides a way to create a fixed notice message on the top or the bottom of either:
- an entire namespace (by Пространство имён number)
- an individual page (by page name, if the extension is configured to allow it)
Использование
Wiki administrators can define a page notice by creating a new page in MediaWiki namespace following a special page-naming pattern, and then writing the notice in that new page.
- The top notice for pages in namespace NN goes in
[[MediaWiki:top-notice-ns-NN]](where NN is the numeric namespace ID). - The bottom notice for pages in namespace NN goes in
[[MediaWiki:bottom-notice-ns-NN]](where NN is the numeric namespace ID).
If enabled:
- The top notice for page XXX goes in
[[MediaWiki:top-notice-XXX]]. - The bottom notice for page XXX goes in
[[MediaWiki:bottom-notice-XXX]].
Примеры
This will put the phrase: "Welcome to this wiki - you can edit every page!" at the top of every page in the main namespace:
- Create a new page named:
- [[mediawiki:top-notice-ns-0]]
- Add the page contents:
'''Welcome to this wiki - you can edit every page!'''
This will put a blue banner saying "Welcome to this wiki - you can edit every page!" at the bottom of every page in the main namespace:
- Create a new page named:
- [[mediawiki:bottom-notice-ns-0]]
- Add the page contents:
<div style="margin-left: 1em; color: var(--color-base, #202122); background: var(--background-color-content-added, #a3d3ff)">'''''Welcome to this wiki - you can edit every page!'''''</div>
- Результат выглядит так:
- Welcome to this wiki - you can edit every page!
Установка
- Скачайте и распакуйте файл(ы) в папку с названием
PageNoticeв вашей папкеextensions/.
Вместо этого разработчикам и соавторам кода следует установить расширение из Git, используя:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageNotice
- Добавьте следующий код в конце вашего файла LocalSettings.php:
wfLoadExtension( 'PageNotice' );
- Configure as required.
Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Настройка
$wgPageNoticeDisablePerPageNotices- If set to
true, notices on the per-page level are disabled; only namespace level notices will appear. The default value isfalse. - On Wikimedia wikis this is set to
true.
См. также
- Extension:Header_Footer - Provides per-namespace or per-page header & footer inclusion without depending on any other extension.
- Manual:Interface/Sitenotice - The sitewide header notice, a standard MediaWiki feature.
| Это расширение используется в одном или нескольких проектах Викимедиа. Вероятно, это означает, что расширение стабильно и работает достаточно хорошо, чтобы использоваться такими сайтами с высоким трафиком. Найдите название этого расширения в файлах конфигурации Викимедиа CommonSettings.php и InitialiseSettings.php, чтобы узнать, где оно установлено. Полный список расширений, установленных на конкретной вики, можно увидеть на странице Special:Version wiki. |
| Это расширение включено в следующие вики-фермы/хостинги и/или пакеты: |
