Editing Module:Message box

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 66: Line 66:
obj.cfg = cfg[boxType]
obj.cfg = cfg[boxType]
if not obj.cfg then
if not obj.cfg then
        styles = 'Module:Message box/styles.css'
local ns = obj.title.namespace
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
-- boxType is "mbox" or invalid input
Line 83: Line 84:
elseif ns == 0 then
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
obj.cfg = cfg.ambox -- main namespace
            styles = 'Module:Message box/styles.css'
elseif ns == 6 then
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
obj.cfg = cfg.imbox -- file namespace
            styles = 'Module:Message box/styles.css'
elseif ns == 14 then
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
obj.cfg = cfg.cmbox -- category namespace
            styles = 'Module:Message box/styles.css'
else
else
local nsTable = mw.site.namespaces[ns]
local nsTable = mw.site.namespaces[ns]
            styles = 'Module:Message box/styles.css'
if nsTable and nsTable.isTalk then
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
obj.cfg = cfg.tmbox -- any talk namespace
Please note that all contributions to Meta Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Meta Wiki:Copyrights for details). Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: