Erweiterung:PerPageLicense

This page is a translated version of the page Extension:PerPageLicense and the translation is 46% complete.
MediaWiki-Erweiterungen
PerPageLicense
Freigabestatus: ohne Wartung
Einbindung Parser-Erweiterung
Beschreibung Enables licenses to be set on a per-namespace or per-page basis
Autor(en) (LeucosticteDiskussion)
Letzte Version 1.1.0 (2017-10-30)
Kompatibilitätspolitik Snapshots werden zusammen mit MediaWiki veröffentlicht. Der Master ist nicht abwärtskompatibel.
MediaWiki 1.23+
Datenbankänderungen Nein
Lizenz GNU General Public License 3.0 oder neuer
Herunterladen
Beispiel http://wiki.mises.org
  • $wgPerPageLicenseLicenses
  • $wgPerPageLicenseTemplatePage
  • $wgPerPageLicenseNamespaces
Quarterly downloads 2 (Ranked 141st)
Übersetze die PerPageLicense-Erweiterung, wenn sie auf translatewiki.net verfügbar ist

The PerPageLicense extension enables license footer variables (viz. $wgRightsIcon , $wgRightsUrl , and $wgRightsText ) to be set on a per-namespace or per-page basis.

Installation

  • Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens PerPageLicense im Ordner extensions/ ablegen.
    Entwickler und Code-Beitragende sollten stattdessen die Erweiterung von Git installieren, mit:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PerPageLicense
  • Folgenden Code am Ende deiner LocalSettings.php -Datei einfügen:
    require_once "$IP/extensions/PerPageLicense/PerPageLicense.php";
    
  •   Erledigt – Navigiere zu Special:Version in deinem Wiki, um zu überprüfen, ob die Erweiterung erfolgreich installiert wurde.

Konfiguration

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 von Lizenzen.
$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 von Namensräumen und deren Lizenzen.
$wgPerPageLicenseNamespaces = array();

As an example, you might put:

$wgPerPageLicenseNamespaces = array (
	0 => 'cc-0',
);

This would license everything in mainspace as Creative Commons Zero.

Verwendung

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.