Template:Extension
![]() | このテンプレートは、テンプレート構文の難解な機能を使用しています。
このテンプレートを編集する前に、その構造とパーサー関数に習熟することを強くお勧めします。 このテンプレートは数多くのページで使用されている場合があるため、あなたの編集によって予期しない問題点が発生した場合は、その編集をただちに取り消してください。 いかなる変更をする場合も、その前に汎用のサンドボックスまたは自身の利用者空間で実験できること、改良点をすべてテストすべきであること、を忘れてはいけません。 |
![]() | このテンプレートはLuaを使用しています: |
![]() | This template uses TemplateStyles: |
このテンプレートは表示しているwikiのすべての拡張機能ページ (各メインページに限る) に追加する必要があります。 すると便利な基礎情報ボックスを付け加え (下記参照)、拡張機能を自動的に カテゴリ:すべての拡張機能 に追加すると同時に、適切な状態 および実装の種類 のカテゴリに分類します。
使用法
以下をコピー & ペーストします: {{Extension |templatemode = |name = |status = |type1 = |type2 = |hook1 = |hook2 = |newhook1 = |newhook2 = |username = |author = |description = |image = |imagesize = |version = |update = |version preview = |update preview = |compatibility policy = |mediawiki = |php = |needs-updatephp = |composer = |table1 = |table2 = |license = |download = |repo = |readme = |changelog = |help = |example = |namespace = |parameters = |tags = |rights = |compatibility = |phabricator = |translate = |vagrant-role = }}パラメーターの値のヘルプは下記を参照してください。 |
|
コンテンツのパラメーター
この節では情報ボックスの内容を制御するパラメーターを解説します。
templatemodeその他の制御パラメーターに関するヘルプは制御のパラメーターを参照してください。
パラメーター | 説明 |
---|---|
name | 拡張機能の名前 |
status |
現在のリリースの状態 以下のいずれか:
上記以外のステータスの場合は無視され、代わりに既定値である「Unknown」がテンプレートに表示されます。 値が省略された場合は、unknownに分類されます。 値が無効な場合は、エラーを発見して修正できるようにするため特殊なカテゴリに配置されます。 |
type1 type2 type3 type4 type5 type6 | 実装の種類
この拡張機能を構築するために採用した実装戦略。 このパラメーターはカテゴリを作成し、プログラマが MediaWiki 固有の実装戦略またはパターンを探しやすくします。 ときにはこのパラメーターの値が特定の拡張機能の使用ケースや目的と衝突することもありますが、このパラメーターの目的はそこにはありません。 このパラメーターに選んだ値が適切に目的あるいは可能性のあるユースケースと適合しない場合は、必要に応じてカテゴリ リンクを追加するようお勧めしています。 Allowed values for the type1, type2, ... parameters are:
Any other value for 'type' is invalid, and will cause the extension to be placed in Category:Extensions with invalid or missing type/ja. Note: Many extensions have more than one type, if this applies to yours, replace|type= with |type1=|type2=|type3=... . You may define up to six types for an extension. |
hook1 hook2 hook3 hook4 ... |
拡張機能が使用する各フックの名前
Entering values in this field is a good way to get exposure for your extension and help other developers. Each documented hook will automatically add the extension to a category listing extensions that use that hook. This category is autolinked to each hook page so that programmers can easily find examples of extensions that use a particular hook. For built-in hooks:
For custom hooks defined by extensions:
For multiple hooks, assign the first hook to hook1, the second to hook2 and so on. |
newhook1 newhook2 newhook3 newhook4 ... newhook90 |
name of each hook provided by the extension You might also want to add the hooks to Extension hook registry. |
username | MediaWiki.orgでの作者の利用者名 (登録済の場合)。 省略可能ですが、登録してある場合は作者の利用者ぺージならびにそのトークページにリンクするため使用します。 名前空間名と[[]]を除去して記入します。 |
MediaWiki.org での利用者名と異なる場合、拡張機能の作者名。 フリーテキスト。 省略すると'username'欄を使用 (登録済みの場合)。 | |
description | 短い説明 |
image | 拡張機能のスクリーンショットまたはロゴ。 名前空間名と[[]]を除去して記入します。 |
imagesize | 文字通りpxを除いた画像サイズ。例: 360 (既定値は300px) |
version | 最終バージョン |
update | 最終更新の日付 |
version preview | Preview version |
update preview | Date of the last update to the preview version |
compatibility policy | 互換性の方針 (認められる値は master, main, rel, ltsrel)。 (製品バックログ ) |
mediawiki | 必要とする MediaWiki のバージョン Most extensions should not need to use this — it defaults to the value of the 'requires' property of extension.json. Category:Extensions without MediaWiki version および Category:Extensions with manual MediaWiki version も参照してください。 |
php | 必要な PHP のバージョン |
needs-updatephp |
Extensions which conform to MediaWiki extension standards come with a schema change script which you need to start manually (once) before starting and accessing the MediaWiki through your browser, and after you copied all the extension files to
$IP は、あなたが MediaWiki をインストールしたインストールパス (または「ディレクトリ」) を意味します (Install Path の略)。そのディレクトリには LocalSettings.php 、index.php などがあります。 |
composer | The extension's Composer package name, in the standard format. It will be automatically included if set in an extension's "composer.json" file (i.e. this parameter is not required in that case). It will be linked to the extension's page on Packagist. |
table1 table2 table3 table4 ... table30 | name of each non-core table used by the extension Links to a subpage of your extension page. For instance, "table1 = cu_changes" at Extension:CheckUser will link to Extension:CheckUser/cu_changes table . Don't list core tables such as page or revision ; only list tables that are added by extensions. |
license | License governing use of this extension, as one of the codes found in https://spdx.org/licenses/, e.g. GPL-2.0-or-later , GPL-2.0-only or GPL-3.0-or-later , etc. |
download | link to the download : Git, {{WikimediaDownload/ja}}. |
repo | Name of the Gerrit repository the extension's code is stored in, if different from the page name. Setting this automatically sets |download= , and allows the template to automatically load data from the appropriate extension.json file. |
readme | External link to the readme file, e.g. https://phabricator.wikimedia.org/r/browse/mediawiki/extensions/Flow;master;README |
changelog | External link to the changelog file, e.g. Extension:GeoGebra/Changelog |
help | Link to user-help for the extension. If not provided, will look for Help:Extension:ExtensionName . If provided, full wikitext link should be given (because you may want to link to e.g. an external page). |
example | Example, website or screenshot of working extension |
namespace | namespace in which this extension is used |
parameters | Available parameters for LocalSettings.php |
Any tags your extension uses (e.g. <tag1>, <tag2>). | |
rights | Rights added by the extension. Not to be confused with the license! Rights are such as makebot or desysop , not such as GFDL or LGPL or GPL - those are licenses! |
compatibility | Additional compatibility information, for instance compatibility charts. It's encouraged to add any client-side compatibility information here too, especially when diverging from expectations of full support for a browser. |
bugzilla | Bugzilla MediaWiki extension component name |
phabricator | Phabricator プロジェクト名 |
translate |
Optional parameter to link the exact page where (message group id with which) the extension will be translatable on translatewiki.net if enabled. If the default link is incorrect, manually set it to:
|
vagrant-role | MediaWiki-Vagrant role |
CheckUsageNameOverride | Override the page name used for the check usage link. |
制御のパラメーター
パラメーター | 説明 |
---|---|
templatemode |
Controls auto-categorisation of host page. Normally left blank. Alternate values are:
|
基礎情報ボックスの使用
既存の拡張機能ページ
既存のページに情報ボックスを追加するには、このページ冒頭のコードをコピー&ペーストします。
拡張機能の記事の新規作成
拡張機能の新規ページを作成するには、下記の欄にページ名を記入してボタンをクリックします。 すると基礎情報ボックスを備えた新規ページが作成されます。
A developer sharing their code in the MediaWiki code repository should expect:
- フィードバック / 批評 / コード レビュー
- Review and comments by other developers on things like framework use, security, efficiency and usability.
- Developer tweaking
- Other developers modifying your submission to improve or clean-up your code to meet new framework classes and methods, coding conventions and translations.
- Improved access for wiki sysadmins
- If you do decide to put your code on the wiki, another developer may decide to move it to the MediaWiki code repository for easier maintenance. You may then create a 開発者アカウント to continue maintaining it.
- 他の開発者による将来のバージョン
- New branches of your code being created automatically as new versions of MediaWiki are released. You should backport to these branches if you want to support older versions.
- Incorporation of your code into other extensions with duplicate or similar purposes — incorporating the best features from each extension.
- 帰属
- Credit for your work being preserved in future versions — including any merged extensions.
- Similarly, you should credit the developers of any extensions whose code you borrow from — especially when performing a merger.
Any developer who is uncomfortable with any of these actions occurring should not host in the code repository. You are still encouraged to create a summary page for your extension on the wiki to let people know about the extension, and where to download it.
テンプレートの強化
テンプレート改善に取り組もうと考えていますか、よろしくお願いします! テンプレートが複雑なため、いくつか手順のヘルプを提供します。
拡張機能作成ボタン
拡張機能作成ボタンの挙動を改善する方法:
- Template:Extension/Sample : The boilerplate extension that is preloaded into newly-created pages.
- Template:Extension/CreateExtensionInputBox : An input box that can be inserted wherever you want users to easily create extensions. For documentation on the
<inputbox>
tag, please see Extension:InputBox .
基礎情報ボックスのパラメーター
一般的には:
- To make this template easy to use, each label in the infobox is linked to documentation on the template parameter(s) it displays. If you add a parameter, please be sure to also add it to the content parameter documentation and link its label to that documentation.
To change/correct/add to the implementation type parameters:
- Check the talk page - there have been some extensive discussions about this field.
- The valid types and what they link to are defined at Module:Extension
フックパラメータの挙動を変更するには:
- Template:Extension/HookInUse: Adds links and categories for a hook in use. Multiple hooks in use are implemented by calling this template with Template:Foreach.
- Template:Extension/HookInUseNoCats: Used instead of Template:Extension/HookInUse when this template is used in
templatemode=nocats
. Templates used with Template:Foreach can only take one parameter so we need to wrap the call to Template:Extension/HookInUse with another template that sets the mode.
テストケース
このテンプレートを編集したあとで、以下のページが正しく表示されるか試してみます。
TemplateData
TemplateData | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
これは、ビジュアルエディターまたは他のツールで使用される、このテンプレート向けのテンプレートデータ説明文です。 Extension An infobox for a MediaWiki extension.
|
Maintenance: vulnerabilities, archived