跳至內容
主選單
主選單
移至側邊欄
隱藏
導覽
首頁
近期變更
建立新頁面
隨機頁面
五大觀念?
新手使用指南
頁面存廢討論
百科財務報告
微國家百科
搜尋
搜尋
建立帳號
登入
個人工具
建立帳號
登入
暗色模式
檢視 模組:Error 的原始碼
模組
討論
English
閱讀
檢視原始碼
檢視歷史
工具
工具
移至側邊欄
隱藏
操作
閱讀
檢視原始碼
檢視歷史
一般
連結至此的頁面
相關變更
特殊頁面
頁面資訊
取得短網址
←
模組:Error
由於以下原因,您無權編輯此頁面:
您請求的操作只有這個群組的使用者能使用:
使用者
您可以檢視並複製此頁面的原始碼。
-- This module implements {{error}}. local p = {} local function _error(args) local message = args.message or args[1] or error('没有指定的-{zh-cn:信息; zh-tw:資訊}-', 2) message = tostring(message) local tag = mw.ustring.lower(tostring(args.tag)) -- Work out what html tag we should use. if not (tag == 'p' or tag == 'span' or tag == 'div') then tag = 'strong' end -- Generate the html. local root = mw.html.create(tag) root :addClass('error') :wikitext(message) return tostring(root) end function p.error(frame) local args if frame == mw.getCurrentFrame() then -- We're being called via #invoke. The args are passed through to the module -- from the template page, so use the args that were passed into the template. args = frame.args else -- We're being called from another module or from the debug console, so assume -- the args are passed in directly. args = frame end -- if the message parameter is present but blank, change it to nil so that Lua will -- consider it false. if args.message == "" then args.message = nil end return _error(args) end return p
此頁面使用了以下模板:
模組:Error/doc
(
檢視原始碼
)
返回到「
模組:Error
」。
切換限制內容寬度