Wikipedia:Tutorial (Pranala): Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
Tag: Suntingan perangkat seluler Suntingan peramban seluler
k Dikembalikan ke revisi 11077671 oleh Rachmat04 (bicara).
Baris 1:
{{Wikipedia:Tutorial/Tab|Tab ini=4}}
Yupiter Baene
<div style="border:2px solid #A3B1BF; padding:.5em 1em 1em 1em; border-top:none; background-color:#fff; color:#000">
Propinsi Sumatera Utara
{{TOCright}}
Kabupaten Nias Selatan
'''Pranala''' ([[Bahasa Inggris|Inggris]]: ''link'') adalah sebuah tulisan (atau obyek) yang jika di-klik akan membawa kita ke halaman lain, baik dalam Wikipedia (pranala internal) maupun ke halaman lain di luar situs Wikipedia. '''[[Pranala]]''' membuat pengguna dapat berpindah antar halaman. Ada tiga jenis pranala yang dikenali oleh MediaWiki yaitu pranala internal, pranala interwiki, dan [[Wikipedia:Pranala_luar|pranala luar]], yang masing-masing memiliki [[CSS|format CSS]] tersendiri untuk membedakan satu dengan yang lainnya.
Kecamatan Lahusa
 
Desa Hilidohona
<!--== Wikilinks ==
A '''wikilink''' or '''internal link''' links a page to another page within the same project.
*<nowiki>[[a]]</nowiki> gives [[a]].
*<nowiki>[[a|b]]</nowiki> gives [[a|b]] (link to a, labeled b).
*<nowiki>[[a]]b</nowiki> gives [[a]]b, just like <nowiki>[[a|ab]]</nowiki> does: [[a|ab]].
*<nowiki>[[a|b]]c</nowiki> gives [[a|b]]c, just like <nowiki>[[a|bc]]</nowiki> does: [[a|bc]].
*<nowiki>a[[b]]</nowiki> gives a[[b]].
*<nowiki>[[a]]<</nowiki>nowiki>b</nowiki> gives [[a]]<nowiki>b</nowiki>.
*<nowiki>[[a]]''b''</nowiki> gives [[a]]''b''.
*<nowiki>''[[a]]''b</nowiki> gives ''[[a]]''b.
*<nowiki>[[a|b]]c<</nowiki>nowiki>d</nowiki> gives [[a|b]]c<nowiki>d</nowiki>.
*<nowiki>[[a]][[b]]</nowiki> gives [[a]][[b]] (two links, but looking equal to the single link [[ab]]), even if the links are underlined ([[a]] [[b]] and [[a b]] look the same only if links are not underlined).
 
Links with parameters (the link name) are said to be "piped" because of the pipe symbol used ( | ).
 
MediaWiki automatically checks if the target of a wikilink exists ("existence detection"). If the page doesn't exist, the link leads to the editing screen, and it is assigned the class "new". Such wikilinks are nicknamed "red links" because they are colored red in the default stylesheet on a default installation of MediaWiki. Red links are useful in determining the current status of the page (created or not created), create incoming links to a future page, facilitates and incites page creation.
 
Note that the image, category, and interlanguage syntax are the same as the wikilink syntax. Attempting to link normally will place the image on the page, add the page to the category and create an interlanguage link at the edge of the page. This can be prevented by prefixing a colon, which escapes the specific syntax. For example, <code><nowiki>[[:Category:Help]]</nowiki></code>, <code><nowiki>[[:fr:Help:Link]]</nowiki></code>, and <code><nowiki>[[:Image:Mediawiki.png]]</nowiki></code>.
 
The existence of an internal link from a page to an existing or non-existing page is recorded in the [[pagelinks table]].
 
===Stub feature===
A wikilink to an existing page will be in class 'stub' if the page is in the main namespace, it is not a redirect, '''''and''''' the number of bytes of the wikitext is less than the "threshold for stub display" set in the [[Help:Preferences|user's preferences]].
 
This allows users to immediately identify links to very short pages that probably need to be expanded. Alternately, a user may set a very high threshold to achieve any of the following:
* Identify links to very large pages. However, the criterion is the size of the wikitext; possible inclusion of templates and images can make the rendered page large, even if the amount of wikitext is small.
* Determine at a glance whether a link leads to the main namespace or not. However, this does not take into account ''redirects'' to the main namespace (even if the redirect itself is in the main namespace).
* Identify links to redirects, for clean-up work such as bypassing redirects.
 
However, section linking to a "stub" does not work. Although this is normally a minor issue, this may cause problems with users who set a very high threshold.
 
== Interwiki links ==
An '''[[Help:Interwiki linking|interwiki link]]''' links a page to a page on another website. Unlike the name suggests, the target site need not be a wiki, but it has to be on the [[m:Interwiki map|interwiki map]] specified for the source wiki. These links have the associated CSS class "extiw". These are in the same form as wikilinks above, but take a prefix which specifies the target site. For example, on Wikimedia projects and many other wikis <code><nowiki>[[wikipedia:Main Page]]</nowiki></code> links to Wikipedia's main page. The prefix can be hidden using the same piped syntax as wikilinks.
 
=== Interwiki links to the same project ===
Although interwiki links can be used to point to a wiki from itself, this is not generally recommended. MediaWiki does not detect whether or not the target page of an interwiki list exists, so there is no special formatting and the link is always to the view page. Further, MediaWiki does not check if the page is linking to itself. A [[Help:Self link|self wikilink]] is bolded (like [[{{NAMESPACE}}:{{PAGENAME}}]]), whereas a self interwiki link is normal ([[m:{{NAMESPACE}}:{{PAGENAME}}]]).
 
Pros:
* A copy of the wikitext on a sister project may still point to the same page. Sometimes two prefixes are needed for that purpose, e.g. [[w:de:a]].
 
== External links ==
External links use absolute URLs to link directly to any webpage. These links have the associated CSS class "external". External links are in the form <code><nowiki>[http://www.example.org link name]</nowiki></code> (resulting in [http://www.example.org link name]), with the link name separated from the URL by a space. Links without link names will be numbered: <code><nowiki>[http://www.example.org]</nowiki></code> becomes [http://www.example.org]. Links with no square brackets will be displayed in their entirety: http://www.example.org .
 
Unlike in the case of internal links, <nowiki>[http://www.example.org a]s</nowiki> gives [http://www.example.org a]s.
 
See [[Help:URL#URLs in external links|URLs in external links]] for more detailed information.
 
[[Special:Linksearch]] finds all pages linking to a given site.
 
=== External links to the same project ===
External links are often used to use special URL parameters in links. This allows links directly to the edit history of a page, to a page in edit view, a diff of two versions, et cetera. They can also be used to create a [[Help:Navigational image|navigational image]].
 
However, the use of external links to link to a normal page on the same project is not recommended. These links benefit from none of the features of a wikilink, and may break the web of links when the content is exported to another domain.
 
===Arrow icon===
Monobook skin produces an arrow icon after every external link. This can be suppressed with class="plainlinks":
*<nowiki><</nowiki>span class="plainlinks">http<nowiki>://a</</nowiki>span> gives <span class="plainlinks">http://a</span>
*http<nowiki>://a</nowiki> gives http://a
 
== Section linking (anchors) ==
Links in the form <code><nowiki>[[#anchor_name]]</nowiki></code> will link to any anchor named "anchor_name" on the page. This may be either a heading named "anchor_name", or an arbitrary position. <code><nowiki>[[#top]]</nowiki></code> is a reserved name that links to the [[#top|top of a page]]. It is possible to create an arbitrary anchor name using the HTML code <code><nowiki><span id="anchor_name"></span></nowiki></code>.
 
Anchor links can also be appended to any type of link; for more information, see [[Help:Section#Section_linking]].
 
=== Problems with page name conversion ===
Note that if the page name is automatically converted (for example, from "/wiki/main Page" to "/wiki/Main Page"), the section link will still work but will disappear from the address bar. As a consequence, this will make it more difficult to bookmark the section itself. This is not applicable for wikilinks, because the conversions have already taken place on Preview or Save of the referring page.
 
For example, consider [http://en.wikipedia.org/wiki/Wikipedia:how_to_edit_a_page#Links_and_URLs http://en.wikipedia.org/wiki/Wikipedia:how_to_edit_a_page#Links_and_URLs]. In this case, the anchor part of the address will disappear because the "how" will be converted to "How".
 
=== Redirects with section links ===
A [[Help:Redirect|redirect]] to a page section does not go to the section. However, one can add the section anyway as a clarification, and it will work if the redirect is manually clicked from the redirect page. However, links with a section to a redirect will lead to the section on the redirect's page.
 
==Subpage feature==
MediaWiki has a subpage feature, although activation depends on project and namespace. If activated, the following applies (if not, "A/b" is just a page with that name).
 
A [[w:en:tree structure|tree structure]] of pages is established by using forward slashes in pagenames: A/b is a child of A, hence A is a parent of A/b; also A/b/c is a child of A/b; A/a, A/b, and A/c are siblings.
At the top of the subpage body links to all ancestor pages are shown automatically, without any corresponding wikitext. The links show up even if the parent page does not exist, but the sequence of ancestors stops before any non-existing ancestor page (e.g., if the grandparent page does not exist, the parent page is not shown either). Like most letters of a page name, the first letter after the slash is case-sensitive; "/subpage" and "/Subpage" are different pages.
 
[[Help:What links here|What links here]] and [[Help:Related changes|Related changes]] ignore these automatic links.
 
=== Relative links ===
Relative links still work if all pages of a tree are renamed according a name change of the root, including making it a child of a new root.
 
Inside a subpage hierarchy the following relative links can be used:
* <nowiki>[[../]]</nowiki> links to the parent of the current subpage, e.g., on A/b it links to A, on A/b/c it links to A/b.
* <nowiki>[[../s]]</nowiki> links to a sibling of the current subpage, e.g., on A/b, it links to A/s.
*<nowiki>[[/s]]</nowiki> links to a subpage, e.g. on A it is the same as <nowiki>[[A/s]]</nowiki>.
 
See also [[w:Wikipedia:Subpages]], and the example pages [[m:Link/a/b]] and [[m:Help:Link/a/b]]. For the latter the subpage feature does not work because of the namespace.
 
=== User space ===
Subpages of a user page (<code><nowiki>[[User:Username/Subpage]]</nowiki></code>) are considered to be in that user's "user space". Rules are often relaxed in a user's own subpages, whereas they are typically tightened for a user editing another user's subpages.
 
===Unintended subpage structure===
Any slash in a pagename causes a subpage structure, e.g. [[Subpage demo Season 2006/2007]] is a subpage of "Subpage demo Season 2006". As long as the latter does not exist, this has no effect on the former, However, a page with a slash in its name cannot be the root page of a subpage structure. For example, [[Subpage demo Season 2006/2007 /soccer]] does not show its parent, because its unintended grandparent does not exist. A dummy grandparent page can fix this.
 
=== Subpage activation ===
Wikipedia has this feature activated in all talk namespaces and the user and project namespace. The Meta-Wiki also has it in the main namespace. The default is set in [[mw:Help:Configuration settings|DefaultSettings.php]][http://cvs.sourceforge.net/viewcvs.py/wikipedia/phpwiki/newcodebase/DefaultSettings.php?rev=1.21&view=markup]. As of revision 1.21, the following namespaces have it activated by default: Special, Main talk, User and User_talk, Meta_talk, and Image_talk. Settings per project are changed in [[LocalSettings.php]][http://cvs.sourceforge.net/viewcvs.py/wikipedia/phpwiki/newcodebase/LocalSettings.php?rev=1.25&view=markup].
 
== Miscellaneous ==
=== Linking to a page with images ===
It is possible to use images as links to other pages. For more information, see [[Help:Navigational images|use an image as a link to a page]].
 
=== "Hover box" on links ===
On some browsers, holding the cursor over link will show a hover box containing the text of the link's HTML title attribute. MediaWiki sets this to the target page name (without the possible section indication) if it's a wikilink, the page name with prefix if it's an interwiki link, and the URL if it's an external link.
 
This can be switched off in the [[Help:Preferences|user preferences]]. The browser may also show similar info, but with the possible section indication, in the address bar.
 
For these effects a piped link is useful even if it not followed; for example, for displaying the meaning of an acronym (e.g. [[neutral point of view|NPOV]]) or any other remark. It is possible to produce a hover box without a link, see {{tim|H:title}}.
 
=== Disallowed characters ===
In internal and interwiki link style, a plus sign in a page name is not allowed, the HTML and hence the rendered page just shows the wikitext, e.g. [[a+b]]. In external link style a plus sign in the URL is retained. It is often equivalent with a space. See also below.
 
In accordance with the rules explained in [[Help:Page name]], conversions are automatically made to [[Help:Special characters|non-literal characters]] in wiki and interwiki links. For example, "<code><nowiki>[[Help:Page%20name]]</nowiki></code>" becomes "[[Help:Page name]]". However, the opposite is true for external links; literal characters are converted into non-literal characters. For example, most browsers will convert ".../wiki/!" to ".../wiki/%21".
 
A code like %70 in a redirect disables it, although the link works from the redirect page. For a redirect that works, the redirect page shows the canonical form of the target, unlike its preview page, which renders the link in the usual way.
 
=== Special pipe syntax ===
Using an empty pipe syntax on wiki and interwiki links will hide interwiki prefixes and parentheses. For example, <nowiki>[[w:Mercury (planet)|]]</nowiki> becomes [[w:Mercury (planet)|Mercury]]. This pipe syntax should only be used where the unqualified reference is not ambiguous, such as in an article about the solar system. See [[Help:Piped link]].
 
=== Additional effects of links ===
*[[Help:Related changes|Related changes]]
*[[Help:What links here|Backlink]]s
*[[Help:Preferences#Date_format|Date format]]
* Using a space after the pipe syntax (<nowiki>[[Main page| ]]</nowiki>) produces (perhaps depending on the browser) a space only, not a link ("[[Main page| ]]"), but it is treated as a link for the "what links here" feature.
 
===Links from a page===
With [[query]] the links from page ''pagename'', sorted by namespace, and for each namespace alphabetically, are given by <nowiki>{{SERVER}}{{SCRIPTPATH}}</nowiki>/query.php?what=links&titles=''pagename'' , e.g. {{SERVER}}{{SCRIPTPATH}}/query.php?what=links&titles={{FULLPAGENAME}} .
 
==See also==
*[[Help:Calculation]]
*[[Help:Editing#Links, URLs]]
*[[Help:Interwiki linking]]
*[[Help:Piped link]]
*[[Help:Self link]]
*[[Help:Template#Restrictions]] (and the next section)
*[[Help:URL]]
*[[Help:What links here]]
*[[m:Parser testing/replaceInternalLinks]]
*[[m:Parser testing/replaceExternalLinks]]
*[[m:Links table]]
*[[m:Brokenlinks table]]
*[[w:Hyperlink|Hyperlink]]
*[[w:Wikipedia:Canonicalization|Wikipedia:Canonicalization]]
*[[w:Template:linkless|Linkless]]
*[[w:Red Link|Red Link]]-->
 
== Pranala internal ==
Baris 63 ⟶ 210:
Hal yang paling mudah membuat pranala adalah cukup mengetik alamat situs web (URL) yang hendak Anda hubungkan. Misalnya jika hendak membuat pranala ke [[Google]], Anda dapat mengetik:
:<tt>http://www.google.co.id/</tt>
Wiki akan secara otomatis menganggap pranala tersebut sebagai pranala, dan akan menampilkan alamat situs web mentah, termasuk bagian "<nowiki>http://</nowiki>".
<!-- In practice, you won't see this format much, as raw URLs are ugly and often give no clue to what the site actually ''is''. -->
 
Baris 69 ⟶ 216:
:<tt><nowiki>[http://www.google.co.id/]</nowiki></tt>
 
Ini akan menampilkan pranala sebagai angka dalam kurung, seperti ini: [http://www.google.co.id/]. Format ini mirip dengan catatan kaki, sehingga seringkali digunakan untuk menyebutkan sumber atau rujukan dalam artikel. Hindari penggunaan: "Menurut [http://members.lycos.nl/JoyceHoen/moon2000.htm], bulan purnama terakhir pada milenium kedua terjadi pada tanggal [[11 Desember]] [[1999]]." Gunakan "bulan purnama terakhir pada milenium kedua terjadi pada tanggal [[11 Desember]] [[1999]]." [http://members.lycos.nl/JoyceHoen/moon2000.htm]".
 
Hindari pula penggunaan pranala luar jika masih memungkinkan melakukan hal yang sama dengan menghubungkan artikel pada Wikipedia. Misalnya, hindari
:<tt><nowiki>Soekarno lahir di [www.surabaya.go.id Surabaya]</nowiki></tt>
namun gunakan
:<tt><nowiki>Soekarno lahir di [[Kota Surabaya|Surabaya]]</nowiki></tt>
 
Baris 97 ⟶ 244:
 
=== Menghubungkan ke situs terkait ===
Misalkan Anda menulis kata yang tidak umum dalam sebuah artikel, dan Anda menduga mungkin orang yang membaca kata tersebut tidak tahu artinya. Anda mungkin hendak membuat pranala ke artikel Wikipedia, namun isi artikel tersebut kurang tepat untuk dipandang sebagai sebuah artikel dalam ensiklopedia. Hubungkan saja ke entri Wiktionary.
 
Daripada Anda menulis URL (alamat situs) yang lengkap, Anda juga dapat menggunakan pranala wiki yang mirip dengan pranala Wikipedia pada umumnya namun dengan awalan khusus. Misalnya,
Baris 121 ⟶ 268:
 
Demikian pula, untuk membuat pranala dari Wikipedia Bahasa Inggris ke Wikipedia Indonesia, ketik:
:<tt><nowiki>[[:id:Bali]]</nowiki></tt>
Maka akan nampak seperti ini:
:[[:id:Bali]]
 
<!-- Because of the large number of articles hosted on Wikipedia (currently {{NUMBEROFARTICLES}} in English alone — over 2,500,000 in total), each of the approximately 100 different Wikipedia languages has its own server. -->
Baris 161 ⟶ 308:
[[sr:Википедија:Упутства (Википовезнице)]]
[[zh:Wikipedia:使用指南 (维基百科链接)]]
[[Kategori:Profil]]