Template:SkinInstall/zh

This page is a translated version of the page Template:SkinInstall and the translation is 83% complete.
Outdated translations are marked like this.
  • 下载文件,并将其放置在您skins/文件夹中的SkinInstall目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    require_once "$IP/skins/SkinInstall/SkinInstall.php";
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。
模板文档

用法

各参数是可选的!

1=
手动设置皮肤名称(默认为当前页面名,不带名字空间前缀)。
download-link=
覆盖下载链接(默认是 {{模板:下载Git快照 }})
basedir=
Directory that repo should be installed in and front-end resources are exposed through (defaults to skins, change to extensions if needed).
localsettings=
Pass custom PHP code that the user should include in LocalSettings.php
custom-steps=
Additional steps (as an unordered list)
registration=
New way to install skin or extension.

示例

以下是如何使用此模板的例子:

简单

{{SkinInstall}}
  • 下载文件,并将其放置在您skins/文件夹中的theskin目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

名称

{{SkinInstall|erudite}}
  • 下载文件,并将其放置在您skins/文件夹中的erudite目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    require_once "$IP/skins/erudite/erudite.php";
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

下載連結

{{SkinInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
  • Download文件,并将其放置在您skins/文件夹中的theskin目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

LocalSettings

{{SkinInstall
|localsettings=
$wgUseAjax = true;
$wgEnableMWSuggest = true;
}}
  • 下载文件,并将其放置在您skins/文件夹中的theskin目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    require_once "$IP/skins/theskin/theskin.php";
    $wgUseAjax = true;
    $wgEnableMWSuggest = true;
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

自定义步骤

{{SkinInstall
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
  • 下载文件,并将其放置在您skins/文件夹中的theskin目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

皮肤注册

{{SkinInstall
|registration=Yes
}}
  • 下载文件,并将其放置在您skins/文件夹中的theskin目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    wfLoadSkin( 'theskin' );
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

致使用MediaWiki 1.24或更早版本的用户:

上面的说明介绍的是自MediaWiki 1.25以来,使用wfLoadSkin()安装皮肤的新方法。 如果您需要在早期版本中安装此皮肤,您需要使用这样的代码(而不是 wfLoadSkin( 'theskin' );):

require_once "$IP/skins/theskin/theskin.php";

(要在早期发布版本中运行皮肤,您可能需要下载标记为来自Special:SkinDistributor发布的版本。)

Vagrant

{{SkinInstall
|vagrant=1
}}
  • 如果使用Vagrant ,请通过vagrant roles enable 1 -p安装

手动安装

  • 下载文件,并将其放置在您skins/文件夹中的theskin目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

任何

{{SkinInstall|Example
|download-link=[http://bits.wikimedia.org/example.zip Download]
|localsettings=
$wgUseAjax = true;

|db-update=Yes
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
|registration=Yes
|vagrant=accountinfo
}}
  • 如果使用Vagrant ,请通过vagrant roles enable accountinfo -p安装

手动安装

  • Download文件,并将其放置在您skins/文件夹中的Example目录内。
  • 将下列代码放置在您的LocalSettings.php 文件的底部:
    wfLoadSkin( 'Example' );
    $wgUseAjax = true;
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes 完成 - 在您的wiki上打开Special:Version,以确认皮肤已成功安装。

致使用MediaWiki 1.24或更早版本的用户:

上面的说明介绍的是自MediaWiki 1.25以来,使用wfLoadSkin()安装皮肤的新方法。 如果您需要在早期版本中安装此皮肤,您需要使用这样的代码(而不是 wfLoadSkin( 'Example' );):

require_once "$IP/skins/Example/Example.php";

(要在早期发布版本中运行皮肤,您可能需要下载标记为来自Special:SkinDistributor发布的版本。)

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Skin name over-ride1

Set the skin name manually

Default
name of the current page name without namespace prefix
Stringoptional
Download link over-ridedownload-link

Overwrite the download link

Default
{{DownloadGitSnapshot}}
Stringoptional
New-style registrationregistration

Whether to use the new style to register the skin

Booleanoptional
Installation directorybasedir

Directory that repo should be installed in and front-end resources are exposed through (defaults to skins, change to extensions if needed).

Stringoptional
LocalSettings codelocalsettings

Custom PHP code that the user should include in LocalSettings.php

Stringoptional
Custom stepscustom-steps

Additional steps (as an unordered * list) that you need to undertake to install the skin.

Stringoptional
nocreditsnocredits

no description

Booleanoptional