Diferencia entre revisiones de «Ayuda:Enlace»

Contenido eliminado Contenido añadido
Echani (discusión | contribs.)
comienzo la traducción de en:Help:Link
(Sin diferencias)

Revisión del 14:59 21 oct 2006

Plantilla:Por traducir

Texto original en inglés


Los hiperenlaces permiten a los usuarios moverse de una página a otra. For some basic information about using hyperlinks, see Help:Editing#Links, URLs. Existen tres tipos básicos de enlaces reconocidos por el software Mediawiki, cada uno de ellos representado de forma diferente vía CSS.

Enlaces wiki

Un enlace wiki o enlace interno enlaza con otra página de un mismo proyecto, en este caso, con otra página de la wikiversidad.

  • [[a]] gives a.
  • [[a|b]] gives b (link to a, labelled b).
  • [[a]]b gives ab, just like [[a|ab]] does: ab.
  • [[a|b]]c gives bc, just like [[a|bc]] does: bc.
  • a[[b]] gives ab.
  • [[a]]<nowiki>b</nowiki> gives ab.
  • [[a]]''b'' gives ab.
  • ''[[a]]''b gives ab.
  • [[a|b]]c<nowiki>d</nowiki> gives bcd.
  • [[a]][[b]] gives ab (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 ( | ).

El software MediaWiki comprueba automáticamente si la página objeto del enlace existe. Si no existe, el enlace se muestra en color rojo[1] y conduce directamente a una página de edición. Los enlaces rojos son útiles para determinar si una página existe, e incitan a la creación de páginas nuevas.

Los enlaces a las imágenes, categorías y otras lenguas, utilizan la misma sintaxis que los enlaces internos. Sin embargo, estos enlaces no se muestran como tales, sino que el software realizará acciones automáticas, como mostrar la imagen, añadir el artículo a la categoría o añadir el interwiki al listado del panel lateral. Para evitar que esto se produzca, se puede añadir dos puntos al principio del enlace, con lo que se convierten en enlaces corrientes. Por ejemplo

  • [[Category:Help]] añade el artículo a la categoría
  • [[fr:Help:Link]] añade el interwiki al panel lateral
  • [[Image:Mediawiki.png]] inserta una imagen

La existencia de un enlace de una página a otra se almacena en la tabla pagelinks de la base de datos interna, independientemente de si la página objetivo existe o no.

Umbral de esbozo

Un enlace interno se cataloga como esbozo si:

Esta funcionalidad permite identificar inmediatamente páginas cortas que probablemente necesitan ser ampliadas. Por el contrario, un usuario puede establecer un umbral de esbozo elevado para:

  • identificar enlaces a páginas excesivamente largas. Sin embargo, como sólo se comprueba el tamaño del w:wikitexto, puede pasar por alto páginas que se exceden por la inclusión de plantillas o imágenes.
  • Distinguir enlaces al espacio de nombres principal del resto. Una redirección al espacio de nombres principal no se mostrará como tal, incluso aunque la propia redirección esté en este espacio de nombres.
  • Identificar los enlaces a redirecciones, para tareas de limpieza.


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.

Enlaces interwiki

Un enlace interwiki enlaza una página con otra de otro sitio web diferente. A pesar de su nombre, un interwiki no tiene que apuntar necesariamente a un sitio web que a su vez sea un wiki, pero sí tiene que figurar en el mapa Unlike the name suggests, the target site need not be a wiki, but it has to be on the interwiki map specified for the source wiki.

Estos enlaces llevan asociada la clase "extiw" por lo que pueden representarse de manera diferente por medio de CSS. Estos enlaces se escriben de manera idéntica a los enlaces internos, pero con elprefijo referente al sitio web en cuestión: Por ejemplo, en los proyectos de la familia Wikimedia [[wikipedia:Portada]] enlaza a la portada de wikipedia Wikipedia's main page. Se puede modificar el texto que se muestra de la misma manera que con los wikilinks.


Interwikis a un mismo proyecto

A pessar de que los interwikis se idearon para enlazar web diferentes, se pueden utilizar para enlazar páginas de un mismo proyecto. Sin embargo no se recomienda, entre otras razones porque el software no detecta si la página existe o si es un enlace a sí misma.


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.

Enlaces externos

Los Enlaces externos especifican directamente una dirección (URL) para enlazar a una página cualquiera de internet. Estos enlaces llevan asociada la etiqueta de clase "external".

La forma de incluirlos es: [http://www.example.org link name], que se mostrará link name, con el texto que queremos mostrar separado de la URL por un espacio en blanco. Los enlaces para los que no se especifique texto se numerarán: [http://www.example.org] se muestra [1]. Si el enlace se escribe sin corchetes se mostrará íntegramente, como http://www.example.org .

A diferencia de los enlaces internos, [http://www.example.org a]s aparece como as.

See URLs in external links for more detailed information.

Special:Linksearch encuentra todas las páginas que enlazan con un sitio web determinado.

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 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":

Section linking (anchors)

Links in the form [[#anchor_name]] will link to any anchor named "anchor_name" on the page. This may be either a heading named "anchor_name", or an arbitrary position. [[#top]] is a reserved name that links to the top of a page. It is possible to create an arbitrary anchor name using the HTML code <div id="anchor_name"></div>.

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. In this case, the anchor part of the address will disappear because the "how" will be converted to "How".

Redirects with section links

A 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 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 child 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.

What links here and 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:

  • [[../]] 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.
  • [[../s]] links to a sibling of the current subpage, e.g., on A/b, it links to A/s.
  • [[/s]] links to a subpage, e.g. on A it is the same as [[A/s]].

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 ([[User:Username/Subpage]]) 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 DefaultSettings.php[2]. 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[3].

Miscellaneous

Linking to a page with images

It is possible to use images as links to other pages. For more information, see 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 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. NPOV) or any other remark. It is possible to produce a hover box without a link, see Plantilla:Tim.

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 non-literal characters in wiki and interwiki links. For example, "[[Help:Page%20name]]" 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, [[w:Mercury (planet)|]] becomes 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

  • Related changes
  • Backlinks
  • Date format
  • Using a space after the pipe syntax ([[Main page| ]]) produces (perhaps depending on the browser) a space only, not a link (" "), 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 {{SERVER}}{{SCRIPTPATH}}/query.php?what=links&titles=pagename , e.g. //es.wikiversity.org/w/query.php?what=links&titles=Ayuda:Enlace .

See also

Category:Help

  1. El enlace a páginas que no existen se muestra en color rojo en la configuración por defecto. Un usuario puede modificar la forma en que se le presentan estos enlaces