Extensión:Interwiki
Interwiki Estado de lanzamiento: estable |
|
---|---|
Implementación | Página especial |
Descripción | Agrega una página especial para ver y manipular la tabla interwiki |
Autor(es) | Stephanie Amanda Stevens, SPQRobin |
Última versión | 3.2 (2019-07-15) |
MediaWiki | 1.36+ |
Cambios de la base de datos | No |
Licencia | GNU Licencia Pública general 2.0 o posterior |
Descarga | |
Ejemplo | Special:Interwiki |
|
|
interwiki |
|
Descargas trimestrales | 110 (Ranked 52nd) |
Wikis públicos que lo utilizan | 4,929 (Ranked 181st) |
Traduce la extensión Interwiki si está disponible en translatewiki.net | |
Asuntos | Tareas abiertas · Reportar un bug |
La extensión Interwiki agrega la página "Special:Interwiki" a MediaWiki , para ver y editar la tabla interwiki y un registro de cualquier acción realizada con ella.
Esta extensión funciona con la variable $wgInterwikiCache . Los cambios realizados con él en la tabla interwiki pueden afectar el comportamiento de transclusión y enlaces interwiki .
La lista de "Special:Interwiki" es idéntica a la API api.php?action=query&meta =siteinfo&siprop=interwikimap
, excepto que el campo iw_api
no está disponible.
Instalación
- Descarga y extrae los archivos en un directorio denominado «
Interwiki
» dentro de la carpetaextensions/
.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki - Añade el siguiente código en la parte final de tu archivo LocalSettings.php :
wfLoadExtension( 'Interwiki' ); // Para otorgar permisos a los sysops para editar datos interwiki $wgGroupPermissions['sysop']['interwiki'] = true;
- Hecho – Navega a Special:Version en el wiki para verificar que la extensión se haya instalado correctamente.
- La configuración que viene con MediaWiki no otorgará permiso a ningún grupo de usuarios. Por lo tanto, deberá agregar la configuración usted mismo o nadie podrá editar interwikis.
- Para habilitar la transclusión desde otros sitios, deberá habilitar
$wgEnableScaryTranscluding
. - Para deshabilitar la adición de prefijos a través de la interfaz Special:Interwiki, configure
$wgInterwikiViewOnly
atrue
.
interwiki
definido por configuración regional en SpecialInterwiki.i18n.php
. Su valor es de Ver y editar la tabla de interwikis.
Configuración de enlaces interlingüísticos
To set up interlanguage links using this extension, make sure that $wgInterwikiMagic
is set to true
and $wgHideInterlanguageLinks
is set to false
(they are like this by default, you don't need to change them usually).
The $wgInterwikiViewOnly
also needs to be set to false
(which it is by default).
Then go to Special:Interwiki as a user with the ability to edit interwikis.
That is controlled by the interwiki
permission, and by default, no user group has this permission, so it needs to be added to a user group with, e.g.
$wgGroupPermissions['sysop']['interwiki'] = true;
Once on Special:Interwiki, you can either click the "Add an interwiki or language prefix" link at the top of the table, or click the "Edit" or "Delete" links in the table row of an existing interwiki prefix.
Choosing to add or edit an interwiki prefix will take you to a separate page with a form with various fields to be filled.
The main fields are "name", which is the prefix that would be used for the links, and "URL", where you put the full URL pattern.
For example, setting name=foowiki
and URL=http://fr.foowiki.tld/wiki/$1
would make [[foowiki:Blah]]
point to http://fr.foowiki.tld/wiki/Blah
.
There are also two checkboxes labeled "Forward" and "Transclude".
See Manual:Interwiki table for a full explanation of the forward (iw_local
) and transclude (iw_trans
) bits.
In brief:
- Enabling forwarding ('local' true) is normally done between all languages and projects in the same group, as it allows a link to any one of the languages to be used as a gateway to the others. The English-language Wikipedia, for instance, sets the 'local' bit true for all of the other-language Wikipedias and for projects like commons:, wikinews: or wikivoyage:. A user on a wiki outside Wikipedia where the wikipedia: interwiki prefix points to en.wikipedia.org could create a link like wikipedia:fr:Encyclopédie. That link goes initially to "fr:Encyclopédie" on the English-language Wikipedia. The en.wikipedia server immediately recognises fr: as a 'local' interwiki link, so replies with a redirect to la Wikipédia where fr.wikipedia.org/wiki/Encyclopédie displays the requested French-language Wikipédia page [[Encyclopédie]] et voilà.
- Enabling transclusion is rarely done, as it allows an article on one wiki to use templates from some other wiki. This is referred to as 'scary transclusion' as it will cause problems if the other wiki changes the template unexpectedly. A few wiki farms use this to create one 'central wiki' with various templates which are made available to other wikis in the same farm. If you don't need this, don't enable it.
Interwikis globales
Since version 3, Interwiki supports defining a global/central database and pulling defined interwikis from there as well as from the local table. This functions essentially as a table merge, with local interwiki definitions overriding central. Language links are not pulled from the central table; these are set up as local-only due to a central table likely serving more than one project (with each having its own languages).
The central table is the interwiki table of the central wiki. This means that as far as the central wiki is concerned, it is basically just a normal non-global setup. There are therefore no special rights associated with the central (global) table, though it is likely you may want to be more picky about how you assign the 'interwiki' edit right on this wiki.
- This was decided by looking at current possible use cases (ShoutWiki's hub, Uncyclomedia's central wiki, and Meta-Wiki) where the central wiki isn't going to have anything extra anyway.
- This might change in the future, but anything more intelligent will require schema updates.
- This probably doesn't work with table prefixes because of how the table is accessed.
To set up a central interwiki table, simply provide the name of the database of the wiki you want to use:
// Enable pulling global interwikis from a central database
$wgInterwikiCentralDB = 'mw_central';
Replace 'mw_central' with the name of the database.
For those using table prefixes here is an alternative solution for "pool_example_wiki" tables.
$wgSharedDB = 'example_wiki'; # The $wgDBname for the wiki database holding the main interwiki table
$wgSharedPrefix = 'pool_'; # The $wgDBprefix for the database. Defaults to the prefix of the current wiki if not specified
$wgSharedTables = ['interwiki'];
URL relativas al protocolo
You can use protocol-relative URLs (PRURLs), so that users accessing your wiki over either HTTP or HTTPS can use that same protocol to access interwiki links.
To use a PRURL, first ensure the destination server supports HTTPS; if it does, then simply remove the https:
portion of the URL in the link table.
For example, change
https://en.wikipedia.org/wiki/$1
to:
//en.wikipedia.org/wiki/$1
Esta extensión está siendo usada en uno o más proyectos de Wikimedia. Esto significa probablemente que la extensión es estable y funciona lo suficientemente bien como para ser usada en sitios con gran cantidad de visitas. Puedes buscar el nombre de esta extensión en los archivos CommonSettings.php e InitialiseSettings.php de Wikimedia para ver dónde se instala. Encontrarás la lista completa de extensiones instaladas en un wiki en particular en la página Special:Version del wiki. |
Esta extensión está incluida en los siguientes anfitriones/granjas wiki y/o paquetes: No se trata de una lista oficial. Algunas granjas/hosts wiki y/o paquetes pueden tener disponible esta extensión aunque no estén listados aquí. Siempre compruébelo con su anfitrión o granja wiki para confirmarlo. |
- Extensions bundled with MediaWiki 1.21/es
- Stable extensions/es
- Special page extensions/es
- GPL licensed extensions/es
- Extensions in Wikimedia version control/es
- Extensions which add rights/es
- UserGetAllRights extensions/es
- All extensions/es
- Extensions used on Wikimedia/es
- Extensions included in BlueSpice/es
- Extensions included in Canasta/es
- Extensions available as Debian packages/es
- Extensions included in Miraheze/es
- Extensions included in MyWikis/es
- Extensions included in ProWiki/es
- Extensions included in semantic::core/es
- Extensions included in ShoutWiki/es
- Extensions included in Telepedia/es
- Extensions included in wiki.gg/es
- Extensions included in WikiForge/es
- Interwiki extensions/es