Extension:Link Attributes/ru

This page is a translated version of the page Extension:Link Attributes and the translation is 11% complete.
Справка по расширениям MediaWiki
OOjs UI icon advanced-invert.svg
Link Attributes
Статус релиза: стабильный
Реализация Функция парсера
Описание Adds support for the rel, rev and class attributes on links
Автор(ы) Toby Inkster, Dennis Roczek, Sam Wilson
Последняя версия 1.1 (2020-02-17)
MediaWiki 1.29+
Изменения БД Нет
Лицензия GNU General Public License 2.0 или позже
Загрузка
Переведите расширение Link Attributes если оно доступно на translatewiki.net

Проверьте использование и версию.

This extension adds support for the rel, rev and class attributes on links:

  • relThe relationship of the linked URL as space-separated link types.
  • revSpecified a reverse link; the opposite of the rel attribute. Deprecated for being very confusing.
  • class – A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements.

Usage

The syntax is a little unorthodox. To set the rel attribute, place one or more tokens in double-parentheses at the end of the link title. e.g.:

  [http://tobyinkster.co.uk/ My website((me home))]

The above would be converted to the following link:

  <a href="http://tobyinkster.co.uk/" rel="me home" class="external">My website</a>

To set the class attribute, the same syntax is used, but tokens which represent classes are prefixed with a dot:

  [http://tobyinkster.co.uk/ My website((me .class1 home .class2))]

Becomes:

  <a href="http://tobyinkster.co.uk/" rel="me home" class="external class1 class2">My website</a>

Similarly, prefixing with a tilde (~) sets the rev attribute.

Tokens may be prefixed by a minus sign (-) to indicate that you don't want to add the token, but remove it. For example:

  [http://tobyinkster.co.uk/ My website((me -.external home))]

Becomes:

  <a href="http://tobyinkster.co.uk/" rel="me home">My website</a>

The "nofollow" rel token is considered untouchable though.

Installation

  • Скачайте и распакуйте файл(ы) в папку с названием Link_Attributes в вашей папке extensions/.
  • Добавьте следующие строки в конец файла LocalSettings.php:
    wfLoadExtension( 'Link_Attributes' );
    
  • Yes Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.

См. также

  • Extension:LinkAttributes a different syntax for adding the attributes.
  • T35886