首頁
關於我們
隨機
新手使用指南
貢獻分數
建立新頁面
最近修改
特殊頁面
社群入口
設定
關於合眾百科 Unitedbook
免責聲明
搜尋
使用者選單
討論
貢獻
建立賬號
登入
正在編輯
模組:Error
警告:
您尚未登入。 若您進行任何的編輯您的 IP 位址將會被公開。 若您
登入
或
建立帳號
,您的編輯將會以您的使用者名稱標示,並能擁有另外的益處。
防垃圾訊息檢查用。
請勿
填寫此欄位!
-- 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
摘要:
請注意,所有於合眾百科 Unitedbook所做的貢獻會依據CC BY-NC-SA(創用CC 姓名標示─非商業性─相同方式分享)授權條款發佈(詳情請見
合眾百科:版權
)。若您不希望您的著作被任意修改與散佈,請勿在此發表文章。
您同時向我們保證在此的著作內容是您自行撰寫,或是取自不受版權保護的公開領域或自由資源。
請勿在未經授權的情況下發表文章!
取消
編輯說明
(在新視窗開啟)
此頁面使用了以下模板:
模組:Error/doc
(
編輯
)