Довідка:Посилання

This page is a translated version of the page Help:Links and the translation is 51% complete.
Outdated translations are marked like this.
PD Зверніть увагу! Коли Ви редагуєте цю сторінку, то погоджуєтесь робити свій внесок під ліцензією CC0. Детальніше про умови ліцензії можна дізнатися на сторінці довідки.
PD

В MediaWiki можливі п'ять типів гіпертекстових посилань:

  1. Внутрішні посилання на інші сторінки тієї самої вікі (зазвичай звані «вікіпосиланнями»)
  2. Зовнішні посилання на сторінки інших веб-сайтів
  3. Зовнішні посилання на внутрішні сторінки в тій самій вікі
  4. Інтервікі-посилання на інші веб-сайти, використовуючи спеціальні префікси, зареєстровані заздалегідь
  5. Міжмовні посилання на інші вікі, зареєстровані як різномовні версії поточної вікі

Зверніть увагу, що цей список не включає посилання на категорії та посилання на файли, які використовуються для розміщення сторінок у категорії та відображення зображень чи інших медіафайлів відповідно.

Внутрішні посилання

Щоб створити так зване внутрішнє посилання на сторінку в тій самій вікі («вікіпосилання»), використовуйте вікі-розмітку в подвійних квадратних дужках, [[це посилання]]. Під час попереднього перегляду або збереження змін ви побачите посилання, за яким можна перейти на цільову сторінку. If the page exists the link is displayed in blue (like the word "create" in the first sentence of this paragraph); if the page does not exist, the link appears red (so the [[like this]] link is actually rendered like this). Note that the colors could be different if the color scheme of the wiki has been changed from the default. Following such a "redlink" to a missing page (whether or not it is actually red) will usually enable the user to create the page.

To markup any arbitrary string of text (not necessarily a page title) as a link, use a "vertical bar" or "pipe" character, like this: [[Help:Categories|category links]] results in the link category links.

The first letter of the link target is usually not case-sensitive (unless the wiki is configured otherwise), meaning links can be capitalized or not (so How to contribute and how to contribute are equivalent). However, the case of every subsequent letter must match the target page exactly (so How to contribute and How To Contribute are not equivalent). Spaces in the page title may be represented as underscores (so How to contribute and How_to_contribute are again equivalent), but using underscores in links will make them visible in the page text (but this can be prevented by using a "pipe").

If the page title you are linking to is that of the page you are editing, the result is not a hyperlink at all but simply bold text (for example, on this page the markup [[Help:Links/uk]] gives the result Help:Links/uk). If you're trying to create a wikilink to the current page, you probably want to link to a specific section or to an anchor within the page; see the examples below.

MediaWiki використовує таблицю бази даних pagelinks для відстеження внутрішніх вікіпосилань.

Назва/Опис Синтаксис Результат
Внутрішнє посилання
[[Main Page]]

[[Help:Contents]]

[[Extension:DynamicPageList (Wikimedia)]]

Main Page

Help:Contents

Extension:DynamicPageList (Wikimedia)

«Конвеєрне» (piped) посилання
[[Help:Editing pages|editing help]]

Посилання на розділ або якірець на цільовій сторінці.

[[Help:Editing pages#Preview|previewing]]

Конвеєрне посилання на якір на тій самій сторінці

[[#See also|different text]]

Див. також meta:Help:Piped link.

editing help

previewing

different text

Pipe trick
[[Manual:Extensions|]]

[[User:John Doe|]]

[[Extension:DynamicPageList (Wikimedia)|]]

[[Extension:DynamicPageList (third-party)|]]

The transformation done by the pipe trick can result in the same text for different link targets, as seen in the DynamicPageList examples.

Extensions

John Doe

DynamicPageList

DynamicPageList

Посилання з дописаним кінцем слова
[[Help]]s

[[Help]]ing

[[Help]]ers

[[Help]]almostanylettersyoulikehere

[[Help]]BUTnotalways

Follows so-called "linktrail rules" localised per each language.

Helps

Helping

Helpers

Helpalmostanylettersyoulikehere

HelpBUTnotalways

Уникання посилань з дописаним кінцем слова
[[Help]]<nowiki />ful advice

[[wikipedia:GNU General Public License|GPL]]<nowiki />v3

Helpful advice

GPLv3

Посилання на якір на тій самій сторінці
[[#See also]]

Якорі автоматично забезпечуються для заголовків розділів та верху ([[#top]]) сторінки.

#See also
Встановлення якоря для прийдешніх посилань
<div id="Unique anchor name 1">optional text</div>

<span id="Unique anchor name 2">optional text</span>

Rendered block-level and inline, respectively. Doing this would allow for [[#Unique anchor name 1]] on the same page or [[Help:Links/uk#Unique anchor name 1]] on a different page. Omit the "optional text" for an invisible anchor.

Встановлення якоря у заголовку розділу

==<span id="Alternate Section Title"></span>Section heading==

Note the placement. This must be a "span" tag, not a "div". (Such anchors allow sections to be retitled without breaking incoming links.)

optional text

optional text

Section heading
Посилання на якір з іншої сторінки
[[Help:Images#Supported media types for images]]
Help:Images#Supported media types for images
Посилання на сторінку обговорення поточної статті
[[{{TALKPAGENAME}}|Discussion]]

Див. також Help:Магічні слова#Page names

Discussion
Посилання на підсторінку
[[/example]]

Скорочений запис для [[Help:Links/example|/example]]. Див. також Довідка:Підсторінки .

/example
Посилання на підсторінку без початкової косої риски
[[/example/]]

Скорочений запис для [[Help:Links/example|example]].

example
Link to a subpage of parent page for current page. Can only be used on subpages.
[[../example2]]

Shortcut for [[Help:Links/example2|example2]] if you post the link on [[Help:Links/example|example]] page.

example2
Внутрішнє посилання на сторінку категорії
[[:Category:Help]]

Without the leading colon the link would not be visible and the page would instead be placed into the category; this is a very common mistake. Див. також Довідка:Категорії .

Category:Help
Внутрішнє посилання на зображення чи на файл іншого типу

File:Example.jpg

file label

Media:Example.jpg

file label

Динамічне внутрішнє посилання на сторінку користувача, який його натисне
[[Special:MyPage]]

[[Special:MyTalk]]

[[Special:Preferences]]

Special:MyPage

Special:MyTalk

Special:Preferences

Internal link to a specific revision
[[Special:PermanentLink/2393992]]

Revision numbers can be found in each page's edit history. (It is very common to see links to specific revisions implemented as external links because it's easy to cut-and-paste an entire URL to form an external link.)

Special:PermanentLink/2393992
Internal link to a "diff"
[[Special:Diff/2393992]]

[[Special:Diff/2390639/2393992]]

The default (in the first example above) is to show the changes from the previous revision. See also the comments in the previous item.

Special:Diff/2393992

Special:Diff/2390639/2393992

Перенаправлення
#REDIRECT [[Main Page]]

Should be the first and only line on the page. Див. Довідка:Перенаправлення .

  Main Page

Зовнішні посилання

Для того щоб додати зовнішнє посилання, візьміть URL, за яким через пробіл написано назву сторінки, на яку ви посилаєтесь, в квадратні дужки. Коли ви збережете сторінку, ви побачите нове посилання з позначкою стрілочки після нього. Ця позначка нагадує, що посилання може вести до іншого сайту, оскільки синтаксис квадратних дужок це дозволяє.

Опис Ви пишете Ви побачите
Зовнішнє посилання з іншою міткою
[https://mediawiki.org MediaWiki]
MediaWiki
Нумероване зовнішнє посилання
[https://mediawiki.org]

This is what happens if you omit the link text. Multiple links of this type on the same page are numbered sequentially.

[1]
Зовнішнє посилання
https://mediawiki.org

URLs beginning with "http://" and "https://" are automatically linked, even when no brackets are used.

https://mediawiki.org
Avoiding auto-linked URLs
<nowiki>https://mediawiki.org</nowiki>
https://mediawiki.org
Зовнішнє посилання без уточнення протоколу
[//en.wikipedia.org Wikipedia]

[//en.wikipedia.org //en.wikipedia.org]

The link will be HTTP or HTTPS depending on the protocol of the page currently being viewed (which could be different for different users). This is only supported inside of square brackets [ ]. Using "//en.wikipedia.org" by itself does not result in a link.

Wikipedia

//en.wikipedia.org

Зовнішнє посилання на цей веб-сайт
https://{{SERVERNAME}}/pagename
https://www.mediawiki.org/pagename
Зовнішнє посилання на інший веб-сайт з передачею назви сторінки
https://google.com/search?q={{PAGENAMEE}}

Див. також: кодування назв сторінок в URL, Manual:PAGENAMEE encoding

https://google.com/search?q=Links
Поштове посилання
[mailto:info@example.org email me]
email me
Іменоване поштове посилання із рядком теми та тілом повідомлення
[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info]
info
Custom URI
[skype:echo123 call me]

Any URI you wish to add needs to be first declared through $wgUrlProtocols . (This example is not enabled on MediaWiki.org)

[skype:echo123 call me]

Зовнішні посилання на внутрішні сторінки

Для того щоб додати посилання на сторінку того самого вікі-проекту, використовуючи параметри URL запиту, вам може стати в нагоді синтаксис зовнішнього посилання.

Опис Ви пишете Ви побачите
Зовнішнє посилання на сторінку редагування поточної сторінки
[https://www.mediawiki.org/w/index.php?title=Help:Links&action=edit Edit this page]

[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]

Див. також Help:Магічні слова#URL_data та Зовнішні посилання

Edit this page

Edit this page

Зовнішнє посилання на сторінку редагування поточної сторінки, стилізоване під внутрішнє посилання
<span class="plainlinks">[https://www.mediawiki.org/w/index.php?title=Help:Links&action=edit Edit this page]</span>

Клас plainlinks буде корисним в тих випадках, коли ви хочете, щоб зовнішнє посилання виглядало як внутрішнє, без позначки стрілочки за ним.

Edit this page

Limitations

  1. External links doesn't support Word-ending links.
  2. External links doesn't count toward Special:WhatLinksHere (What links here).

Інтервікі-посилання

Інтервікі-посилання - це внутрішні посилання на інші веб-сайти (які не обов’язково повинні бути вікі, незважаючи на назву). Приміром, можна послатися на статтю https://en.wikipedia.org/wiki/Sunflower, набравши [[wikipedia:Sunflower]], посилання виглядатиме так: [[w:Sunflower]]. Both will result in a link wikipedia:Sunflower. This works because by default MediaWiki configures wikipedia: as an "interwiki prefix" that turns into https://en.wikipedia.org/wiki/ when used inside [[ ]]. (It may not work if the admin of your wiki has changed the setting.) Unlike internal links, interwiki links do not use page existence detection, so an interwiki link will appear blue even if the page does not exist on the remote wiki.

Так само як для внутрішніх посилань, ви можете створювати "конвеєрні" (piped) посилання, змінюючи відображувану мітку посилання. Так, посилання [[wikipedia:Sunflower|велика жовта квітка]] виглядатиме як велика жовта квітка, а [[wikipedia:Sunflower|]] - як Sunflower.

По суті, інтервікі-посилання є скороченим записом широко уживаних повних зовнішніх посилань. Подібне до вищезгаданого посилання можна створити (довгим) записом [http://en.wikipedia.org/wiki/Sunflower велика жовта квітка].

Детальніша інформація: Manual:Interwiki та m:Help:Interwiki linking. Див. також наперед задані префікси інтервікі та розширення Interwiki для редагування веб-оглядачем цього переліку префіксів в таблиці БД interwiki table вашого сайту.

Міжмовні посилання

Якщо ваш вікі-проект підтримує сторінки кількома мовами, ви побачите «міжмовні посилання» на бічній панелі, безпосередньо під блоком інструментів в секції під назвою «іншими мовами».

In wiki markup an interlanguage link looks very much like an interwiki link, but behaves similarly to a category link in that it is rendered in a special way. While category links appear in a special list at the bottom of the page (usually), interlanguage links appear in a special list in the sidebar of the page (or elsewhere, depending on the wiki's configuration and the skin used).

The purpose of interlanguage links is to link pages on the same topics in different languages. To create an interlanguage link, type [[language prefix:page name]] anywhere in the page (preferably at the bottom, like category links); the language prefix is the prefix specified at your wiki for the other language version (typically the ISO 639-1 language code). The interlanguage link is unilateral, it does not point back from that page in the other language. For that purpose, an equivalent back-link needs to be placed there as well. It does not work like the "Edit links" in the languages section of Wikipedia-language versions. But it can be used across all name spaces, including 'User:' to point to ones other profiles in other languages.

Якщо вам потрібно, щоб міжмовне посилання виникало безпосередньо на сторінці, радше ніж на бічній панелі, додайте перед мовним кодом двокрапку: [[:en:Sunflower]]en:Sunflower

Якщо посилання одночасно двох типів, інтервікі та мовне, правильний порядок префіксів такий: wikipedia:en:Sunflower.

Limits

An internal wiki link is limited by maximum page title size.

Див. також