Extensão:PerPageLicense
O autor desta extensão não está mais mantendo-a! Embora ainda possa funcionar, qualquer relatório de bug ou solicitações de recursos serão mais do que provavelmente ignorados. Se você estiver interessado em assumir a tarefa de desenvolver e manter essa extensão, você pode solicitar a propriedade do repositório. As a courtesy, you may want to contact the author. Você também deve remover essa predefinição e listar-se como mantenedor da extensão na infobox da página {{extension}}. |
![]() Estado da versão: sem manutenção |
|
---|---|
Implementação | Análise sintática |
Descrição | Enables licenses to be set on a per-namespace or per-page basis |
Autor(es) | (Leucostictediscussão) |
Última versão | 1.1.0 (2017-10-30) |
Política de compatibilidade |
Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.23+ |
Modifica o banco de dados |
Não |
Licença | GNU GPL (Licença Pública Geral) 3.0 ou superior |
Download | |
Exemplo | http://wiki.mises.org |
|
|
Quarterly downloads | 0 |
Para traduzir a extensão PerPageLicense, verifique sua disponibilidade no translatewiki.net | |
The PerPageLicense extension enables license footer variables (viz. $wgRightsIcon , $wgRightsUrl , and $wgRightsText ) to be set on a per-namespace or per-page basis.
Download
A extensão pode ser recuperada diretamente a partir do Git [?]:
- Navegar pelo código
- Algumas extensões possuem tags para versões estáveis.
- Navegar pelas tags
- Selecione a tag
- Clique "snapshot"
- Cada pacote está associado com uma versão antiga do MediaWiki. Existe também um pacote "master" que contém a versão alfa mais recente (pode exigir uma versão alfa do MediaWiki).
- Navegar pelos pacotes
- Selecione um nome de pacote
- Clique “Continuar”
Extraia o snapshot e coloque-o no diretório extensions/PerPageLicense/ de sua instalação do MediaWiki.
Se você estiver familiarizado com o Git e tem acesso shell para seu servidor, você pode obter a extensão, como se segue:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PerPageLicense.git
Instalação
- Baixe e coloque o(s) arquivo(s) num diretório chamado
PerPageLicense
na sua pastaextensions/
. - Adicione o seguinte código ao final do seu arquivo
LocalSettings.php
:require_once "$IP/extensions/PerPageLicense/PerPageLicense.php";
- Concluído – Navegue à página Special:Version em sua wiki para verificar se a instalação da extensão foi bem sucedida.
Configuration
Change these settings to your liking, making sure that you include them in LocalSettings.php
after the require_once
line installing the extension.
// Page from which to obtain templates and associated licenses.
$wgPerPageLicenseTemplatePage = 'MediaWiki:License-templates';
// Array of licenses.
$wgPerPageLicenseLicenses = array (
'cc-0' => array(
'url' => 'http://creativecommons.org/publicdomain/zero/1.0/',
'src' => "{$wgStylePath}/common/images/cc-by-sa.png",
'alt' => 'Creative Commons 0',
),
'cc-by-nc-sa' => array(
'url' => 'http://creativecommons.org/licenses/by-nc/3.0/',
'src' => "{$wgStylePath}/common/images/cc-by-nc-sa.png",
'alt' => 'Creative Commons Attribution-NonCommercial 3.0 Unported',
),
'cc-by' => array(
'url' => 'http://creativecommons.org/licenses/by/3.0/',
'src' => "{$wgStylePath}/common/images/cc-by.png",
'alt' => 'Creative Commons Attribution 3.0 Unported',
),
'cc-by-sa' => array(
'url' => 'http://creativecommons.org/licenses/by-sa/3.0/',
'src' => "{$wgStylePath}/common/images/cc-by-sa.png",
'alt' => 'Creative Commons Attribution Share-Alike 3.0 Unported',
),
'gnu-fdl' => array(
'url' => 'http://www.gnu.org/copyleft/fdl.html',
'src' => "{$wgStylePath}/common/images/gnu-fdl.png",
'alt' => 'GNU Free Documentation License',
),
'public-domain' => array(
'url' => 'http://creativecommons.org/licenses/publicdomain/',
'src' => "{$wgStylePath}/common/images/public-domain.png",
'alt' => 'public domain'
),
);
// Array of namespaces and their licenses.
$wgPerPageLicenseNamespaces = array();
As an example, you might put:
$wgPerPageLicenseNamespaces = array (
0 => 'cc-0',
);
This would license everything in mainspace as Creative Commons Zero.
Uso
Edit MediaWiki:License-templates on your wiki. Add templates and their associated licenses. Put each on a separate line. E.g.:
|Wikipedia text || cc-by-sa
Now any page with the {{Wikipedia text}} template will show the license footers for CC BY-SA. Note that in the event of a conflict between per-namespace and per-page licensing, the per-page licensing prevails.