Pomoc:Presmerovania

This page is a translated version of the page Help:Redirects and the translation is 30% complete.
Outdated translations are marked like this.
PD Poznámka: Úpravou tejto stránky súhlasíte s uvolnením vášho príspevku pod licenciou CC0. Viac informacií sa dozviete na stránke Public Domain Help Pages. PD

Presmerovania sa používajú na preposlanie užívateľov z jednej stránky na druhú. Je to užitočné v prípadoch, ak má byť jeden článok dostupný pod viacerými názvami, prípadne názvami s rozdielnym slovosledom, veľkosťou písmen atp.

Two types of redirections exist:

  • Hard redirection: Readers navigated to the redirect page are taken directly to the target page (usually other pages of the same wiki).

Only hard redirection is described in this current article.

  • Soft redirection: Readers are left on the redirect page but given the option of clicking the link to the target page.

Usually this is achieved via a template; see corresponding article on Meta.

In wikis with $wgDisableHardRedirects enabled (such as most public Wikimedia projects), it's not possible to create a hard redirect to special pages (e.g. Special:MyLanguage) or pages located on another wiki; they will be automatically "softened".

Appearance

For hard redirects, you immediately get the target page. However, it shows a small notice after the top title to indicate you arrived here indirectly.

Help:Redirects
Zo stránky MediaWiki
(Presmerované z Help:Redirect)

Vytvorenie presmerovania

When a page is moved, a redirect from the old to the new pagename is automatically created.

Users with the "suppressredirect" right may move a page without creating a redirect. By default this right is assigned to sysops and bots.

You may start a new page with the name you want to direct from (see Vytvoriť novú stránku ). You can also use an existing page that you are making inactive as a page by going to that page and using the "edit" tab at the top. In either case, you will be inserting the following code at the very first text position of the Edit window for the page:

#REDIRECT [[menostránky]]

kde menostránky je názov cieľovej stránky. Slovo "redirect" nie je citlivé na veľkosť písmen, ale medzi ním a znakom "#" nesmie byť medzera. Akýkoľvek text pred týmto kódom ho znefunkční a zabráni tak presmerovaniu. Text, alebo kódy za značkou presmerovania budú ignorované (a mali by byť z existujúcej stránky vymazané). However, to put or keep the current page name listed in a Category, the usual tag for that category is entered or kept on a line after the redirect code entry.

Redirections can be simple page names or specified using a namespace. They can be suffixed with a section name if you have the corresponding anchor defined on the target page.[1]

Examples of valid operational redirections:

  • #REDIRECT[[Help:Magic_words#Page_names]]
  • #redirect [[Help:Magic_words#URL_encoded_page_names]]
  • #Redirect [[Manual:$wgConf]]
  • #REDIRECT [[MediaWiki/fr]] the translated page is imposed

Na kontrolu, či ste zadali správny názov cieľovej stránky, by ste mali použiť tlačidlo 'Zobraziť náhľad' pod oknom úprav, alebo Alt+P.

When redirection is valid (and operational) you will see in the previewed text the name of the target you have provided, following a 'next line' icon (image) for example as follows:

 Help:Magic words#URL encoded page names

This is what you must get.

Náhľad nebude vyzerať ako výsledná presmerovacia stránka, ale ako čislovaný zoznam s modrou cieľovou stránkou:

1. REDIRECT  menostránky

If the pagename as you typed it is not a valid page, it will show in red. If there is no valid destination page, you should not create the redirect.

Limitations

A redirect target cannot depend on a variable, template, or parser function. If that is the case, the browser will not be automatically redirected on visiting the page.

Example of redirection not allowed (not operational):

JavaScript page redirect

In order to avoid JavaScript functionality from breaking, all JavaScript pages have a different redirect syntax from regular pages. This syntax allows for proper execution of the page by the browser's JavaScript engine, as well as being recognised by MediaWiki as a redirect. To create a JavaScript page redirect, the format that must be used is as follows:

/* #REDIRECT */mw.loader.load( "{{fullurl:Target.js|action=raw&ctype=text/javascript}}" );

Where Target.js is the target page name.

Zobrazenie presmerovania

Po vytvorení presmerovania sa už na stránku s presmerovaním nedostanete zadaním jej názvu, ani kliknutím na odkaz s jej názvom. Stránka s presmerovaním sa nezobrazí ani vo výsledkoch vyhľadávania. Na cieľovej stránke, v jej hornej časti, sa však zobrazí informácia o tom, že ste boli presmerovaní, spolu s názvom a odkazom na stránku presmerovania. Kliknutím naň sa dostanete na stránku presmerovania, kde sa zobrazí veľká zahnutá šipka a názov cieľovej stránky presmerovania. This adds &redirect=no URL parameter.

Help:Redirection
Zo stránky MediaWiki
Presmerovacia stránka

  Help:Redirect

Po tom, čo tak urobíte, môžete robiť so stránkou presmerovania všetky operácie - ako s bežnou wiki stránkou. Môžete navštíviť pridruženú diskusiu a debatovať o presmerovaní. Môžete si prezrieť históriu úprav stránky, vrátane záznamu o presmerovaní. Ak je presmerovanie nesprávne, môžete stránku upraviť, alebo sa môžete vrátiť k jej starším verziám a presmerovanie odstrániť.

Vymazanie presmerovania

Presmerovania obvykle nie je potrebné vymazávať. V databáze obsadzujú len bezvýznamný priestor. Ak je názov stránky málo výstižný, alebo nepresný neuškodí (skôr prospeje), ak ho ponecháte ako presmerovanie na presnejší názov, či aktuálnejšiu stránku.

If want to move a page over a redirect that has only one edit in its history and targeted to the old page name, there is no need to delete the redirect: it is overwritten. If the redirect has more than one history entry, or the redirect target is somewhere else, then it can only be deleted-and-moved by an administrator.

Ak napriek tomu potrebujete stránku s presmerovaním vymazať, napr. ak je jej názov urážlivý, alebo chcete odradiť ľudí od odkazovania na daný pojem, prejdite na stránku presmerovania vyššie spomínaným spôsobom a postupujte podľa krokov uvedených vo $deleting.

Problematical redirects

Dvojité presmerovanie

Dvojité presmerovanie je stránka, ktoré presmeruje na stránku, ktorá je tiež presmerovaním, čo však nefunguje.[2] Namiesto toho sa užívateľom zobrazí nasledujúca presmerovacia stránka. Toto obmedzenie je zámerné - čiastočne kvôli zabráneniu nekonečným slučkám a čiastočne preto, aby veci zostali jednoduché.

Dvojité presmerovania by ste však mali vyhľadávať a odstraňovať - zmenou presmerovania priamo na cieľovú stránku. Najpotrebnejšie je to po presune dôležitej stránky. Na nájdenie dvojitých presmerovaní na príslušnú stránku použite odkaz z nástrojov "Odkazy na túto stránku". Pre nájdenie dvojitých presmerovaní na celej wiki použite špeciálnu stránku Dvojité presmerovania.

There is an option, $wgFixDoubleRedirects , to automatically fix double redirects with a job queue. However, it tends to aggravate page move vandalism, so it is disabled by default. The __STATICREDIRECT__ magic word can be used to skip the double-redirect fix on a particular page.

Broken redirects

If the target page does not exist, the redirect is broken: redirection will not occur. You may find all broken redirects at Special:BrokenRedirects.

Presmerovanie na stránku v mennom priestore category

To redirect to a category page and prevent the redirect appearing in this category, precede the words "Category" with a colon. Otherwise the redirect page will also be categorized to the category itself.

#REDIRECT [[:Category:Glossary]]

Transcluding a redirect

When a page called for inclusion is a redirect page, the redirect target is included instead, with the same parameters, without any redirect message. A double redirect does not work.

This allows to create several names for the same template.

Links to redirect

An internal link to a redirect page has CSS class mw-redirect. This can be useful to make them stand out, for clean-up work involving bypassing redirects.

Pozri taktiež

References

  1. From 2006 development, after 2004 bug report.
  2. This may be controlled by $wgMaxRedirects .