Bước tới nội dung

Bản mẫu:Xếp loại bản mẫu/doc

Bách khoa toàn thư mở Wikipedia

Usage

Basic usage:

{{Template rating|rating}}

Without categories:

{{Template rating|rating|nocat=true}}

Template automatically detects if in module or template namespace, and displays the applicable notice.

Also detects if template or module protected from editing, the template will automatically display a message regarding that too. The reason can optionally be specified, it must be written in full using the |reason= parameter. This must be a full message and not one word like the reasons on Template:Protection padlock § Reasons.

If the documentation subpage is also protected, {{Protection padlock}} can be manually generated on it when it is transcluded by declaring |doc-reason= the same value as you would enter in |1= in {{Protection padlock}}, and |doc-action= the same as the parameter of the name which is the protection action—must be one of edit (default; for normal protection), move (for move-protection) or autoreview (for pending changes): {{Template rating|rating|reason for documentation protection|action=the restricted action on documentation like move or edit}}

If {{Template rating}} is used outside the Template or Module namespace, an error message is displayed instead and will be categorized under Thể loại:Trang có bản mẫu dùng sai không gian tên (260).

For templates, the rating |1= can be:

  • {{Template rating|pre-alpha}}
  • {{Template rating|alpha}}
  • {{Template rating|beta}}
  • {{Template rating|release}}
  • {{Template rating|protected}} – deprecated but still accepted and displays equivalent as release; previously showed another protection message that was redundant to the message automatically shown by Template:Template rating/protected.

For modules, the rating |1= can be:

  • {{Template rating|pre-alpha}}
  • {{Template rating|alpha}}
  • {{Template rating|beta}}
  • {{Template rating|release}}
  • {{Template rating|broken}}
  • {{Template rating|deprecated}}

All parameter values are case-insensitive.

Template will not autocategorize if |nocat= set to true.

Examples

Module with protection

The protection is automatically detected, but this is what it would look like on Module:String for example which is fully-protected.

{{Template rating|release|reason=template|action=edit}}

TemplateData

Used to mark the status of a template as one of pre-alpha, alpha, beta, release, or protected

Tham số bản mẫu

Nên dùng bản mẫu này với các tham số đặt thành khối.

Tham sốMiêu tảKiểuTrạng thái
Rating1

The rating level of the template or module.

Giá trị đề nghị
pre-alpha alpha beta release broken deprecated
Chuỗi dàibắt buộc
Nocatnocat

Suppress categories.

Mặc định
false
Ví dụ
true
Luận lýtùy chọn
Replacement (if deprecated)replaced

If module is set to deprecated, then give wikilink of module that replace it if one exists.

Ví dụ
[[Module:Example]]
Tên trangtùy chọn
Message (if deprecated)message

If module is set to deprecated, then give optional message to append.

Nội dungtùy chọn
Suppress protection templatesuppress-pp

Suppress the protection template with any value.

Ví dụ
true
Chuỗi dàitùy chọn
Reason for protection (if protected)reason

Reason for protection; may be one of: blp, dispute, dmca, mainpage, office, reset, sock, template, usertalk, vandalism

Giá trị đề nghị
vandalism template dispute dmca mainpage reset
Chuỗi dàitùy chọn
Reason for protection of /doc subpage (if protected)doc-reason 2

Reason for protection of doc subpage; may be one of: blp, dispute, dmca, mainpage, office, reset, sock, template, usertalk, vandalism

Giá trị đề nghị
vandalism template dispute dmca mainpage reset
Chuỗi dàitùy chọn
Action restricted (if protected)action

Action which is restricted. Must be one of "edit" (for normal protection), "move" (for move-protection) or "autoreview" (for pending changes).

Giá trị đề nghị
edit move autoreview
Chuỗi dàitùy chọn
Action restricted of /doc subpage (if protected)doc-action 3

Action which is restricted. Must be one of "edit" (for normal protection), "move" (for move-protection) or "autoreview" (for pending changes).

Giá trị đề nghị
edit move autoreview
Không rõtùy chọn
demospacedemospace

không có miêu tả

Không rõtùy chọn
demopagedemopage

không có miêu tả

Không rõtùy chọn
demoleveldemolevel

không có miêu tả

Không rõtùy chọn

Tracking categories

It autocategorizes into (unless |nocat= set to true):

These categories are suppressed on pages ending with /doc and /sandbox. To suppress categories on all pages, you can use |nocat=true.

Error tracking: