Help:رده‌ها

This page is a translated version of the page Help:Categories and the translation is 43% complete.
Outdated translations are marked like this.
PD توجه: شما در هنگام ویرایش این صفحه، موافق با انتشار مشارکت‌هایتان تحت CC0 هستید. صفحه‌های راهنمای مالکیت عمومی را برای اطلاعات بیشتر ببینید. PD

دسته‌ها، یکی از ویژگی‌های نرم‌افزار مدیاویکی، نمایه‌های خودکاری را ارائه می‌کنند که به عنوان فهرست مطالب مفید هستند.

شما می توانید صفحات و فایل ها را با افزودن یک یا چند تگ "دسته" به متن محتوا دسته بندی کنید. این تگ ها لینک هایی را در پایین صفحه ایجاد می کنند که شما را به لیست تمام صفحات در آن دسته می برد، که مرور مقالات مرتبط را آسان می کند.

خلاصه

هر یک از صفحات در «دسته» نام فضای نام به‌اصطلاح «دسته»، گروه‌بندی از صفحات مرتبط، و نمایه‌ای برای صفحات دسته‌بندی خود را نشان می‌دهد. . به عنوان مثال، این صفحه متعلق به "رده:راهنما " است. اگر صفحه دسته را باز کنید، پیوندی به این صفحه در آنجا خواهید دید.

هنگامی که یک صفحه به یک یا چند دسته تعلق دارد، این دسته ها در پایین صفحه ظاهر می شوند (یا در گوشه سمت راست بالا، بسته به پوست مورد استفاده).

برگه‌های رده خود دارای ۲ قسمت هستند:

  • در ابتدای آنها، یک قسمت اختیاری ممکن است حاوی متنی باشد که می توان آن را ویرایش کرد، مانند هر صفحه دیگری،
  • در پایان، یک لیست همیشه حاضر، تولید خودکار، بر اساس حروف الفبا از تمام صفحات در آن دسته، به شکل پیوند. در واقع به ترتیب مرتب سازی یونیکد.

برای اختصاص یک دسته به یک صفحه، کافی است پیوند "[[[Category:Category name]]" را به ویکی‌متن صفحه اضافه کنید. محل معمول برای افزودن آن در پایین صفحه است.

برای پیوند دادن یک صفحه دسته در یک صفحه به عنوان یک پیوند ویکی معمولی (بدون افزودن صفحه به دسته)، پیشوند نام پیوند را با علامت دونقطه قرار دهید. به عنوان مثال: [[:دسته:در این دسته نیست]]

یک دسته جدید می تواند ایجاد قبل از اختصاص دادن هر صفحه ای به آن، مانند هر صفحه معمولی دیگر.

ویکی‌های منفرد ممکن است دسته‌های سطح بالای خود را داشته باشند، مانند Category:Contents در ویکی‌پدیا.

برای فهرست کامل همه دسته‌هایی که حداقل یک صفحه دارند، Special:Categories را ببینید.

برای فهرست کامل همه دسته‌های ایجاد/ویرایش شده، از جمله دسته‌هایی که هیچ صفحه‌ای ندارند، به Special:Allpages/Category: مراجعه کنید (به علامت دو نقطه در پایان توجه کنید).

افزودن یک برگه به یک رده

برای افزودن یک صفحه یا فایل آپلود شده به یک دسته، به سادگی صفحه را ویرایش کرده و متن زیر را اضافه کنید (که در آن Name نام دسته ای است که می خواهید آن را به آن اضافه کنید).

[[Category:نام]]

هر تعداد تگ Category ممکن است به صفحه اضافه شود و صفحه در همه آنها فهرست شود. تگ‌های Category به همراه پیوندهای زبان بین‌ویکی که در نوار کناری قرار می‌گیرند، معمولاً برای راحتی سایر ویرایش‌گران در پایین صفحه اضافه می‌شوند.

در یک صفحه طبقه بندی شده، دسته ها در کادر دسته بندی ها: دقیقاً به ترتیبی که در ویکی متن ظاهر می شوند، نمایش داده می شوند.

اگر $wgUseCategoryBrowser روی true تنظیم شود، در زیر فهرست اول، هر دسته مجدداً به سبک breadcrumb فهرست می‌شود، با تمام دسته‌های اصلی آن، که بر اساس حروف الفبا مرتب شده‌اند. (حداقل در مدیاویکی 1.18.2) اگر یک دسته زیرمجموعه ای از بیش از یک والد باشد، هر دو سلسله مراتب فهرست می شوند، اما دسته برچسب گذاری شده از همه آنها به جز یکی حذف می شود. اگر دسته‌ای با چندین والدین «و» یکی از والدین آن هر دو در یک صفحه برچسب‌گذاری شوند، این پتانسیل ورودی‌های تکراری را ایجاد می‌کند. برای مثال فرض کنید Maryanne زیرمجموعه ای از Mary و Anne باشد. اگر صفحه ای دسته بندی های Maryanne و Anne را برچسب گذاری کند، دسته بندی پودر سوخاری نشان داده می شود

Anne 
Anne
Mary -> Maryanne

به نظر می رسد "آن" تکراری است، اما منظور این است

Anne 
Anne -> Maryanne
Mary -> Maryanne

This is a bug, and has been reported in phab:T35614.

کلید مرتب‌سازی

By default, a page is sorted within a category under the first letter of its name — without the namespace. Also, MediaWiki groups accented characters separately from their unaccented version, so pages starting by À, Á, Ä, will be listed under separate headings, instead of under heading A. (If you have shell access, these defaults can be changed using $wgCategoryCollation .)

A sort key specifies under which letter heading, and where in the category list, the page will appear. You can add a sort key by placing it inside the tag after a pipe character. For example, the tag below will add the page under heading "S".

[[Category:نام|مرتب‌سازی]]

Whether or not sort keys are case-sensitive depends on your configuration settings. The order of the sections within a category follows the Unicode sort order. The sort key does not change the page title displayed in the category.

Spaces and other characters are perfectly valid.

See Help:مرتب‌سازی for further information on category sorting.

ساختن یک صفحهٔ رده

Categories exist even if their page has not been created, but these categories are isolated from others and serve little purpose for organisation or navigation.

A category is created by creating a page in the Category: namespace. A category page can be created the same way as other wiki pages (see Help:شروع‌کردن یک صفحه جدید ); just add "Category:" before the page title.

To avoid extra work, try searching within your wiki before creating a new category. The list of all categories can be found in "صفحه‌های ویژه" in the "ابزارها" box of the sidebar.

Managing the category hierarchy

Categories may belong to other categories in a hierarchy. Since category pages are much like any other page, a Category tag may be added to the bottom of a category page.

It is a good idea to organise all categories into a hierarchy with a single top level category. The category structure can take the form of a tree with separate branches, but more often will have a graph structure. Generally, there should be a contiguous chain of parent-child links between each category and the top level category.

Category tree

مقالهٔ اصلی: CategoryTree extension manual

Since MediaWiki 1.31, CategoryTree extension is packaged by default, allowing Special:CategoryTree and ‎<categorytree> to provide a tree-like structure display for the categories.

رده‌های مخفی

The categories that a page is in are normally listed at the bottom of the page. In MediaWiki 1.13+, a category can be hidden from this list by adding the magic word "__HIDDENCAT__" to the category page.

Users can choose to see hidden categories in a separate "ردهٔ پنهان" list, by checking "رده‌های پنهان نمایش داده شود" in the "نمایش صفحه" section of Special:Preferences.

Hidden categories are automatically added to Category:Hidden categories. This category is specified in the system message MediaWiki:Hidden-category-category.

Linking to a category

To create a link to a category, use a leading colon before the category name (without this colon, the current page would be added to the category):

[[:Category:Help]]Category:Help

To change the link text, write the text inside the link tag after a pipe:

[[:Category:Help|Help category]]Help category

Redirect pages that redirect to categories must also use the colon, otherwise they will be added to the category instead of redirecting.

Categories and templates (transcluded pages)

If you add [[Category:Cats]] inside a template (a transcluded page), both the template and pages which transclude this template will be categorised as Cats.

  • If you want only the template to be categorised, you should ensure to write category marker inside <noinclude> tags.
  • If you want only the pages which uses the template to be categorised, but not the template itself, you should ensure to write category marker inside <includeonly> tags.

Due to caching issues, editing categories applied through templates may take a while to be visible everywhere. You can perform a null edit on a page to update immediately its categories.

Redirecting a category

Like normal wiki pages, category pages can be redirected to other normal or category pages. However, this is not recommended, as pages categorised in redirected categories do not get categorised in the target category (phab:T5311). Some Wikimedia sites use a "category redirect" template to mark redirected categories, allowing manual or automated cleanup of pages categorised there.

Tracking categories

Certain syntax issues, such as a broken image link, or too many expensive parser functions, can cause a page to be added to a tracking category. Help:رده‌های ردیابی را برای جزئیات ببینید.

Renaming a category

If you move a category, since redirect will not work for categorising, all category tags will be wrong, so you have to fix them.

جستارهای وابسته