跳至內容

模組:Userbox/doc

維基百科,自由的百科全書

此頁面為 Module:Userbox 的說明文件

本模塊用於執行三個用戶框模板:{{userbox}}、{{userbox-2}}、{{userbox-r}}。

模板 描述 示例
{{userbox}} 生成左邊帶 id 區或沒有 id 區的用戶框。
id{{{info}}}
{{{info}}}
{{userbox-2}} 生成左右兩邊都有 id 區的用戶框。
id1{{{info}}}id2
{{userbox-r}} 生成右邊帶 id 區的用戶框。
{{{info}}}id

為使用這些模板,請參閱各自模板的說明。為直接用 Lua 生成用戶框,請看:

以 Lua 生成用戶框[編輯]

為直接用 Lua 生成用戶框,先載入模塊:

local userbox = require('Module:Userbox')

然後您可用以下代碼運行任意三個模板:

userbox.main(functionName, args)

對於 {{userbox}} 使用函數名 _userbox;對於 {{userbox-2}} 使用函數名 _userbox-2;對於 {{userbox-r}} 使用函數名 _userbox-r。參數 args 用於處理不同用戶框功能,請參閱各自模板說明。