Jump to content

قالب:ملف ميدياويكي

From mediawiki.org
This page is a translated version of the page Template:MW file and the translation is 100% complete.


توثيق القالب

يعرض صندوق معلومات عن ملف موجود في لب برمجيات ميدياويكي، مع وصلات إلى الكود المصدري للملف في الأفرع الرئيسية المستقرة القديمة، وكذلك وصلات شبكية إلى فئاتها وواجهاتها في صفحات توثيق بي إتش بي المولّدة.

{{MW file|FILENAME|PATH
|class1=CLASS
|class2=CLASS
|class3=CLASS
|...
|interface1=INTERFACE
|interface2=INTERFACE
|interface3=INTERFACE
|NotInGit=REASON
}}
  • FILENAME هو اسم الملف، مشتملًا على الامتداد.
    • لو جرت إعادة تسمية الملف مؤخرًا، يمكنك استخدام معاملات stable= وlegacy= لذكر الاسم القديم حتى تعمل الوصلات الشبكية؛ صوف تحتاج لتحديث استدعاء القالب حينما ينتقل الإصدار الذي تغير الاسم إليه من رئيسي إلى مستقر إلى قديم.
  • PATH هو مسار الملف؛ لا تذكر فيه الشرطة المائلة البادئة، بل اذكر الشرطة الماثلة التابعة. لا تدرج أي شيء في حالة الملفات الموجودة في المجلد الرئيسي.
  • إن متغيرات الدالة class هي أمور اختيارية، ولو أضيفت سوف تصل شبكيًا إلى أعمال التوثيق المولّدة. يجب أن تكون القيمة CLASS هي اسم الفئة، كما هي مستخدمة في معرف الموارد الموحد. مثال، سوف يتولد من «Parser» وصلة شبكية إلى «classParser.html». يسمح القالب بعدد يصل إلى ستة معاملات فئات، class1-class6
  • INTERFACE مشابه. يسمح القالب بعدد يصل إلى ثلاثة معاملات واجهة
  • متغيرات الدالة NotInGit اختيارية ويجب أن تستخدم فقط لو كان الملف غير موجود في غت لسبب ما (أظن أن هذا ينطبق على LocalSettings.php لا غير). REASON هو السبب الذي يُعرض في صندوق المعلومات. لاحظ أن NotInGit يتأثر باستخدام الأحرف اللاتينية الكبيرة أو الصغيرة!

يستخدم الدليل الإرشادي هذا القالب استخدامًا واسعًا.

أمثلة

{{MW file|index.php|}}


{{MW file|Article.php|includes/page/
|class1=Article
}}

{{MW file|WikiPage.php|includes/page/
|class1=WikiPage
|interface1=Page
}}

{{MW file|LocalSettings.php|
|NotInGit=تنشئ أثناء التثبيت
}}


انظر أيضا

Displays an informative box about a file in MediaWiki core, with links to its source code in master, stable, and legacy branches, and links to its classes and interfaces in the generated PHP documentation.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
File name1

Name of the file, including extension. If the file has been recently renamed, you can use the stable= and the legacy= parameters to provide the old name so links work; you'll need to update the template invocation as the release in which the file was renamed moves from master → stable → legacy.

Example
LocalSettings.php
Stringrequired
File path2

Path to the file; do not include a leading slash, include the trailing slash. Leave it blank for files in the root directory.

Example
includes/libs/
Stringrequired
Not in Git?NotInGit

Whether the version is in Git version control (only rarely used for files like LocalSettings.php and DevelopmentSettings.php). Optional and should only be used if the file is not in Git for some reason. Reason= is the reason that is displayed in the infobox. Note that NotInGit is CASE-SENSITIVE.

Example
created during installation
Stringoptional
Stable MediaWiki versionstable

no description

Unknownoptional
Legacy MediaWiki versionlegacy

no description

Unknownoptional
LTS MediaWiki Versionlts

Long-Term Support version for MediaWiki

Unknownoptional
Class 1class1

Class arguments are all optional, and if supplied will link to the generated documentation. Class should be the class name, as used in the URL. The template allows up to six class parameters

Example
"Parser" would generate a link to "classParser.html"
Stringsuggested
Class 2class2

no description

Unknownoptional
Class 3class3

no description

Unknownoptional
Class 4class4

no description

Unknownoptional
Class 5class5

no description

Unknownoptional
Class 6class6

no description

Unknownoptional
Interface 1interface1

Similar to Class. The template allows up to three interface parameters.

Unknownsuggested
Interface 2interface2

no description

Unknownoptional
Interface 3interface3

no description

Unknownoptional
Exampleexample

no description

Unknownoptional
nodisplaytitlenodisplaytitle

no description

Unknownoptional