الگو:نصب پوسته

From mediawiki.org
This page is a translated version of the page Template:SkinInstall and the translation is 66% complete.
Outdated translations are marked like this.
  • Download and place the file(s) in a directory called SkinInstall in your skins/ folder.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    require_once "$IP/skins/SkinInstall/SkinInstall.php";
    
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.
Template documentation

استفاده

پارامترها اختیاری هستند!

1=
نام پوسته را به‌صورت دستی وارد کنید (پیش‌فرض نام برگۀ کنونی بدون پیشوند فضای نام).
download-link=
پیوند بارگیری (پیش‌فرض {{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.

نمونه‌ها

در پایین، چند نمونه برای چگونگی استفاده از این الگو آمده است:

ساده

{{SkinInstall}}
  • Download and place the file(s) in a directory called theskin in your skins/ folder.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.

نام

{{SkinInstall|erudite}}
  • Download and place the file(s) in a directory called erudite in your skins/ folder.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    require_once "$IP/skins/erudite/erudite.php";
    
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.

پیوند بارگیری

{{SkinInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
  • پوسته را دریافت کنید و پرونده(های) آن‌را در یک پوشه با نام theskin در پوشۀ skins/ جای‌گذاری کنید.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.

LocalSettings

{{SkinInstall
|localsettings=
$wgUseAjax = true;
$wgEnableMWSuggest = true;
}}
  • Download and place the file(s) in a directory called theskin in your skins/ folder.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    require_once "$IP/skins/theskin/theskin.php";
    $wgUseAjax = true;
    $wgEnableMWSuggest = true;
    
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.

گام‌های سفارشی

{{SkinInstall
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
  • Download and place the file(s) in a directory called theskin in your skins/ folder.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.

ثبت پوسته

{{SkinInstall
|registration=Yes
}}
  • Download and place the file(s) in a directory called theskin in your skins/ folder.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    wfLoadSkin( 'theskin' );
    
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.

برای کاربرانی که مدیاویکی ۱٫۲۴ یا قدیمی‌تر را اجرا می‌کنند:

دستورالعمل بالا، روش تازۀ نصب پوسته‌ها با استفاده از wfLoadSkin() را از مدیاویکی ۱٫۲۵ توضیح می‌دهد. اگر شما نیاز دارید تا پوسته را بر روی نگارش قدیمی‌تری نصب کنید، به‌جای wfLoadSkin( 'theskin' ); شما نیاز دارید تا از این استفاده کنید:

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

(برای اجرای یک پوسته روی یک انتشار قدیمی‌تر، شما نیاز دارید تا نگارش برچسب‌خورده برای همان انتشار را از Special:SkinDistributor دریافت کنید.)

سرگردان

{{SkinInstall
|vagrant=1
}}
  • اگر از Vagrant استفاده می‌‌کنید، با vagrant roles enable 1 -p نصب کنید

نصب دستی

  • Download and place the file(s) in a directory called theskin in your skins/ folder.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    require_once "$IP/skins/theskin/theskin.php";
    
  • Yes انجام شد - به 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 نصب کنید

نصب دستی

  • پوسته را دریافت کنید و پرونده(های) آن‌را در یک پوشه با نام Example در پوشۀ skins/ جای‌گذاری کنید.
  • کد زیر را در پایین پروندۀ LocalSettings.php خود بیفزایید:
    wfLoadSkin( 'Example' );
    $wgUseAjax = true;
    
  • Lorem ipsum dolor sit amet
  • Foo bar baz quux sandbox
  • Yes انجام شد - به Special:Version در ویکی خودتان بروید تا مطئمن شوید که پوسته با موفقیت نصب شده است.

برای کاربرانی که مدیاویکی ۱٫۲۴ یا قدیمی‌تر را اجرا می‌کنند:

دستورالعمل بالا، روش تازۀ نصب پوسته‌ها با استفاده از 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