Extension:PerPageLicense
Cette extension n'est en ce moment pas activement maintenue ! Même si elle reste opérationnelle, les rapports de bogue ou les demandes de nouvelles fonctionnalités risquent de ne plus être pris en compte. Si vous êtes intéressé pour prendre en charge le développement et l'entretien de cette extension, vous pouvez demander à devenir propriétaire du répertoire. Vous pouvez par courtoisie contacter l'auteur. Vous devriez aussi enlevez ce modèle et vous ajouter à la liste des mainteneurs de l'extension sur l'infobox de la page {{extension}}. |
A request to archive this extension has been made on Phabricator. See tâche T346010 for the archival request and the rationale for the request, and to leave comments about the request. |
PerPageLicense État de la version : non-maintenu |
|
---|---|
Implémentation | Extension de l'analyseur |
Description | Enables licenses to be set on a per-namespace or per-page basis |
Auteur(s) | (Leucostictediscussion) |
Dernière version | 1.1.0 (2017-10-30) |
Politique de compatibilité | Versions ponctuelles alignées avec MediaWiki. Le master n'est pas compatible arrière. |
MediaWiki | 1.23+ |
Modifie la base de données |
Non |
Licence | Licence publique générale GNU v3.0 ou supérieur |
Téléchargement | |
Exemple | http://wiki.mises.org |
|
|
Téléchargements trimestriels | 3 (Ranked 147th) |
Traduire l’extension PerPageLicense sur translatewiki.net si elle y est disponible | |
The PerPageLicense extension enables license footer variables (viz. $wgRightsIcon , $wgRightsUrl , and $wgRightsText ) to be set on a per-namespace or per-page basis.
Installation
- Téléchargez et placez le(s) fichier(s) dans un répertoire appelé
PerPageLicense
dans votre dossierextensions/
.
Les développeurs et les contributeurs au code doivent à la place installer l'extension à partir de Git en utilisant:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PerPageLicense - Ajoutez le code suivant à la fin de votre fichier LocalSettings.php :
require_once "$IP/extensions/PerPageLicense/PerPageLicense.php";
- Fait – Accédez à Special:Version sur votre wiki pour vérifier que l'extension a bien été installée.
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.
Utilisation
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.