ja
<languages/>
- ダウンロードして、ファイルを
extensions/
フォルダー内のExtensionInstall
という名前のディレクトリ内に配置します。 - 以下のコードを LocalSettings.php の末尾に追加します:
require_once "$IP/extensions/ExtensionInstall/ExtensionInstall.php";
- {{ Template:TNTN }} - ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
{{ Template:TNTN |content=
Contents
使用法
<templatedata> { "description": "Add instructions about installing an extension.", "params": { "1": { "label": "Extension name", "description": "Set the extension name manually.", "default": "The current page name without namespace prefix." }, "vagrant": { "label": "Vagrant role name", "description": "If given, shows how to install extension with the vagrant's enable-role command" }, "download-link": { "label": "Download link", "description": "Overwrite the download link.", "default": "Link to ExtensionDistributor with the extension name." }, "localsettings": { "label": "LocalSettings", "description": "Pass custom php code that the user should include in LocalSettings.php." }, "db-update": { "label": "Database update.", "description": "If the extension has one or more database tables that need to be created through update.php, set this parameter to any value." }, "custom-steps0": { "label": "Custom steps 0", "description": "Additional steps before download, e.g. other required extensions (as an unordered \"* list\")" }, "custom-steps": { "label": "Custom steps", "description": "Additional steps (as an unordered \"* list\")" }, "registration": { "label": "If the extension supports extension registration", "description": "Changes the template to use wfLoadExtension if it supports registration", "type": "boolean" } }, "format": "inline" } </templatedata>
例
Below a few examples of how to use this template:
単純
{{TNT|ExtensionInstall}}
{{ Template:TNTN |MyExtension}}
名前
{{TNT|ExtensionInstall|CategoryTree}}
{{ Template:TNTN |CategoryTree}}
ダウンロード リンク
{{TNT|ExtensionInstall |download-link=[http://bits.wikimedia.org/example.zip Download] }}
{{ Template:TNTN |MyExtension |download-link=Download }}
LocalSettings
{{TNT|ExtensionInstall |localsettings= $wgUseAjax = true; }}
{{ Template:TNTN |MyExtension |localsettings= $wgUseAjax = true; }}
データベースの更新
{{TNT|ExtensionInstall |db-update=Yes }}
{{ Template:TNTN |MyExtension |db-update=Yes }}
カスタム手順
{{TNT|ExtensionInstall |custom-steps= * Lorem ipsum dolor sit amet * Foo bar baz quux [[sandbox]] }}
{{ Template:TNTN |MyExtension |custom-steps=
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
}}
登録への対応
{{TNT|ExtensionInstall |registration=1 }}
{{ Template:TNTN |MyExtension |registration=1 }}
登録が必須
{{TNT|ExtensionInstall |registration=required }}
{{ Template:TNTN |MyExtension |registration=required }}
すべて
{{TNT|ExtensionInstall|Example |download-link=[http://bits.wikimedia.org/example.zip Download] |vagrant=example |localsettings= $wgUseAjax = true; |db-update=Yes |custom-steps= * Lorem ipsum dolor sit amet * Foo bar baz quux [[sandbox]] |registration=yes }}
{{ Template:TNTN |Example |download-link=Download |vagrant=example |localsettings= $wgUseAjax = true;
|db-update=Yes |custom-steps=
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
|registration=yes }}
}} [[Category:TemplatesTemplate:Translation]]