Extension:PerPageLicense
現在、この拡張機能は積極的な保守が行われていません! それでも機能する可能性はありますが、バグ報告や機能の要望は無視される可能性が高くなります。 この拡張機能の開発や保守の作業を引き受けることに興味がある場合は、リポジトリの所有権を申請できます。 礼儀として、作者に問い合わせることをお勧めします。 保守を引き継いだ場合、このテンプレートは除去すべきです。また、拡張機能ページの {{extension}} 基礎情報ボックス内のリストにあなたの名前を保守担当者として追加してください。 |
![]() リリースの状態: 保守されていない |
|
---|---|
実装 | パーサー拡張機能 |
説明 | 名前空間ごと・ページごとにライセンスを設定できるようにする |
作者 | (Leucosticteトーク) |
最新バージョン | 1.1.0 (2017-10-30) |
互換性の方針 | MediaWikiとともにリリースされるスナップショット。 master には後方互換性がありません。 |
MediaWiki | 1.23+ |
データベースの変更 | いいえ |
ライセンス | GNU 一般公衆利用許諾書 3.0 以降 |
ダウンロード | |
例 | http://wiki.mises.org |
|
|
Quarterly downloads | 0 |
translatewiki.net で翻訳を利用できる場合は、PerPageLicense 拡張機能の翻訳にご協力ください | |
The PerPageLicense extension enables license footer variables (viz. $wgRightsIcon , $wgRightsUrl , and $wgRightsText ) to be set on a per-namespace or per-page basis.
ダウンロード
拡張機能は、Git から直接取得できる場合があります [?]:
- コードを参照
- 一部の拡張機能には安定版リリースのタグがあります。
- タグを参照
- タグを選択します
- 「スナップショット」をクリックします
- 各ブランチは過去の MediaWiki リリースと関連付けられています。 最新のアルファ バージョンを含む「master」ブランチもあります (MediaWiki のアルファ バージョンが必要な場合用)。
- ブランチを参照
- ブランチ名を選択します
- 「選択」をクリックします
スナップショットを展開して、MediaWiki インストレーション内の extensions/PerPageLicense/ ディレクトリに配置します。
git に馴染みがあり、かつサーバーにシェルでアクセスできる場合は、拡張機能を以下のようにして取得することもできます:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PerPageLicense.git
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のPerPageLicense
という名前のディレクトリ内に配置します。 - 以下のコードを
LocalSettings.php
の末尾に追加します:require_once "$IP/extensions/PerPageLicense/PerPageLicense.php";
- 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
設定
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';
// ライセンスの配列。
$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.
使用法
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.