Extension:UrlGetParameters/ru
![]() Статус релиза: стабильно |
|
---|---|
Реализация | Функция парсера |
Описание | Provides a parser function {{#urlget:...}} which allows access to the URL parameters in your page. |
Автор(ы) | S.O.E. Ansems |
Последняя версия | 1.6.0 (2021-04-16) |
MediaWiki | 1.35+ |
Изменения в БД | Нет |
Лицензия | GNU General Public License 2.0 или позднее |
Скачать | |
|
|
Quarterly downloads | 24 (Ranked 150th) |
Переведите расширение UrlGetParameters, если оно доступно на translatewiki.net | |
Роль Vagrant | urlgetparameters |
The UrlGetParameters extension enables you to use and/or display the "GET" parameters of the URL, i.e. the query string, on the wiki page.
Установка
- Скачайте и распакуйте файл(ы) в папку с названием
UrlGetParameters
в вашей папкеextensions/
. - Добавьте следующий код внизу вашего
LocalSettings.php
:wfLoadExtension( 'UrlGetParameters' );
- Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Usage
To display the value of a URL get parameter in your page, you might do this:
{{#urlget:parameter-name}}
Where parameter-name
is the name of the parameter whose value you want.
If the parameter is not found, the extension will result in nothing.
Alternatively, you can also specify a default value as follows:
{{#urlget:parameter-name|default-value}}
When the parameter parameter-name
is not available, then the value default-value
is returned.
If the URL contains parameters of the form "A[B]=C", you can display the value "C" in a similar way, by calling:
{{#urlget:A[B]}}
Authors
This extension was written by S.O.E. Ansems. Important contributions were made by Ankit Garg and some anonymous editors.
Это расширение включено в следующие пакеты и/или вики-фермы: 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. |