Справка:Ссылки сюда

From mediawiki.org
This page is a translated version of the page Help:What links here and the translation is 49% complete.
Outdated translations are marked like this.
PD Примечание: Редактируя эту страницу, вы соглашаетесь на передачу своего вклада по лицензии CC0.
Подробнее — в проекте Помощь с общественным достоянием.
Некоторые старые изменения для этой страницы были импортированы под лицензией CC BY-SA. Только новые вклады находятся в общественном достоянии (ОД).
PD

В боковом меню каждой страницы присутствует ссылка с названием «Ссылки сюда» (или, в общем случае, с названием, определённым в MediaWiki:Whatlinkshere), также называемая обратной ссылкой.

Обзор

Инструмент Ссылки сюда перечисляет страницы на том же сайте, имеющие ссылки на данную страницу, во всех или уже указанных пространствах имён. Чтобы получить эту информацию, нажмите на пункт Ссылки сюда при чтении любой страницы. Будут перечислены страницы, ссылающиеся на страницу и/или включающие её. Список отсортирован по идентификатору страницы, т.е. в соответствии со временем создания.[1]

Информация берётся из таблиц pagelinks и templatelinks . Страницы, включающие данную, отмечаются содержимым сообщения MediaWiki:Istemplate («включение»); если они также ссылаются на данную страницу, это игнорируется. См. m:Query#backlinks.

Список ссылок на статью может быть полезен во множестве случаев:

  • Он даёт очень грубое представление о популярности страницы. Страницы с большим количеством ссылок скорее будут часто просматриваться, поэтому должны быть высокого качества. Страницы с малым количеством ссылок или без ссылок могут быть непопулярны.
  • Если предмет статьи неясен, набор ссылающихся статей может дать полезный контекст. Например, дана заготовка статьи под названием John Smith, в которой указаны только даты жизни, но по ссылкам сюда можно понять, что этот человек — олимпийский чемпион.
  • Способствует правильному разрешению неоднозначностей.

Инструмент также работает для несуществующих страниц, что может быть очень полезно при их создании. Ссылка Ссылки сюда также располагается на странице редактирования при переходе по битой ссылке. Так, например, если статья о фильме ссылается на актёров, читатель может найти список фильмов, где актёр играл, даже если статьи о самом актёре ещё нет.

Чтобы вызвать список Ссылки сюда напрямую, используйте, например

[[w:Special:Whatlinkshere/John Smith|w:Special:Whatlinkshere/John Smith]]

что даёт w:Special:Whatlinkshere/John_Smith.

Ограничения и способы их обхода

Отсутствуют в списке:

Попадают в список:

  • страницы, в которых используется функция парсера #ifexist в отношении данной (см. bug 12019)

Если ссылка ведёт на раздел или якорь, точная цель не указывается. Кроме того, «Ссылки сюда» не могут сформировать список ссылок на конкретный раздел/якорь.[2] These features are provided by Linksearch after adding a "hidden external link".

Альтернативы:

При желании, секцию можно разделить. Содержимое будет отображаться на оригинальной странице, если включить туда новую. В качестве альтернативы или подготовки к разделению вместо создания ссылки на раздел, можно создать ссылку на перенаправление, ведущее на раздел. The list of backlinks of the full page is now sorted by exact target, though not listing the names of the target sections but the names of the redirect pages. This also makes it easier to keep the links working when changing the name of a section: only the target of the redirect page has to changed, not the source pages of the links. Note that the redirect message is at the top of the whole page, so typically not visible at the target position. This may be an advantage (the disadvantage of the redirect message cluttering the target is minimal) or a disadvantage. To see the name of the page without scrolling up, note that the browser usually shows it in the window title at the very top, while the address bar shows the name of the redirect page with the name of the section on the target page. See also Help:Section linking and redirects (this link itself is also an example of what has been described).

Also note that if a page's links change due to a change in the template, the backlinks for that page are not updated immediately, but via the job queue.

Перенаправления

The backlinks feature shows which backlinks are redirects.

The backlinks of the redirect are also shown indented under the redirect, and if they include a redirect, the backlinks of that also (not more).

This makes it a useful tool for finding double redirects, which do not work, and, except in special applications (see below) can better be replaced by redirects to the final target.

Cases of inclusion

Whether there is a link from A to C is relevant for backlinks as well as Related changes. If C does not exist, only backlinks are applicable.

  • Inclusion is listed as such.
  • A link from A to C counts as such even if the link is not explicit in the wikitext of A, but due to the inclusion of B, which links to C.
  • If A calls B and there is a link in B to C within noinclude tags then B links to C, but A does not.
  • If A calls B and there is a link in B to C within includeonly tags then A links to C, but B does not.
  • If A calls B and B links to a page C that depends on a variable or parameter, then:
    • The question whether A links to C depends on the value of the variable on page A, or the parameter with which A calls B.
    • The question whether B links to C depends on the value of the variable on page B; in the case of a parameter, considered from page B, the page may e.g. not call a valid page name (because it calls one with a name with braces), so B does not link to any valid C, or a name depending on the default value of the parameter.

Thus a link from A to C may be due to the inclusion of B, even when B, considered by itself, does not link to C. Thus, to find out what templates cause pages to link to C, it is not sufficient to check for templates in the backlinks of C.

If some pages link to C due to the inclusion of B, it is more convenient if B is in the list of backlinks of C. One can assure this by putting an appropriate example of usage of B on page B, inside noinclude tags (B includes B, but without recursion).

Otherwise a page like B, which causes pages which include B to link to C, can only be found by looking for pages which directly or indirectly are included in these backlink pages of C.

Примеры:

Related changes of Help:What links here, What links to Template:H:f Help This page is therefore a backlink of the latter, but Template:H:f is not listed.

Even without a template name depending on a variable or parameter, if page A links to page C due to the inclusion of template B1 which redirects to B2, which links to C, A is in the list of backlinks of C but B1 is not.

Summarizing, for the purpose of backlinks and Related changes, A links to C if there is, in that order, a chain of template calls, a single redirect, template calls, a single redirect, etc., template calls, and a chain of redirects.

If a page is conditionally embedded through #if, #ifeq, #ifexist, #ifexpr, or #switch, it is counted as embedded, even if the condition is not fulfilled

If on page A the name of an embedded page is time-dependent, e.g. {{abc{{CURRENTDOW}}}}, currently giving Template:Abc5, the "Ссылки сюда" list of one of the possibly embedded pages shows page A: the current one, or, depending on caching issues, perhaps an older one.

Thus, although the same functionality is obtained with {{#switch:{{CURRENTDOW}}|0={{abc0}}|1={{abc1}}|..}}, these methods differ in whether the seven templates all count as embedded, or just one.

In the case of an image, using it in a page is listed in the third section of the image description page, but not in "Ссылки сюда" of that page

Пользовательские стили оформления

Тело страницы имеет селектор body.mw-special-Whatlinkshere, поэтому вы можете использовать стили CSS

body.mw-special-Whatlinkshere ul { list-style: decimal }

для нумерации обратных ссылок.

Order; query

Ссылки сюда сортирует по идентификатору страницы, т.е. в соответствии со временем создания.

Comparison with m:Query#backlinks and m:Query#embeddedin:

Продемонстрированы следующие различия:

  • Query sorts by function first (backlinks and inclusions), then by page id, "what links here" sorts by page id.
  • Query distinguishes between B being only included in A, and B also being linked from A.
  • Query does not indicate which backlinks are redirects, and does not include their backlinks.
  • Query provides page ids.

Другое различие:

  • Query allows restriction to a specified namespace.

{{#dpl:linksto = pagename}} using Extension:DynamicPageList , produces backlinks sorted in alphabetic order. Также доступны другие опции сортировки.

In-page list of backlinks

Все ссылки на страницу могут быть отображены непосредственно на странице, если включить туда "Special:Whatlinkshere"; см. Справка:Включение .

Также это можно сделать с помощью любого из расширений Extension:DynamicPageList .

Два расширения, Расширение:Semantic MediaWiki и Расширение:Cargo , могут использоваться для получения более подробных списков ссылок, сгруппированных по указанному взаимоотношению между двумя страницами, но это доступно только для отношений, закодированных с помощью этих расширений.

Поиск внешних ссылок на страницу

Для заданной исходной вики можно найти внешние ссылки для любого URL с помощью Special:Linksearch (если этот инструмент установлен). Thus, in particular, we can find e.g. pages on the English Wikipedia having an external link to this page or even to an old version, an edit or history page, etc. (provided that the parameter "title" comes first): [1] [2]

Для интервики-ссылок подобного инструмента нет. Это может случить причиной для того, чтобы отдать предпочтение стилю ссылок по URL.

Limitations

  1. The special page doesn't account for External links within the same wiki.
  2. The special page doesn't account for Interwiki_links .

Примечания

См. также