확장기능:PerPageLicense
This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. If you are interested in taking on the task of developing and maintaining this extension, you can request repository ownership. As a courtesy, you may want to contact the author. You should also remove this template and list yourself as maintaining the extension in the page's {{extension}} infobox. |
A request to archive this extension has been made on Phabricator. See 작업 T346010 for the archival request and the rationale for the request, and to leave comments about the request. |
![]() 출시 상태: 관리되지 않음 |
|
---|---|
구현 | 파서 확장 기능 |
설명 | Enables licenses to be set on a per-namespace or per-page basis |
만든 이 | (Leucosticte토론) |
최신 버전 | 1.1.0 (2017-10-30) |
호환성 정책 | 스냅샷은 미디어위키와 함께 릴리스됩니다. Master is not backward compatible. |
MediaWiki | 1.23+ |
데이터베이스 변경 | 아니오 |
라이선스 | GNU General Public License 3.0 or later |
다운로드 | |
예제 | http://wiki.mises.org |
|
|
Quarterly downloads | 1 (Ranked 163rd) |
PerPageLicense 확장 기능 번역 (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.
설치
- 파일을 다운로드하고
PerPageLicense
폴더를extensions/
디렉토리에 넣어 주세요. - 아래의 코드를 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.
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.
용법
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.