Module:Message box: Difference between revisions

Jump to navigation Jump to search
refer to discord server since nobody really uses talk pages here, i have no idea how modules work so hopefully this doesn't break everything
imported>YungCyraxxAlt
(Created page with "require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions ---------------------------------------------------------------------------...")
 
imported>Larsonologist
(refer to discord server since nobody really uses talk pages here, i have no idea how modules work so hopefully this doesn't break everything)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
require('strict')
local getArgs
local getArgs
local yesno = require('Module:Yesno')
local yesno = require('Module:Yesno')
Line 115: Line 114:
obj.categories = {}
obj.categories = {}
obj.classes = {}
obj.classes = {}
-- For lazy loading of [[Module:Category handler]].
obj.hasCategories = false
obj.hasCategories = false


Line 276: Line 274:
                     else
                     else
                         talkText = string.format(
                         talkText = string.format(
                             '%s the [[%s#%s|talk page]].',
                             '%s the [[%s#%s|talk page]] or the Discord server.',
                             talkText,
                             talkText,
                             talkTitle.prefixedText,
                             talkTitle.prefixedText,
Line 455: Line 453:
end
end
-- Convert category tables to strings and pass them through
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return require('Module:Category handler')._main{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
end


Cookies are necessary for this wiki to function properly. By using this wiki, you agree to our use of cookies.

Navigation menu