Jump to content

Template:SkinInstall/yue

From mediawiki.org
This page is a translated version of the page Template:SkinInstall and the translation is 34% complete.
  • 下載文件,將佢放置於你skins/文件夾嘅SkinInstall目錄中。
  • 將以下代碼添加到你LocalSettings.php 嘅底部:
    require_once "$IP/skins/SkinInstall/SkinInstall.php";
    
  • Yes Done - 喺你嘅wiki上打開Special:Version,確認佈景主題已經安裝成功。
Template documentation

用途

Parameters are optional!

1=
Set the skin name manually (defaults to the current page name without namespace prefix).
download-link=
Overwrite the download link (defaults to {{DownloadGitSnapshot }})
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.

Examples

Below a few examples of how to use this template:

Simple

{{SkinInstall}}
  • 下載文件,將佢放置於你skins/文件夾嘅theskin目錄中。
  • 將以下代碼添加到你LocalSettings.php 嘅底部:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes Done - 喺你嘅wiki上打開Special:Version,確認佈景主題已經安裝成功。

Name

{{SkinInstall|erudite}}
  • 下載文件,將佢放置於你skins/文件夾嘅erudite目錄中。
  • 將以下代碼添加到你LocalSettings.php 嘅底部:
    require_once "$IP/skins/erudite/erudite.php";
    
  • Yes Done - 喺你嘅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 Done - 喺你嘅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 Done - 喺你嘅wiki上打開Special:Version,確認佈景主題已經安裝成功。

Custom steps

{{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 Done - 喺你嘅wiki上打開Special:Version,確認佈景主題已經安裝成功。

Skin registration

{{SkinInstall
|registration=Yes
}}
  • 下載文件,將佢放置於你skins/文件夾嘅theskin目錄中。
  • 將以下代碼添加到你LocalSettings.php 嘅底部:
    wfLoadSkin( 'theskin' );
    
  • Yes Done - 喺你嘅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
}}
  • If using Vagrant , install with vagrant roles enable 1 -p

Manual installation

  • 下載文件,將佢放置於你skins/文件夾嘅theskin目錄中。
  • 將以下代碼添加到你LocalSettings.php 嘅底部:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes Done - 喺你嘅wiki上打開Special:Version,確認佈景主題已經安裝成功。

Everything

{{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
}}
  • If using Vagrant , install with vagrant roles enable accountinfo -p

Manual installation

  • Download,將佢放置於你skins/文件夾嘅Example目錄中。
  • 將以下代碼添加到你LocalSettings.php 嘅底部:
    wfLoadSkin( 'Example' );
    $wgUseAjax = true;
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes Done - 喺你嘅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