Bản mẫu:SkinInstall

This page is a translated version of the page Template:SkinInstall and the translation is 76% complete.
Outdated translations are marked like this.
  • Tải và đặt (các) tệp trong một thư mục với tên SkinInstall trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    require_once "$IP/skins/SkinInstall/SkinInstall.php";
    
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.
Template documentation

Cách sử dụng

Các tham số là tùy chọn!

1=
Đặt tên skin một cách thủ công (mặc định là tên trang không có tiền tố).
download-link=
Ghi đè link tải xuống (mặc định là {{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.

Ví dụ

Dưới đây là một vài ví dụ về cách sử dụng bản mẫu này:

Đơn giản

{{SkinInstall}}
  • Tải và đặt (các) tệp trong một thư mục với tên theskin trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

Tên

{{SkinInstall|erudite}}
  • Tải và đặt (các) tệp trong một thư mục với tên erudite trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    require_once "$IP/skins/erudite/erudite.php";
    
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

Link tải

{{SkinInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
  • Download và đặt (các) tệp trong một thư mục với tên theskin trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

LocalSettings

{{SkinInstall
|localsettings=
$wgUseAjax = true;
$wgEnableMWSuggest = true;
}}
  • Tải và đặt (các) tệp trong một thư mục với tên theskin trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    require_once "$IP/skins/theskin/theskin.php";
    $wgUseAjax = true;
    $wgEnableMWSuggest = true;
    
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

Các bước tùy biến

{{SkinInstall
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
  • Tải và đặt (các) tệp trong một thư mục với tên theskin trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

Đăng kí skin

{{SkinInstall
|registration=Yes
}}
  • Tải và đặt (các) tệp trong một thư mục với tên theskin trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    wfLoadSkin( 'theskin' );
    
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

Dành cho những người đang dùng MediaWiki 1.24 trở xuống:

Những chỉ dẫn bên trên diễn tả cách mới để cài skin sử dụng wfLoadSkin(), từ phiên bản MediaWiki 1.25. Nếu bạn muốn cài đặt skin trong những phiên bản cũ hơn, thay vì wfLoadSkin( 'theskin' );, bạn cần dùng:

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

(Để chạy một skin trong phiên bản cũ hơn, bạn có thể phải tải phiên bản của nó gắn với phiên bản tương ứng từ Special:SkinDistributor.)

Vagrant

{{SkinInstall
|vagrant=1
}}
  • Nếu đang dùng Vagrant , cài đặt bằng vagrant roles enable 1 -p

Cài đặt thủ công

  • Tải và đặt (các) tệp trong một thư mục với tên theskin trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

Tất cả

{{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
}}
  • Nếu đang dùng Vagrant , cài đặt bằng vagrant roles enable accountinfo -p

Cài đặt thủ công

  • Download và đặt (các) tệp trong một thư mục với tên Example trong thư mục skins/ của bạn.
  • Thêm mã sau vào dưới cùng tệp LocalSettings.php của bạn:
    wfLoadSkin( 'Example' );
    $wgUseAjax = true;
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes Xong - Chuyển tới Special:Version trên wiki của bạn để xác nhận skin được cài đặt thành công.

Dành cho những người đang dùng MediaWiki 1.24 trở xuống:

Những chỉ dẫn bên trên diễn tả cách mới để cài skin sử dụng wfLoadSkin(), từ phiên bản MediaWiki 1.25. Nếu bạn muốn cài đặt skin trong những phiên bản cũ hơn, thay vì wfLoadSkin( 'Example' );, bạn cần dùng:

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

(Để chạy một skin trong phiên bản cũ hơn, bạn có thể phải tải phiên bản của nó gắn với phiên bản tương ứng từ 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