Extension:Interwiki/pt-br

Esta extensão vem com o MediaWiki 1.21 e versões superiores. The remaining configuration instructions must still be followed.
Category:Extensions bundled with MediaWiki 1.21/pt-br
It was merged into core MediaWiki 1.44 . No installation is required for this and later versions of MediaWiki.
Category:GPL licensed extensions/pt-br
Manual de extensões do MediaWiki
Interwiki
Estado da versão: estávelCategory:Stable extensions/pt-br
Implementação Página especial Category:Special page extensions/pt-br
Descrição Adiciona uma página especial que permite visualizar e manipular a tabela interwiki
Autor(es) Stephanie Amanda Stevens, SPQRobin
Última versão 4.0
MediaWiki 1.36—1.43Category:Extensions with manual MediaWiki version/pt-br
Modifica o banco
de dados
Não
Licença GNU GPL (Licença Pública Geral) 2.0 ou superior
Download Category:Extensions in Wikimedia version control/pt-br
Exemplo Special:Interwiki
  • $wgInterwikiCentralDB
  • $InterwikiCentralInterlanguageDB
  • $wgInterwikiViewOnly
Para traduzir a extensão Interwiki, verifique sua disponibilidade no translatewiki.net
Problemas Tarefas em aberto · Relatar um bug
Category:All extensions/pt-br

A extensão Interwiki adiciona a página Special:Interwiki ao MediaWiki, a qual permite visualizar e editar a tabela interwiki, além de apresentar um registro de alterações à tabela.

Esta extensão funciona com a variável $wgInterwikiCache. Alterações feitas com ela na tabela interwiki podem afetar o comportamento tanto de transclusões como de ligações interwiki.

A lista exibida na página Special:Interwiki é idêntica à API api.php?action=query&meta=siteinfo&siprop=interwikimap, exceto que o campo iw_api não é disponibilizado.

Instalação

  • Baixe e mova a pasta extraída Interwiki ao seu diretório extensions/.
    Desenvolvedores e colaboradores de código, por outro lado, deverão instalar a extensão a partir do Git, usando:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki
    
  • Adicione o seguinte código ao final do seu arquivo LocalSettings.php :
    wfLoadExtension( 'Interwiki' );
    // Para conceder a permissão de editar os dados interwiki a um grupo (como o grupo “sysop”)
    $wgGroupPermissions['sysop']['interwiki'] = true;
    
  • Yes Concluído – Navegue à página Special:Version em sua wiki para verificar se a instalação da extensão foi bem sucedida.
  • A configuração embutida no MediaWiki não concede permissões a nenhum grupo de usuários. Logo, será necessário adicionar a configuração manualmente, caso contrário ninguém poderá editar os interwikis.
  • Para permitir a transclusão a partir de outros websites, será necessário habilitar a $wgEnableScaryTranscluding .
  • Para desativar a adição de prefixos através da interface Special:Interwiki, defina $wgInterwikiViewOnly como true.
O rótulo dessa extensão na lista de páginas especiais não é o seu nome. A entrada na lista é definida pelo item de mensagem interwiki, definido para o idioma em SpecialInterwiki.i18n.php. Seu valor é Ver e editar dados de interwikis.

Configuration

Configurar ligações interlinguísticas

Para configurar ligações interlinguísticas usando essa extensão, certifique-se de que $wgInterwikiMagic esteja definida como true e $wgHideInterlanguageLinks esteja definida como false (elas são assim por padrão, normalmente não é necessário alterá-las). A $wgInterwikiViewOnly também precisa estar definida como false (que é o padrão). Em seguida, vá para Special:Interwiki como um usuário com a capacidade de editar interwikis. Isso é controlado pela permissão interwiki e, por padrão, nenhum grupo de usuários tem essa permissão, portanto, ela precisa ser adicionada a um grupo de usuários com, p. ex.,

$wgGroupPermissions['sysop']['interwiki'] = true;

Uma vez em Special:Interwiki, clique na ligação Adicionar um prefixo interwiki ou de idioma na parte superior da tabela ou clique nas ligações Editar ou Eliminar na linha da tabela de um prefixo interwiki existente.

A opção de adicionar ou editar um prefixo interwiki o levará a uma página separada com um formulário com vários campos a serem preenchidos. Os principais campos são name, que é o prefixo que seria usado para as ligações, e URL, onde você coloca o padrão completo do URL. Por exemplo, definir name=foowiki e URL=http://fr.foowiki.tld/wiki/$1 faria com que [[foowiki:Blah]] apontasse para http://fr.foowiki.tld/wiki/Blah.

Há também duas caixas de seleção denominadas “Encaminhar” e “Transcluir”. Veja Manual:Interwiki table para uma explicação completa dos bits encaminhar (iw_local) e transcluir (iw_trans).

Em resumo:

  • A ativação do encaminhamento (“local” local=true) normalmente é feita entre todos os idiomas e projetos do mesmo grupo, pois permite que uma ligação para qualquer um dos idiomas seja usada como um gateway para os outros. A Wikipédia em inglês, por exemplo, define o bit “local” como true para todas as Wikipédias em outros idiomas e para projetos como commons:, wikinews: ou wikivoyage:. Um usuário em uma wiki fora da Wikipédia onde o prefixo interwiki wikipedia: aponta para en.wikipedia.org poderia criar uma ligação como wikipedia:fr:Encyclopédie. Essa ligação leva inicialmente a “fr:Encyclopédie” na Wikipédia em inglês. O servidor en.wikipedia reconhece imediatamente fr: como uma ligação interwiki “local” e, portanto, responde com um redirecionamento para a Wikipédia, onde fr.wikipedia.org/wiki/Encyclopédie exibe a página solicitada da Wikipédia em francês [[Encyclopédie]] e voilà.
  • A ativação da transclusão raramente é feita, pois permite que um artigo em uma wiki use predefinições de outra 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 globais

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'];

URLs relativos a 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
Category:Extensions used on Wikimedia/pt-br#Interwiki/pt-br Category:Interwiki extensions/pt-br
Category:All extensions/pt-br Category:Extensions available as Debian packages/pt-br Category:Extensions bundled with MediaWiki 1.21/pt-br Category:Extensions in Wikimedia version control/pt-br Category:Extensions included in BlueSpice/pt-br Category:Extensions included in Canasta/pt-br Category:Extensions included in Miraheze/pt-br Category:Extensions included in MyWikis/pt-br Category:Extensions included in ProWiki/pt-br Category:Extensions included in ShoutWiki/pt-br Category:Extensions included in Telepedia/pt-br Category:Extensions included in WikiForge/pt-br Category:Extensions included in semantic::core/pt-br Category:Extensions included in wiki.gg/pt-br Category:Extensions used on Wikimedia/pt-br Category:Extensions which add rights/pt-br Category:Extensions with manual MediaWiki version/pt-br Category:GPL licensed extensions/pt-br Category:Interwiki extensions/pt-br Category:Special page extensions/pt-br Category:Stable extensions/pt-br