มอดูล:Effective protection level/doc
นี่คือหน้าคู่มือการใช้งานของ มอดูล:Effective protection level ใช้ในการเขียนคำอธิบายแม่แบบหรือมอดูลและใส่หมวดหมู่ ส่วนลิงก์ข้ามภาษาโปรดใช้วิกิสนเทศ |
มีการใช้มอดูลนี้ในข้อความระบบ การแก้ไขอาจทำให้เกิดผลกระทบหรือสังเกตเห็นได้เป็นวงกว้าง เพื่อหลีกเลี่ยงผลกระทบกว้างขวาง ดังนั้นก่อนแก้ไขมอดูลนี้จึงควรทดลองที่กระบะทราย หรือหน้าทดสอบ หรือในมอดูลกระบะทรายของคุณเองจนมั่นใจว่าไม่มีข้อผิดพลาดหน้าอภิปรายก่อนที่จะนำไปใช้ |
มอดูลนี้ส่งคืนกลุ่มผู้ใช้ที่สามารถกระทำสิ่งใด ๆ ในหน้าได้ ผลลัพท์ปัจจุบันเป็นดังนี้
- แม่แบบและมอดูล: autoconfirmed
- หน้าในเนมสเปซมีเดียวิกิ: sysop
- หน้าที่เป็นหน้ารองสไตล์ชีตและจาวาสคริปต์ของผู้ใช้: interfaceadmin
- หน้าที่เป็นหน้ารอง JSON ของผู้ใช้: sysop
- หน้าที่ถูกป้องกัน: sysop หรือ autoconfirmed
- หน้าที่ถูกป้องกันแบบต่อเรียง: sysop
- ชื่อหน้าตรงกับบัญชีดำ: sysop
- การย้ายไฟล์: uploader หรือ sysop
- อัปโหลดไฟล์: uploader หรือ sysop
- อื่น ๆ: * (ทุกคน)
การใช้งาน[แก้]
ระวัง: มอดูลนี้ใช้งานตัวแจงส่วนที่อาจก่อปัญหาแก่เซิร์ฟเวอร์ถึง 4 ตัวในแต่ละครั้งที่เรียกใช้ โดยจะใช้มอดูลนี้เมื่อจำเป็นเท่านั้น หากไม่จำเป็นขนาดนั้นกรุณาเปลี่ยนไปใช้ title.protectionLevels แทน
จากมอดูลอื่น[แก้]
ใช้:
local effectiveProtectionLevel = require('Module:Effective protection level')._main
The function accepts two parameters. The first is a string containing the action to check, which must be one of "edit", "create", "move", "upload", or "autoreview". The second is optional, and can either be the name of the page to check, or a title returned from the mw.title functions. If the second parameter is omitted, the page being displayed is the one checked against. The return value is a string containing the name of the group required to perform the given action.
From wikitext[แก้]
The parameters are the same as when it is called directly.
แม่แบบ:Tlinv