Search Results: Module:If in category/testcases
Sorry, the article you're looking for isn't specifically available. Here are related topics:
Module:If preview
Selasa, 2024-09-10 02:58:02getArgs local yn = require("Module:Yesno") local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first...
Click to read more »Module:If preview/sandbox
Sabtu, 2024-09-21 08:46:21loadData('Module:If preview/configuration') p.pvwc = p.pvwc or package.loaded["Module:If preview/preview warning counter"] or require("Module:If preview/preview...
Click to read more »Module:Article stub box
Senin, 2026-03-23 03:14:13it? Maybe not? cats = setmetatable({}, {__newindex = function(t, i, v) if not rawget(t, i) then rawset(t, i, v) table.insert(t, i) end end})...
Click to read more »Module:Check for unknown parameters
Jumat, 2025-10-17 18:01:38passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list require ('strict'); local p = {} local...
Click to read more »Module:InfoboxImage
Sabtu, 2025-10-18 16:45:47set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder...
Click to read more »Module:Infobox
Senin, 2026-06-08 07:50:22pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg...
Click to read more »Module:Adjacent stations
Jumat, 2025-10-03 10:27:24getData(system, verify) if verify then local title = mw.title.new('Module:Adjacent stations/' .. system -- .. '/sandbox' ) if not (title and title...
Click to read more »Module:Infobox/sandbox
Senin, 2026-06-08 01:11:32pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg...
Click to read more »Module:InfoboxImage/sandbox
Kamis, 2026-06-04 23:55:51set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder...
Click to read more »Module:Check for unknown parameters/sandbox
Senin, 2025-10-06 13:52:57passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list require ('strict'); local p = {} local...
Click to read more »Module:Lang
Rabu, 2026-05-13 06:20:12are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that...
Click to read more »Module:String
Selasa, 2025-08-12 06:48:56can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading...
Click to read more »Module:Lang/sandbox
Rabu, 2026-05-13 06:17:18are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that...
Click to read more »Module:Citation/CS1
Sabtu, 2026-02-28 22:14:46-- if first is initials with or without suffix if 3 > mw.ustring.len (name) then -- if one or two initials if suffix then ...
Click to read more »Module:EditAtWikidata
Rabu, 2025-10-15 02:53:05entry for the article where this is placed. -- This message is only displayed if a local_parameter is not supplied -- i.e. when called from a template, it...
Click to read more »Module:EditAtWikidata/sandbox
Minggu, 2022-03-13 11:13:40entry for the article where this is placed. -- This message is only displayed if a local_parameter is not supplied -- i.e. when called from a template, it...
Click to read more »Module:Arguments
Rabu, 2020-04-01 13:12:40local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return...
Click to read more »Module:IPA symbol
Sabtu, 2026-04-18 10:49:58t[sub(s, i, i + 1)] or t[sub(s, i, i)] if ret then return ret end end ret = t[sub(s, -1)] -- Last character if ret then return ret end end local...
Click to read more »Module:WikidataCheck/sandbox
Kamis, 2023-11-30 17:34:06check if we're in a good namespace local ns = mw.title.getCurrentTitle().namespace for v in mw.text.gsplit( namespaces, ",", true) do if tonumber(v)...
Click to read more »Module:WikidataCheck
Kamis, 2023-11-30 18:27:19check if we're in a good namespace local ns = mw.title.getCurrentTitle().namespace for v in mw.text.gsplit( namespaces, ",", true) do if tonumber(v)...
Click to read more »Module:WikidataIB
Sabtu, 2025-12-27 18:46:46Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page...
Click to read more »Module:String/sandbox
Selasa, 2025-08-12 06:46:44can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading...
Click to read more »Module:Road data/strings/doc
Rabu, 2025-12-10 01:20:58always specified, using an empty string "", if there is no value. shield determines the shield that is displayed, if any name specifies the name of the route...
Click to read more »Module:Authority control
Sabtu, 2026-02-07 04:46:53if not additional and id.prefix then --show prefix on primary value link:wikitext(id.prefix .. ': ') end local valid_value = false if id.customlink...
Click to read more »Module:Wikidata
Sabtu, 2023-03-04 11:35:36end if precision == 8 then era = mw.ustring.gsub(i18n.datetime[8], "$1", tostring(math.floor(math.abs(intyear) / 10) * 10)) end if era then if addon...
Click to read more »Module:Citation/CS1/sandbox
Minggu, 2026-04-26 21:34:02-- if first is initials with or without suffix if 3 > mw.ustring.len (name) then -- if one or two initials if suffix then ...
Click to read more »Module:Arguments/sandbox
Rabu, 2021-04-21 16:30:15local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return...
Click to read more »Module:Adjacent stations/MTR
Sabtu, 2026-05-09 14:10:55stacked bottom bars local function bottomBars(cols) local n = #cols if n == 0 then return "" end local total = n * 6 + 1 local images =...
Click to read more »Module:Adjacent stations/Metro Trains Melbourne
Minggu, 2026-06-07 09:21:25text-align:center; padding: 0.45em; white-space: nowrap; margin: 0.25em;" if not styleText or styleText == "" then return default end local cols =...
Click to read more »Module:Math
Jumat, 2026-04-10 21:26:08throw an error if given an explicit nil parameter, so we need to use if statements to check the params. if first and second then if first <= second...
Click to read more »Module:String2
Rabu, 2025-02-19 19:24:59string if present; TODO: this can be string.match()? local upcased; if first_text then if first_text:match ('^%[%[[^|]+|[^%]]+%]%]') then -- if <first_text>...
Click to read more »Module:Coordinates
Senin, 2026-01-26 03:35:45used in detecting DMS formatting ]] local function dmsTest(first, second) if type(first) ~= 'string' or type(second) ~= 'string' then return nil end...
Click to read more »Module:Sports table
Senin, 2025-12-08 23:02:04'' local bsection = frame.args['section'] or '' if( tsection ~= '' and bsection ~= '' ) then if( tsection ~= bsection ) then return '' end end...
Click to read more »Module:ISO 3166
Rabu, 2025-10-29 00:55:28function cats(cat, args) if not (args.nocat and args.nocat == 'true') and mw.title.getCurrentTitle().namespace == 0 then if cat == 'nocountry' then ...
Click to read more »Module:College color
Sabtu, 2026-05-23 06:29:09leading # (if there is one) c = mw.ustring.match(c, '^[#]*([a-f0-9]*)$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 )...
Click to read more »Module:Wikidata/sandbox
Sabtu, 2023-03-04 11:34:03end if precision == 8 then era = mw.ustring.gsub(i18n.datetime[8], "$1", tostring(math.floor(math.abs(intyear) / 10) * 10)) end if era then if addon...
Click to read more »Module:Excerpt slideshow
Minggu, 2024-08-18 18:19:31for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Adjacent stations/Manila MRT
Kamis, 2026-05-21 10:46:47version of MRT-7 logo local mrt7logo = mw.getCurrentFrame():preprocess( "{{If dark|[[File:Manila Line 7 logo white.png|20px|link=MRT Line 7 (Metro Manila)]]|[[File:Manila...
Click to read more »Module:Location map
Selasa, 2026-05-26 13:47:54math.floor(n * pow + 0.5) / pow end function p.getMapParams(map, frame) if not map then error('The name of the location map definition to use must...
Click to read more »Module:Yesno
Rabu, 2020-04-01 13:27:55similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you --...
Click to read more »Module:Road data/parser
Sabtu, 2024-08-24 16:40:02to test against argument; if empty, the argument is -- tested for existence -- match is the string to be substituted if the argument matches value...
Click to read more »Module:Excerpt/portals
Rabu, 2026-05-13 00:55:29'''bold text''' if requested if is(options.nobold) then text = mw.ustring.gsub(text, "'''", "") end -- Keep only tables if requested if is(options.tablesOnly)...
Click to read more »Module:Coordinates/sandbox
Senin, 2026-01-12 03:40:02used in detecting DMS formatting ]] local function dmsTest(first, second) if type(first) ~= 'string' or type(second) ~= 'string' then return nil end...
Click to read more »Module:Road data/parser/hooks
Rabu, 2025-10-29 23:24:14split(parameters, args) local route = tonumber(string.match(args.route, "%d+")) or 0 if route < parameters.split then return parameters.below else return parameters...
Click to read more »Module:Portal maintenance status
Minggu, 2018-12-23 23:46:20for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Box-header
Senin, 2025-06-02 12:08:25parameter) if args[parameter] then return args[parameter] end local aliases = parameterAliases[parameter] if not aliases then return nil end if type(aliases)...
Click to read more »Module:Portal-inline
Senin, 2026-03-16 21:34:14message and tracking category -- Arguments: -- errMsg: string, or nil/false if no error -- trackingCat: string for tracking category (or empty string)...
Click to read more »Module:Road data/strings/USA/AR
Senin, 2022-09-12 09:13:06below = "Interstate %route% in Arkansas"}} for k, v in pairs(AR) do if k:find ("^I") then v.link = AR.I.link end end AR.US.name = "U.S. Highway...
Click to read more »Module:Random slideshow
Jumat, 2025-03-28 20:28:55for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Selected recent additions
Senin, 2026-03-16 11:37:42for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Selected current events
Rabu, 2025-01-01 09:00:51for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Random portal component
Sabtu, 2020-10-03 17:08:46Portal namespace if (mw.title.getCurrentTitle().nsText ~= "Portal") then return "" end -- no tracking if this is a subpage if ((mw.ustring.match(thispagetitle...
Click to read more »Module:Road data/strings/USA/WA
Kamis, 2023-07-20 10:39:44pairs(WA) do if k:find ("^I") then v.link = WA.I.link end end WA.BL.link = "Interstate %route% Business" .. suffix for k, v in pairs(WA) do if k:find ("^BL")...
Click to read more »Module:Road data/strings/USA/NY
Rabu, 2025-04-30 04:02:21York)" NY.I.link = "Interstate %route% (New York)" for k, v in pairs(NY) do if k:find ("^I") then v.link = NY.I.link end end NY.BL.link = "Interstate...
Click to read more »Module:Convert
Kamis, 2026-01-15 09:19:56{{convert|123|lb|kg}} --> 123 pounds (56 kg) -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. local MINUS = '−' -- Unicode U+2212 MINUS SIGN...
Click to read more »Module:Road data/strings/HKG
Senin, 2021-12-20 06:27:01Route -- add new types above this line if you want them to have browse and maint for k, v in pairs(HKG) do if k:find ("^%a") then v.maint = "[[Highways...
Click to read more »Module:Portal image banner
Senin, 2023-04-03 03:55:58for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Portal pictures
Jumat, 2021-11-19 07:00:17images = {} local subpages = {} for key, value in pairs(args) do if value then if type(key) == "number" then -- positional parameters correspond...
Click to read more »Module:Road data/strings/USA/NJ
Minggu, 2022-09-25 10:26:42below = "Interstate %route% in New Jersey"}} for k, v in pairs(NJ) do if k:find ("^I") then v.link = NJ.I.link end end NJ["I-Alt"].banner = "Alt...
Click to read more »Module:If empty
Jumat, 2023-01-27 01:33:28getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end...
Click to read more »Module:Transclude DYK
Rabu, 2018-07-25 23:07:18Limit to the DYK section if present local sectionstart = mw.ustring.find(text, "\n==''Did you know?'' articles==", 1, true) if sectionstart then local...
Click to read more »Module:Road data/strings/USA/TX
Sabtu, 2023-12-16 07:06:16local spec = TX[" aux "][auxType] for k, v in pairs(TX) do if k:find (auxType) then if k:find ("^I-") then v.link = "Interstate %route% " .. spec...
Click to read more »Module:Road data/strings/MEX
Jumat, 2025-01-17 11:07:54add new types above this line if you want it to have the provincial highway browse and maint for k, v in pairs(MEX) do if k:find ("^%a") then v.browse...
Click to read more »Module:Road data/strings/CAN/ON
Kamis, 2025-06-05 19:26:18if def.shield then regionalShields[division] = def.shield end if def.shieldmain then regionalShieldmains[division] = def.shieldmain end if def...
Click to read more »Module:BaseConvert
Rabu, 2022-04-13 11:58:12input base) from = tonumber(from) if not from or from < 34 then local c n, c = n:gsub('^(-?)0[Xx]', '%1') if c > 0 and not from then from = 16 end...
Click to read more »Module:Political party
Sabtu, 2026-02-21 23:27:56non-A-Z starts if string.match(index, '%A') then return '1' end return string.upper(index) end local function stripToNil(text) -- If text is a string...
Click to read more »Module:Portal
Minggu, 2025-05-25 01:07:03getCurrentTitle() if thisPage.isTalkPage then return false end local ns = thisPage.nsText:lower() for _, v in ipairs(badNamespaces) do if ns == v then...
Click to read more »Module:Wd
Rabu, 2025-07-23 02:53:47i18n local i18nPath local function loadI18n(aliasesP, frame) local title if frame then -- current module invoked by page/template, get its title from...
Click to read more »Module:Text
Sabtu, 2025-04-26 19:19:49QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then...
Click to read more »Module:Build bracket
Selasa, 2025-08-19 23:45:35attachGroups(state, config, Helpers, StateChecks) -- (Harmless guard if user passed odd ranges) if (tonumber(config.c) or 1) < (tonumber(config.minc) or 1) then...
Click to read more »Module:Build bracket/sandbox
Selasa, 2025-08-26 21:10:36attachGroups(state, config, Helpers, StateChecks) -- (Harmless guard if user passed odd ranges) if (tonumber(config.c) or 1) < (tonumber(config.minc) or 1) then...
Click to read more »Module:Yesno/sandbox
Selasa, 2026-04-28 03:24:02similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you --...
Click to read more »Module:Ustring
Sabtu, 2024-02-17 11:51:51setmetatable({}, { __index = function(t, k) local what = mw.ustring[k] if type(what) ~= "function" then return what end return function(frame)...
Click to read more »Module:Sports color
Selasa, 2026-06-09 05:50:22= 1, ["retired"] = 1, ["free agent"] = 1, } local colors = nil if ( team and use_default[team:lower()] ) then colors = {"DCDCDC", "000000"...
Click to read more »Module:Citation/CS1/Configuration
Sabtu, 2026-02-28 22:14:44assigned value if k then if k:find ('^display') then -- if <k> is one of the |display-<namelist>= parameters if v:match ('%d+') then...
Click to read more »Module:Unsubst
Sabtu, 2021-10-09 01:22:16override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body....
Click to read more »Module:TemplatePar
Kamis, 2023-04-20 01:13:15access ] if not suited then finer() lucky, r = pcall( fun, "Module:" .. storage ) end if not lucky then if not suited...
Click to read more »Module:Protection banner
Rabu, 2026-02-18 15:46:08dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success...
Click to read more »Module:Example
Selasa, 2026-02-03 09:13:20number.' if the above condition is met. The string concatenation operator is denoted by 2 dots. else -- If no conditions are met, i.e. if b is anything...
Click to read more »Module:Road data/strings/USA
Minggu, 2026-04-12 07:47:50abbr, width = "expand", bannersuffix = "1971" } for k, v in pairs(USA) do if k:find ("US 19%d%d") then v.color = { arg = "route", ["66"] = "hist"...
Click to read more »Module:Team bracket
Kamis, 2024-08-15 01:16:30'^[\'%s]*([%d%.]*).-$', '%1') if s1 ~= '' and s2 ~= '' then s1 = tonumber(s1) s2 = tonumber(s2) if s1 and s2 then if (s1 == s2) then ps1 = tonumber(ps1)...
Click to read more »Module:Message box
Senin, 2025-10-20 01:19:52expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns...
Click to read more »Module:Gridiron color
Senin, 2026-04-13 00:56:07local colors = unknown if (not use_default[team:lower()]) then if mw.ustring.find(team, "%d?%d?%d%dthru%d?%d?%d%d$") then if (not year or year <= 0)...
Click to read more »Module:Navbox
Rabu, 2026-02-25 00:16:57in ipairs(s) do v = mw.text.trim(v, "%s;") if not isblank(v) then r = r .. v .. ';' end end if isblank(r) then return nil end return r end local...
Click to read more »Module:Page
Sabtu, 2025-03-22 23:31:48= args['p'..i] or pargs['p'..i] end if not id and not mw.ustring.match( page, '%S' ) then page = nil end if id then title = callAssert(mw.title...
Click to read more »Module:WikidataIB/sandbox
Senin, 2025-12-22 06:49:07Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page...
Click to read more »Module:Location map/data/Australia Australian Capital Territory
Kamis, 2018-03-22 18:38:0445, image = 'Australia Capital Territory location map.svg', -- image1 = 'should only be defined if there is a relief image with same coordinates' }...
Click to read more »Module:Template wrapper
Sabtu, 2022-10-22 04:11:46for value; return true if found, false else ]] local function is_in_table (tbl, value) for k, v in pairs (tbl) do if v == value then return...
Click to read more »Module:Location map/sandbox
Selasa, 2026-06-02 04:25:47math.floor(n * pow + 0.5) / pow end function p.getMapParams(map, frame) if not map then error('The name of the location map definition to use must...
Click to read more »Module:Team bracket/sandbox
Rabu, 2024-08-14 14:16:16'^[\'%s]*([%d%.]*).-$', '%1') if s1 ~= '' and s2 ~= '' then s1 = tonumber(s1) s2 = tonumber(s2) if s1 and s2 then if (s1 == s2) then ps1 = tonumber(ps1)...
Click to read more »Module:Gridiron color/contrast
Kamis, 2026-04-02 03:10:26colors = nil if ( team and use_default[team:lower()] ) then colors = {"DCDCDC", "000000"} else colors = all_colors[team] if ( colors and type(colors)...
Click to read more »Module:Sports color/contrast
Jumat, 2026-03-20 19:48:47colors = nil if ( team and use_default[team:lower()] ) then colors = {"DCDCDC", "000000"} else colors = all_colors[team] if ( colors and type(colors)...
Click to read more »Module:College color/contrast
Kamis, 2026-04-02 03:11:37colors = nil if ( team and use_default[team:lower()] ) then colors = {"DCDCDC", "000000"} else colors = all_colors[team] if ( colors and type(colors)...
Click to read more »Module:List
Senin, 2026-03-02 12:52:06Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table...
Click to read more »Module:Excerpt
Jumat, 2026-03-06 19:56:17if title.isRedirect then title = title.redirectTarget if fragment == "" then fragment = title.fragment -- page merge potential end end if...
Click to read more »Module:Age
Rabu, 2025-12-10 15:08:14stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text)...
Click to read more »Module:Autotaxobox
Selasa, 2026-03-17 12:06:48is assumed that a valid taxobox colour is defined using CSS rgb() syntax. If no taxon that sets a taxobox colour is found, then 'transparent' is returned...
Click to read more »Module:See also if exists
Jumat, 2025-01-10 03:41:08do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace) if title...
Click to read more »Module:Footnotes
Minggu, 2025-03-02 10:29:01category; if not tally then if args.ignore then return ''; -- if ignore is true then no message, no category end if article_whitelist...
Click to read more »Module:Unicode data
Selasa, 2025-09-16 09:46:49local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1)...
Click to read more »Module:Sports color/basketball
Selasa, 2026-06-09 08:10:35= "BC Luleå", ["Djurgårdens IF Basket"] = {"203763", "FFFFFF", "5EB7EB", "FFFFFF"}, ["Djurgårdens IF"] = "Djurgårdens IF Basket", ["Köping Stars"] =...
Click to read more »Module:Chart
Minggu, 2025-10-05 10:07:07trim( s ) == '' end local function createGroupList( tab, legends, cols ) if #legends > 1 and not hideGroupLegends then table.insert( tab, mw.text.tag(...
Click to read more »Module:Adjacent stations/Mumbai Metro
Sabtu, 2026-01-17 23:16:07stacked bottom bars local function bottomBars(cols) local n = #cols if n == 0 then return "" end local total = n * 6 + 1 local images =...
Click to read more »Module:Redirect
Jumat, 2021-09-10 14:46:37new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a --...
Click to read more »Module:Sports results
Jumat, 2024-10-11 04:03:21getArgs local Args = getArgs(frame, {parentFirst = true}) -- Exit early if we are using section transclusion for a different section local tsection...
Click to read more »Module:Infobox3cols
Senin, 2026-05-25 12:20:24pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg...
Click to read more »Module:College color/sandbox
Sabtu, 2026-05-23 09:34:52leading # (if there is one) c = mw.ustring.match(c, '^[#]*([a-f0-9]*)$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 )...
Click to read more »Module:Syrian Civil War detailed map
Senin, 2026-06-01 05:19:01sources &/or status description (if available, the cursor will show as [[File:Pointing hand cursor vector.svg|25px]]; if not, it will show as [[File:Cursor...
Click to read more »Module:Country alias
Senin, 2026-04-20 17:47:33stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text)...
Click to read more »Module:Convert/documentation/conversion data
Senin, 2026-03-02 10:32:53gives conversion factors correct to 7 places. Factors in bold are exact. If exact factors have more than 7 places, they are rounded and no longer exact...
Click to read more »Module:List/sandbox
Senin, 2026-03-02 12:57:07Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table...
Click to read more »Module:Portal/images/c
Kamis, 2025-12-25 04:02:52local hour=tonumber(os.date("%k")) if hour >= 22 or hour < 6 then ambox_globe = "Ambox globe Asia Australia.svg" else if hour >= 14 and hour < 22 then ...
Click to read more »Module:Citation/CS1/Date validation
Minggu, 2026-01-18 02:25:14C C E S S D A T E >---------------------------------------- returns true if: Wikipedia start date <= accessdate < today + 2 days Wikipedia start date...
Click to read more »Module:Political party/sandbox
Sabtu, 2026-02-21 21:25:57non-A-Z starts if string.match(index, '%A') then return '1' end return string.upper(index) end local function stripToNil(text) -- If text is a string...
Click to read more »Module:Portal/images/aliases
Selasa, 2025-12-02 12:09:56case, and the "Portal:" namespace prefix -- should be omitted. For example, if you wanted "UK" to be an alias for "Portal:United Kingdom", then the -- alias...
Click to read more »Module:Infobox3cols/sandbox
Senin, 2026-05-25 12:16:45pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg...
Click to read more »Module:Category series navigation
Minggu, 2026-06-07 23:58:55= '' local testcases = string.match(currtitle.subpageText, '^testcases') if testcases then testcasecolon = ':' end local navborder = true local followRs...
Click to read more »Module:TableTools
Minggu, 2024-08-18 11:19:07isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it...
Click to read more »Module:Signpost
Sabtu, 2023-12-16 07:24:07ipairs(Article.viewSpans) do Article["getViews" .. span] = function(self) if self.data.views then return self.data.views[string.format("d%03d", span)]...
Click to read more »Module:Navbar
Rabu, 2023-10-11 05:34:57get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg...
Click to read more »Module:UserLinks
Minggu, 2024-09-01 00:20:30and that it is not the blank string. Returns the code if -- the check passes, and nil if not. if type(code) == 'string' and code ~= '' then return...
Click to read more »Module:CS1 translator
Jumat, 2026-03-06 13:45:32function in_array (needle, haystack) if needle == nil then return false; end for n, v in ipairs (haystack) do if v == needle then return n; end...
Click to read more »Module:Random
Rabu, 2015-11-11 23:32:54---------------------------------------------------- -- Set this to true if your wiki has a traffic rate of less than one edit every two minutes or so...
Click to read more »Module:ConvertNumeric
Kamis, 2023-02-09 08:04:17numerator, if any (default = 1 if a denominator is given) -- denominator (string or nil): denominator, if any -- sp_us (boolean): true if sp=us -- negative_word...
Click to read more »Module:Month translator
Sabtu, 2022-10-22 11:19:11if 'dump' == args_t[1] then -- args_t[1] = 'dump' to dump <month_names_t> table; return mw.dumpObject (data.month_names_t); end if not...
Click to read more »Module:Hatnote
Selasa, 2025-03-18 22:47:33function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline)...
Click to read more »Module:Wikidata table
Kamis, 2026-02-12 20:56:00local card = tonumber(cardinal) if not card then return cardinal end local ordsuffix = i18n.ordinal.default if card % 10 == 1 then ordsuffix = i18n...
Click to read more »Module:ISO 639 name
Kamis, 2024-07-11 22:43:33parenthetical disambiguators if any name = name:gsub ('([^,]-), +(.+)', '%2 %1'); -- if inverted, uninvert end if link then --...
Click to read more »Module:Color contrast
Senin, 2025-03-31 03:30:40(v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <=...
Click to read more »Module:Age/sandbox
Selasa, 2025-12-09 10:52:00stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text)...
Click to read more »Module:Citation/CS1/Configuration/sandbox
Rabu, 2026-06-03 02:12:03assigned value if k then if k:find ('^display') then -- if <k> is one of the |display-<namelist>= parameters if v:match ('%d+') then...
Click to read more »Module:Wikt-lang
Minggu, 2025-06-22 00:01:58m_data.languages or m_data local p = {} local function ifNotEmpty(value) if value == "" then return nil else return value end end local function...
Click to read more »Module:Citation/CS1/Identifiers
Senin, 2026-01-19 22:36:14todays_date = lang:formatDate ('U'); if good1 then -- if embargo date is a good date if tonumber (embargo_date) >= tonumber (todays_date)...
Click to read more »Module:Unicode convert
Minggu, 2021-04-11 20:12:30options. ['10'] = '%d', dec = '%d' })[frame.args['base']] or '%04X' if codepoint <= 0xFFFF then -- NB this also returns lone surrogate characters...
Click to read more »Module:Convert/extra
Minggu, 2026-05-17 13:34:23-- should cause little server overhead and should propagate quickly. -- -- If a unit is defined in the data module, any definition here is ignored, -- so...
Click to read more »Module:Convert/sandbox
Senin, 2026-03-02 10:48:21{{convert|123|lb|kg}} → 123 pounds (56 kg) -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. local MINUS = '−' -- Unicode U+2212 MINUS SIGN...
Click to read more »Module:RoundN
Kamis, 2024-03-07 20:54:05'#C96', '#f9f9f9'}, reuseStr = {}, saveStr = function(self, name, ...) if not self.reuseStr[name] then self.reuseStr[name] = table.concat{...} ...
Click to read more »Module:Episode list
Sabtu, 2025-10-11 08:47:09Short Summary cell. local nonNilParams = 0 -- Variable that will keep track if a TBA value was entered. local cellValueTBA = false -- Variable that handles...
Click to read more »Module:CS1 translator/data
Minggu, 2026-04-26 06:54:08end if v then -- if the parameter has a non-nil translation (not a special, not a parameter without cs1|2 equivalent) if (k:find...
Click to read more »Module:Date
Rabu, 2026-02-18 10:21:21} end local function strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (convenient when...
Click to read more »Module:Taxonbar
Minggu, 2025-12-14 22:45:10) if thing == nil or thing == '' then return true end return nil end local function getIdFromWikidata( item, property ) local id = nil if property...
Click to read more »Module:Protection banner/sandbox
Kamis, 2026-04-16 03:24:56dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success...
Click to read more »Module:Find sources
Minggu, 2022-02-27 20:33:28searchStrings = {} for i, s in ipairs(searchTerms) do searchStrings[i] = s end if transformFunc then for i, s in ipairs(searchStrings) do searchStrings[i]...
Click to read more »Module:Separated entries
Senin, 2025-10-13 23:33:18values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named...
Click to read more »Module:Citation/CS1/COinS
Sabtu, 2025-04-12 20:48:47(title); if is_set (title) then title = strip_apostrophe_markup (title); -- strip any apostrophe markup else title = ''; -- if not...
Click to read more »Module:Convert/data
Kamis, 2026-01-15 16:43:54loaded only once per page. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- -- These data tables follow: -- all_units ...
Click to read more »Module:Template test case
Kamis, 2025-08-07 00:01:43with messages from the -- config module. local msg = self.cfg.msg[key] if select(1, ...) then return mw.message.newRawMessage(msg, ...):plain() else...
Click to read more »Module:If in page
Senin, 2019-07-15 00:59:57ustring pattern, 2 - value if present, 3 - value if absent, -- page - page to test if not this page function p._main(args) if not args["page"] then...
Click to read more »Module:Str find word
Senin, 2023-04-03 07:35:55separation --- if yesno(tArgs.literals, false) then if false then local _, sCount _, sCount = mw.ustring.gsub(sWordlist, '"', '') if sCount > 1 then...
Click to read more »Module:Routemap
Kamis, 2026-03-26 07:59:00'">' if not t1 or string.find(t1, '^%s*$') then if not t2 then t2 = '' end if string.find(t2, '<br ?/?>') == nil then t1 = ' ' end end if not...
Click to read more »Module:Color contrast/sandbox
Senin, 2025-03-31 03:29:26(v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <=...
Click to read more »Module:Navbox/sandbox
Kamis, 2026-05-21 17:13:41in ipairs(s) do v = mw.text.trim(v, "%s;") if not isblank(v) then r = r .. v .. ';' end end if isblank(r) then return nil end return r end local...
Click to read more »Module:Political party/doc
Rabu, 2026-02-11 18:49:35party. If a name value is not stored for a party, the module will attempt to return the other "short" name variant before returning the input. Thus, if abbrev...
Click to read more »Module:Footnotes/sandbox
Jumat, 2025-05-16 04:41:13category; if not tally then if args.ignore then return ''; -- if ignore is true then no message, no category end if article_whitelist...
Click to read more »Module:Documentation
Rabu, 2025-03-12 10:38:41Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type...
Click to read more »Module:Unsubst/sandbox
Rabu, 2026-06-03 03:52:34from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame...
Click to read more »Module:If empty/sandbox
Rabu, 2023-01-11 17:43:15getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end...
Click to read more »Module:Message box/sandbox
Rabu, 2026-01-14 07:04:32expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns...
Click to read more »Module:Fiction-based redirects to list entries category handler
Jumat, 2026-05-29 15:04:01\"Category:series-name content-type redirects to lists\"" --[[ Local function which checks if the category exists. --]] local function doesCategoryExist(category) return...
Click to read more »Module:Math/sandbox
Jumat, 2026-04-10 00:08:08throw an error if given an explicit nil parameter, so we need to use if statements to check the params. if first and second then if first <= second...
Click to read more »Module:Sidebar
Selasa, 2025-12-30 01:10:22uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n...
Click to read more »Module:Graph
Sabtu, 2025-07-12 23:57:01_(xAxisFormat_=) -- linewidths - doesnt work for two values (eg 0, 1) but work if added third value of both are zeros? Same for marksStroke - probably bug in...
Click to read more »Module:Namespace detect
Minggu, 2014-04-06 00:01:23The -- -- module can also use the corresponding subject namespace value if it is -- -- used on a talk page. Parameter names can be configured for...
Click to read more »Module:English variant notice
Senin, 2026-05-18 05:39:33making iupac and oxford not be added to the id if it doesn't exist --Generate the text if it isn't specified if not n.text then p.modify_text () p.base_text...
Click to read more »Module:Sports table/WDL
Kamis, 2025-04-24 06:03:07style="text-align:center;"\n') -- Open table -- Table title if Args['title'] or Args['table_header'] then table.insert(t,'|+ ' .. (Args['title']...
Click to read more »Module:Infobox mapframe
Senin, 2025-11-24 11:39:55for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Citation/CS1/Identifiers/sandbox
Kamis, 2026-06-04 20:26:17todays_date = lang:formatDate ('U'); if good1 then -- if embargo date is a good date if tonumber (embargo_date) >= tonumber (todays_date)...
Click to read more »Module:URL
Kamis, 2025-11-13 05:08:00msg == 'false' -- boolean: true if msg is "false" or starts with n or N if url == '' then if text == '' then if nomsg then return nil else...
Click to read more »Module:Citation/CS1/Date validation/sandbox
Minggu, 2026-03-29 21:38:23C C E S S D A T E >---------------------------------------- returns true if: Wikipedia start date <= accessdate < today + 2 days Wikipedia start date...
Click to read more »Module:TableTools/sandbox
Kamis, 2024-08-15 03:03:06isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it...
Click to read more »Module:Sandbox/DePiep/uchar
Selasa, 2023-08-01 22:45:17:attr('id', 'testH') :css('font-size', '150%') :wikitext( tChar.uChar ) if tChar.uIsWhitespace == true then h:css('background', WS_BLUE) end --:newline()...
Click to read more »Module:Citation/CS1/Utilities
Minggu, 2026-01-18 02:25:10function in_array (needle, haystack) if needle == nil then return false; end for n, v in ipairs (haystack) do if v == needle then return n; end...
Click to read more »Module:Userbox
Sabtu, 2025-10-04 09:14:54greater than or equal to zero. If so, -- returns it as a number. If not, returns a default value. val = tonumber(val) if val and val >= 0 then return...
Click to read more »Module:Side box
Selasa, 2026-03-17 03:05:56table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower()...
Click to read more »Module:Redirect template handler
Kamis, 2024-06-27 16:55:32which validates parameter usage through Module:Check for unknown parameters. If calling module has additional valid args that are not part of this module...
Click to read more »Module:Convert/text
Minggu, 2025-10-05 14:15:45for use on another wiki. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- Some units accept an SI prefix before the unit...
Click to read more »Module:English variant notice/sandbox
Senin, 2026-02-16 16:05:22making iupac and oxford not be added to the id if it doesn't exist --Generate the text if it isn't specified if not n.text then p.modify_text () p.base_text...
Click to read more »Module:Template wrapper/sandbox
Jumat, 2022-10-21 16:56:15for value; return true if found, false else ]] local function is_in_table (tbl, value) for k, v in pairs (tbl) do if v == value then return...
Click to read more »Module:Citation/CS1/Suggestions
Sabtu, 2023-01-14 21:43:32-- German ['originaltitel'] = 'title', -- German (if 'originaltitel' is specified, any possible contents of 'title' should be put...
Click to read more »Module:Protected edit request
Minggu, 2025-05-11 03:02:03require('Module:Message box').main local getArgs local activeBox -- lazily initialized if we get an active request -----------------------------------------------...
Click to read more »Module:Autotaxobox/sandbox
Kamis, 2025-07-17 19:35:19is assumed that a valid taxobox colour is defined using CSS rgb() syntax. If no taxon that sets a taxobox colour is found, then 'transparent' is returned...
Click to read more »Module:Category more if exists
Minggu, 2023-02-26 14:08:35do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace) if title...
Click to read more »Module:Television episode redirect handler
Sabtu, 2026-04-18 10:18:54function which creates a season category, checks if it exists and returns it if it does or an empty string if it doesn't. --]] local function getSeasonCategory(seriesName...
Click to read more »Module:Navbar/sandbox
Rabu, 2025-08-13 12:10:29get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg...
Click to read more »Module:If preview/configuration
Kamis, 2021-05-06 01:56:00return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:If preview/styles.css' } } end return { preview = is_preview(), templatestyles...
Click to read more »Module:String2/sandbox
Rabu, 2025-02-19 19:23:52string if present; TODO: this can be string.match()? local upcased; if first_text then if first_text:match ('^%[%[[^|]+|[^%]]+%]%]') then -- if <first_text>...
Click to read more »Module:Labelled list hatnote
Kamis, 2025-05-29 01:18:35if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display...
Click to read more »Module:Separated entries/sandbox
Senin, 2025-10-13 23:32:53values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named...
Click to read more »Module:Commons link
Kamis, 2024-10-24 17:43:16end if formatting.bold then style = style.."font-weight:bold; " end if formatting.nowrap then style = style.."white-space:nowrap; " end if style...
Click to read more »Module:WPSHIPS utilities
Selasa, 2026-04-07 00:38:23(frag, frag_len) local nat = ''; if not data.nationality_t [frag[1]] then -- if not a one-word nationality if 2 <= frag_len - 2 then ...
Click to read more »Module:UserLinks/sandbox
Jumat, 2025-11-28 19:06:27and that it is not the blank string. Returns the code if -- the check passes, and nil if not. if type(code) == 'string' and code ~= '' then return...
Click to read more »Module:Fiction redirect category handler
Sabtu, 2026-04-18 11:11:01redirectTemplateHandler.setFictionalObjectRedirect(args, objectType, validArgs) if (unknownParametersErrors) then return redirectCategoryShell .. unknownParametersErrors...
Click to read more »Module:RfD
Rabu, 2025-04-16 04:48:47getCurrentTitle() if not messageBox then messageBox = require('Module:Message box') end local discussionPage = args[1] and mw.text.trim(args[1]) if discussionPage...
Click to read more »Module:Lang/data
Senin, 2026-05-04 04:40:57data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source_t) do out[k:lower()]...
Click to read more »Module:Check for conflicting parameters
Minggu, 2025-12-28 10:34:01trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1...
Click to read more »Module:Wd/sandbox
Jumat, 2025-08-08 00:45:17i18n local i18nPath local function loadI18n(aliasesP, frame) local title if frame then -- current module invoked by page/template, get its title from...
Click to read more »Module:Category handler
Rabu, 2020-04-01 13:12:40trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then if s ~= '' then return s...
Click to read more »Module:Unsubst-infobox
Senin, 2024-07-29 08:54:24function ( frame ) if not frame:getParent() then error( '{{#invoke:Unsubst-infobox|}} makes no sense without a parent frame' ) end if not frame.args['$B']...
Click to read more »Module:Data
Rabu, 2026-02-18 23:41:00success, data = pcall(mw.loadData, k) if not success then success, data = pcall(mw.loadJsonData, k) if not success then error("'" .. k .. "'...
Click to read more »Module:Fiction-based redirects to list entries category handler/RedirectType
Kamis, 2024-06-27 01:00:59If no media format is passed, the function returns the default top level category. --]] function RedirectType:getTopLevelCategory(mediaList) if (mediaList...
Click to read more »Module:Fiction redirect category handler/Franchise
Kamis, 2024-11-14 11:39:50tvSeriesNameList[i] -- Check if the user-input parameter matches one on the list; -- If it matches, add the series name to the list. if (templateArgs[tvSeries...
Click to read more »Module:Wikt-lang/data
Rabu, 2026-01-14 15:11:12= "𐍆", ["[Xx]"] = "𐍇", ["[Ƕƕ]"] = "𐍈", -- Not sure if "hw" and "hv" can safely be converted ["[OoŌō]"] = "𐍉", }, },...
Click to read more »Module:Redirect/sandbox
Senin, 2023-04-17 04:25:54new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a --...
Click to read more »Module:Country alias/sandbox
Selasa, 2025-12-09 01:59:46stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text)...
Click to read more »Module:UnitTests
Senin, 2026-04-27 06:17:38s2 = tostring(s1), tostring(s2) if s1 == s2 then return '' end local max = math.min(#s1, #s2) for i = 1, max do if s1:sub(i, i) ~= s2:sub(i, i) then...
Click to read more »Module:Arrowverse redirect category handler
Minggu, 2024-11-10 01:21:45series-specific category: "(series) (object) redirects to lists". -- F: If the redirect does not use one of the following correct disambiguation — ...
Click to read more »Module:Pagetype
Rabu, 2024-05-22 00:35:20namespace] or {} local keys = {} if nsInfo.name ~= '' then table.insert(keys, nsInfo.name) end if nsInfo.canonicalName ~= nsInfo.name and nsInfo...
Click to read more »Module:Convert/wikidata
Kamis, 2021-05-06 12:08:27= {} Collection.__index = Collection do function Collection:add(item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end...
Click to read more »Module:COVID-19 data
Rabu, 2025-06-11 18:33:20data = mw.text.jsonDecode(data_content) local function format_num(number) if not number then return '' end local _, _, minus, int, _ = tostring(number):find('([-]...
Click to read more »Module:Shortcut
Senin, 2024-03-11 10:26:56local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10...
Click to read more »Module:ParameterCount
Sabtu, 2017-02-11 21:32:57positional key, and if so, returns it. If -- the key is invalid, this returns nil. local function isPositionalKey(s) s = trim(s) if s:find('^[1-9][0-9]*$')...
Click to read more »Module:If in page/sandbox
Selasa, 2019-07-02 04:59:31ustring pattern, 2 - value if present, 3 - value if absent, -- page - page to test if not this page function p._main(args) if not args["page"] then...
Click to read more »Module:Automated taxobox
Selasa, 2026-06-02 13:33:55end -- set the taxobox name if not supplied, italicizing it if appropriate. if name == '' then name = basePagename if italicTitle == 'yes' then ...
Click to read more »Module:BaseConvert/sandbox
Selasa, 2022-04-12 14:18:47input base) from = tonumber(from) if not from or from < 34 then local c n, c = n:gsub('^(-?)0[Xx]', '%1') if c > 0 and not from then from = 16 end...
Click to read more »Module:See also if exists/sandbox
Sabtu, 2020-10-03 23:04:29do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace) if title...
Click to read more »Module:Convert/wikidata/sandbox
Senin, 2020-12-14 13:00:27= {} Collection.__index = Collection do function Collection:add(item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end...
Click to read more »Module:Adjacent stations/sandbox
Jumat, 2026-03-13 19:56:20getLine(data, lineN) if lineN then if data['aliases'] then lineN = data['aliases'][mw.ustring.lower(lineN)] or lineN end if data['lines'][lineN]...
Click to read more »Module:Commons link/sandbox
Kamis, 2024-10-24 17:40:20end if formatting.bold then style = style.."font-weight:bold; " end if formatting.nowrap then style = style.."white-space:nowrap; " end if style...
Click to read more »Module:Delink
Sabtu, 2024-02-17 11:47:33require("strict") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return...
Click to read more »Module:Iraqi insurgency detailed map
Rabu, 2025-02-19 00:10:10sources &/or status description (if available, the cursor will show as [[File:Pointing hand cursor vector.svg|25px]]; if not, it will show as [[File:Cursor...
Click to read more »Module:Main if exists
Selasa, 2024-07-09 01:00:31do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace) if title...
Click to read more »Module:Television episode short description
Minggu, 2025-10-19 06:32:02-)%)") if not (disambiguation and tvSeriesName) then return false end -- Search for the TV series name in the article name disambiguation. if (string...
Click to read more »Module:IPAddress
Selasa, 2023-02-14 10:16:49local p = {} function p._isIpV6(s) local dcolon, groups if type(s) ~= "string" or s:len() == 0 or s:find("[^:%x]") -- only colon and hex digits...
Click to read more »Module:Plain text
Selasa, 2024-12-24 08:02:36encode) return p._main(text, encode) end function p._main(text, encode) if not text then return end text = mw.text.killMarkers(text) :gsub(' '...
Click to read more »Module:Storm categories
Senin, 2023-04-24 22:35:45function p._normalizeId(category, fallback) -- Normalize if normalizable, fall back to default if not. return (category ~= nil and string.len(category)...
Click to read more »Module:If empty/doc
Sabtu, 2024-10-19 09:11:54This module supports Template:If empty. See here for test cases....
Click to read more »Module:Check isxn
Jumat, 2022-11-04 06:27:58if len ~= 10 and len ~= 13 then return return_result (false, err_msg_supl_t.length); -- fail if incorrect length end if len == 10 then if id:match...
Click to read more »Module:Random/sandbox
Selasa, 2023-04-04 01:40:10---------------------------------------------------- -- Set this to true if your wiki has a traffic rate of less than one edit every two minutes or so...
Click to read more »Module:Convert/wikidata/data
Minggu, 2021-06-06 10:21:16article that unit will be linked to when lk=on si = key for the SI base unit, if any The base unit for each SI unit here must have: symbol = symbol used...
Click to read more »Module:Sports color/sandbox
Sabtu, 2024-04-13 22:39:18= 1, ["retired"] = 1, ["free agent"] = 1, } local colors = nil if ( team and use_default[team:lower()] ) then colors = {"DCDCDC", "000000"...
Click to read more »Module:Italic title
Sabtu, 2022-10-22 04:17:12the key up in. local function checkKey(name, argId, key, lookupTable) if not lookupTable[key] then error(string.format( "bad argument #%d...
Click to read more »Module:SportsRankings
Kamis, 2023-08-03 23:08:11content if v and v ~= "" then templateArgs[k]=v --parents.args[k] end end for k,v in pairs(frame.args) do --check content if v and v ~=...
Click to read more »Module:Sanctions
Sabtu, 2026-03-14 17:11:52pairs(haystack) do if v == needle then return true end end return false end local function _getTopicData(topicAlias) if data[topicAlias] then...
Click to read more »Module:Gridiron color/sandbox
Jumat, 2026-04-24 00:23:23get_year(colors, year) if colors and colors[6] and type(colors[6] == 'table') then for team, year_colors in pairs(colors[6]) do if mw.ustring.find(team...
Click to read more »Module:Mapframe
Senin, 2026-06-01 22:40:49parameter value if found, or nil if not found ]]-- function util.getParameterValue(args, param_id, suffix) suffix = suffix or '' if type( L10n.para[param_id]...
Click to read more »Module:ResolveEntityId
Rabu, 2022-11-02 22:33:48local function checkId(id) if id and mw.wikibase.entityExists(id) then local sitelink = mw.wikibase.getSitelink(id) if sitelink then return mw...
Click to read more »Module:Citation/CS1/COinS/sandbox
Jumat, 2025-11-21 02:45:55(title); if is_set (title) then title = strip_apostrophe_markup (title); -- strip any apostrophe markup else title = ''; -- if not...
Click to read more »Module:Convert/wikidata/data/sandbox
Minggu, 2021-05-23 13:57:38article that unit will be linked to when lk=on si = key for the SI base unit, if any The base unit for each SI unit here must have: symbol = symbol used...
Click to read more »Module:Routemap/sandbox
Kamis, 2026-03-26 07:43:54'">' if not t1 or string.find(t1, '^%s*$') then if not t2 then t2 = '' end if string.find(t2, '<br ?/?>') == nil then t1 = ' ' end end if not...
Click to read more »Module:Convert/text/sandbox
Senin, 2026-03-02 10:38:54for use on another wiki. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- Some units accept an SI prefix before the unit...
Click to read more »Module:Track gauge
Minggu, 2024-01-14 16:27:34local rawDisp for k, v in pairs(origArgs) do if tonumber(k) == nil then -- Named argment if k == 'disp' then rawDisp = v -- Keep raw disp...
Click to read more »Module:Infobox gene
Rabu, 2025-02-05 02:58:46local p = {} local localSeparatorStr = "," -- **lclz** Correct it if your wiki has different setting, like zhwiki uses "、" for now local localNotApplicableStr...
Click to read more »Module:ISO 639 name/sandbox
Selasa, 2024-12-10 03:15:12parenthetical disambiguators if any name = name:gsub ('([^,]-), +(.+)', '%2 %1'); -- if inverted, uninvert end if link then --...
Click to read more »Module:Redirect hatnote
Selasa, 2022-09-06 01:21:32tracking category if the template invocation has been -- copied directly from the docs, or if we aren't in main- or category-space. if not v:find('^REDIRECT%d*$')...
Click to read more »Module:Convert/extra/sandbox
Rabu, 2024-10-23 10:32:27-- should cause little server overhead and should propagate quickly. -- -- If a unit is defined in the data module, any definition here is ignored, -- so...
Click to read more »Module:Flagg
Selasa, 2025-11-04 05:18:43title.new[[Module:CountryData]] if titleSelf.isSubpage then local sandbox = titleSelf.subpageText:match[[^sandbox]] if sandbox then titleCountryData...
Click to read more »Module:Infobox mapframe/sandbox
Senin, 2026-02-02 23:39:37for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:Redirect template handler/doc
Kamis, 2024-06-27 16:56:06return a {{Redirect category shell}} and a boolean value if the redirect is the primary redirect. If an unknown parameter is used, the module also returns...
Click to read more »Module:WPSHIPS utilities/sandbox
Senin, 2025-12-29 14:36:53(frag, frag_len) local nat = ''; if not data.nationality_t [frag[1]] then -- if not a one-word nationality if 2 <= frag_len - 2 then ...
Click to read more »Module:Type in location
Jumat, 2023-04-28 01:16:32--Gets general location from more specific one for short descriptions --i.e if a location is specified to be "P. Sherman 42 Wallaby Way Sydney, Australia"...
Click to read more »Module:Infobox military conflict
Kamis, 2026-03-05 20:26:07only time colspans[1] wouldn't be set is if no -- combatant has a field with the given prefix and suffix. if colspans[1] then -- Since each found argument...
Click to read more »Module:Val
Minggu, 2025-06-01 12:39:35range = range_types[arg] if range then if type(index) == 'number' and (index % 2 == 0) then if index == 2 then if numbers[1] and numbers[1]...
Click to read more »Module:Labelled list hatnote/sandbox
Kamis, 2025-05-29 01:10:23if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display...
Click to read more »Module:If preview/styles.css
Selasa, 2026-05-12 04:46:11/* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: var(--color-error, red);...
Click to read more »Module:Sports rbr table
Selasa, 2025-04-01 20:57:51-)%s*$' ) ~= '' end local function zeropad(n) if n>=0 and n < 10 then return '00' .. n end if n>=0 and n < 100 then return '0' .. n end return...
Click to read more »Module:TaxonItalics
Selasa, 2021-10-05 13:34:24algorithm used is: * If the name has italic markup at the start or the end, do nothing. * Else * Remove (internal) italic markup. * If the name is made...
Click to read more »Module:Toolbar
Rabu, 2019-02-27 01:14:05local toolbarItems = p.makeToolbarItems(args) if not toolbarItems then -- Return the blank string if no arguments were specified, rather than -- returning...
Click to read more »Module:Citation/CS1/Utilities/sandbox
Kamis, 2026-01-22 22:00:17function in_array (needle, haystack) if needle == nil then return false; end for n, v in ipairs (haystack) do if v == needle then return n; end...
Click to read more »Module:Portal/sandbox
Jumat, 2025-09-12 19:30:32getCurrentTitle() if thisPage.isTalkPage then return false end local ns = thisPage.nsText:lower() for _, v in ipairs(badNamespaces) do if ns == v then...
Click to read more »Module:Science redirect
Jumat, 2024-09-13 23:35:57function p.R(frame) local template = mw.ustring.gsub(frame.args[1], ' ', '_') if conf.templates[template] then return p._main(frame, 'R_' .. template, conf...
Click to read more »Module:Formatnum
Sabtu, 2021-02-20 22:49:21-- validate the language parameter within MediaWiki's caller frame if lang == "arabic-indic" then -- only for back-compatibility ("arabic-indic"...
Click to read more »Module:Protection banner/config
Sabtu, 2026-04-18 09:24:50the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the...
Click to read more »Module:Flag
Rabu, 2026-06-03 21:15:29value) if value then value = mw.text.trim(value) --Change empty string to nil for all args except 'image' and 'border' if argkey=="image"...
Click to read more »Module:Submit an edit request
Senin, 2024-12-16 22:29:26local function message(key, ...) local params = {...} local msg = cfg[key] if #params < 1 then return msg else return mw.message...
Click to read more »Module:If preview/doc
Kamis, 2025-09-18 14:33:06This module implements {{If preview}} and {{Preview warning}}. It helps templates/modules determine if they are being previewed. Prefer implementing the...
Click to read more »Module:COVID-19 data/sandbox
Minggu, 2024-08-04 11:35:41data = mw.text.jsonDecode(data_content) local function format_num(number) if not number then return '' end local _, _, minus, int, _ = tostring(number):find('([-]...
Click to read more »Module:ConvertNumeric/sandbox
Jumat, 2026-02-13 20:42:25numerator, if any (default = 1 if a denominator is given) -- denominator (string or nil): denominator, if any -- sp_us (boolean): true if sp=us -- negative_word...
Click to read more »Module:Complex date
Sabtu, 2020-05-16 02:21:05math.max(#langList,2),'default') for i,language in ipairs(langList) do if list[language] then return list[language] end end end --...
Click to read more »Module:TaxonList
Selasa, 2025-06-10 10:51:53taxon name with any † before it removed and either '†' if it was present or the empty string if not. =================================================...
Click to read more »Module:Effective protection level
Kamis, 2025-09-25 09:35:06given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename)...
Click to read more »Module:Infobox road
Jumat, 2024-08-16 06:52:36function p.headerStyle(frame) local args = getArgs(frame) local header if args.header_type == nil then header = args.header_type else header...
Click to read more »Module:Arbcom election banner
Selasa, 2025-10-21 04:33:53getUnixDate(date) local success, unixDate = pcall(lang.formatDate, lang, 'U', date) if success then return tonumber(unixDate) end end local function unixDateError(date)...
Click to read more »Module:Error
Kamis, 2025-09-11 22:10:08lower(tostring(args.tag)) -- Work out what html tag we should use. if not (tag == 'p' or tag == 'span' or tag == 'div') then tag = 'strong'...
Click to read more »Module:Chessboard mxn
Rabu, 2026-05-27 11:25:15if ( numbers_lt ) then width = width + 18 end if ( numbers_rt ) then width = width + 18 end local b = '' local caption = '' if ( letters_tp...
Click to read more »Module:Convert/makeunits
Selasa, 2024-10-22 14:42:28-- * Remove thousand separators (commas) from the scale field. -- If the scale is a number, do not change it. -- Otherwise, it should be an...
Click to read more »Module:GHS phrases
Rabu, 2026-01-28 22:40:13phrases' if sLabel == nil then sLabel = sSection end if (sLabel or '') == '' then sLabel = '' else sLabel = '|' .. sLabel end if (sSection...
Click to read more »Module:Excerpt/portals/sandbox
Jumat, 2026-02-06 20:41:50'''bold text''' if requested if is(options.nobold) then text = mw.ustring.gsub(text, "'''", "") end -- Keep only tables if requested if is(options.tablesOnly)...
Click to read more »Module:IPA symbol/sandbox
Kamis, 2026-04-02 20:53:18t[sub(s, i, i + 1)] or t[sub(s, i, i)] if ret then return ret end end ret = t[sub(s, -1)] -- Last character if ret then return ret end end local...
Click to read more »Module:Chessboard
Rabu, 2026-05-27 08:20:26or tcol local piece = args[ncols * ( nrows - row ) + col + 2] or '' if piece:match( pattern ) then local img = cfg.image_square(piece:match(pattern)...
Click to read more »Module:Sanctions/sandbox
Senin, 2026-04-06 22:16:40pairs(haystack) do if v == needle then return true end end return false end local function _getTopicData(topicAlias) if data[topicAlias] then...
Click to read more »Module:If in page/doc
Jumat, 2024-08-30 04:49:04This module implements {{If in page}}, please see its documentation for more information. {{#invoke:If in page|main}} Module:String2 § findpagetext...
Click to read more »Module:Requested move
Rabu, 2024-03-20 06:51:08paramNum) -- Validates a page name, and if it is valid, returns true and the title -- object for that page. If it is not valid, returns false and the...
Click to read more »Module:Article history
Selasa, 2024-08-20 01:12:15whether val is a function, and if so calls it with the specified -- arguments. Otherwise val is returned as-is. if type(val) == 'function' then return...
Click to read more »Module:Check isxn/sandbox
Kamis, 2023-04-13 08:54:14if len ~= 10 and len ~= 13 then return return_result (false, err_msg_supl_t.length); -- fail if incorrect length end if len == 10 then if id:match...
Click to read more »Module:DecodeEncode
Selasa, 2023-04-18 03:18:54explicit true local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'true' or boolean_str...
Click to read more »Module:Time
Kamis, 2025-11-27 22:12:59numbers just in case month = tonumber (month); if (2 == month) then -- if February if (0 == (year%4) and (0 ~= (year%100) or 0 == (year%400)))...
Click to read more »Module:Taxonbar/conf
Rabu, 2026-05-27 22:31:11--------------------------------------------------------------------- --| If propertyId is... | then... ...
Click to read more »Module:Template link general
Kamis, 2026-02-12 18:19:37local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns]...
Click to read more »Module:Nihongo
Kamis, 2025-06-19 07:06:39formatting[index][2][3], formatting[index][2][4]) or nil; if extra2 then -- always just attached to the end (if there is an end) so not part of formatting{}...
Click to read more »Module:Authority control/sandbox
Kamis, 2026-06-04 00:40:21qualid][1]) end end local ids = {} if qid then for _, statement in ipairs(mw.wikibase.getBestStatements(qid, 'P'..pid)) do if statement.mainsnak.datavalue...
Click to read more »Module:NUMBEROF
Minggu, 2024-09-29 10:52:34local function trimArg(arg, i) arg = mw.text.trim(arg or '') if arg == '' then if i then error('Parameter ' .. i .. ' is missing. See template...
Click to read more »Module:SportsRankings/sandbox
Kamis, 2023-08-03 22:32:13content if v and v ~= "" then templateArgs[k]=v --parents.args[k] end end for k,v in pairs(frame.args) do --check content if v and v ~=...
Click to read more »Module:Team appearances list
Senin, 2026-04-20 17:39:54strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text)...
Click to read more »Module:Side box/sandbox
Kamis, 2026-04-02 07:37:30table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower()...
Click to read more »Module:Archive list
Selasa, 2026-02-17 22:19:42num ) if num then num = tonumber( num ) if type( num ) == 'number' then num = math.floor( num ) if num >= 0...
Click to read more »Module:RFX report
Minggu, 2025-10-05 04:35:50adminship' ) if not noError or ( noError and not rfa ) then return nil end local rfaText = rfa:getContent() if not rfaText then...
Click to read more »Module:Convert/data/sandbox
Senin, 2026-03-02 10:35:27loaded only once per page. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- -- These data tables follow: -- all_units ...
Click to read more »Module:Video game reviews
Jumat, 2025-08-22 22:53:34getActiveSystems(args) local activeSystems = {} for k, v in pairs(args) do if data.systems[k] and yesno(v) then table.insert(activeSystems, k) end...
Click to read more »Module:WikiProject banner/doc
Senin, 2026-06-08 17:42:03<PROJECT>". If this is not the case, then define the full link to the project page in this parameter. Eg: Wikipedia:WikiProject Tulips PROJECT_NAME – if your...
Click to read more »Module:TNT
Minggu, 2020-08-30 14:28:25columnName = names[pos] if columnName == 'name' then name = val else newVal[columnName] = val end end if name then params[name]...
Click to read more »Module:Lang-zh
Senin, 2025-12-22 17:26:41testChar if (args["first"]) then for testChar in mw.ustring.gmatch(args["first"], "%a+") do if (testChar == "t") then t1 = true end if (testChar...
Click to read more »Module:Roman
Kamis, 2023-02-09 03:14:10exit displaying nothing if the input is empty. if args[1] == nil then return end local num = tonumber(args[1]) if not num or num < 0 or num...
Click to read more »Module:Category series navigation/sandbox
Minggu, 2026-06-07 23:46:34= '' local testcases = string.match(currtitle.subpageText, '^testcases') if testcases then testcasecolon = ':' end local navborder = true local followRs...
Click to read more »Module:Multiple image
Rabu, 2026-05-27 20:25:05thumbtimestr = '' if isnotempty( alt ) then altstr = '|alt=' .. alt end if widthstr == '|-nanpx' then widthstr = '' end if isnotempty( thumbtime...
Click to read more »Module:Data/sandbox
Kamis, 2023-10-05 18:57:59success, data = pcall(mw.loadData, k) if not success then success, data = pcall(mw.loadJsonData, k) if not success then error("'" .. k .. "'...
Click to read more »Module:Hatnote/sandbox
Kamis, 2022-08-11 23:24:18function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.findNamespaceId(link,...
Click to read more »Module:GHS phrases/data
Senin, 2026-01-26 07:07:29= 'Toxic if swallowed, in contact with skin or if inhaled.', ['H301+H331'] = 'Toxic if swallowed or if inhaled.', ['H302'] = 'Harmful if swallowed...
Click to read more »Module:Citation/CS1/Suggestions/sandbox
Rabu, 2025-12-17 03:52:24-- German ['originaltitel'] = 'title', -- German (if 'originaltitel' is specified, any possible contents of 'title' should be put...
Click to read more »Module:Russo-Ukrainian war detailed map
Senin, 2026-05-04 05:29:35label if label and mark.label_size then label = mw.text.trim(label, '%[%]') label = mw.text.split(label, '[,|]')[1] m.marks[label] = mark if mark...
Click to read more »Module:Jct
Kamis, 2022-12-29 10:42:28bannerModule) if shield and shield ~= '' then if suffix == nil then suffix = parser(route, 'shield', 'suffix', bannerModule) end if suffix and...
Click to read more »Module:Webarchive
Selasa, 2026-02-24 05:19:36function make_wikilink (link, display, no_link) if nil == no_link then if link and ('' ~= link) then if display and ('' ~= display) then return table...
Click to read more »Module:Dump
Senin, 2021-06-07 14:35:17Collection -- a table to hold items Collection = { add = function (self, item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end...
Click to read more »Module:PHL sports team
Rabu, 2025-11-19 23:29:42mw.loadData(data_module) end local function get_key_by_code(code, data) if (data[code] ~= nil and type(data[code]) == 'string') then p.isalias = true...
Click to read more »Module:TrainingPages
Senin, 2023-04-03 04:47:58index parameter specified" end if not(currentpage) then local pp=mw.title.getCurrentTitle() if not pp then if noerr then return "","","" ...
Click to read more »Module:Sidebar/sandbox
Selasa, 2025-12-30 01:00:41uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n...
Click to read more »Module:Template test case/sandbox
Rabu, 2025-08-06 23:54:27with messages from the -- config module. local msg = self.cfg.msg[key] if select(1, ...) then return mw.message.newRawMessage(msg, ...):plain() else...
Click to read more »Module:Episode table
Rabu, 2026-06-03 04:11:12textColor) local cell = mw.html.create('th') -- Width local cell_width if width == 'auto' then cell_width = 'auto' elseif tonumber(width) ~= nil...
Click to read more »Module:Tabular data
Jumat, 2021-10-01 05:58:04if field.name == outputColumnName then outputColumnIdxs[outputColumnName] = i numOutputColumnIdxs = numOutputColumnIdxs + 1 end end if...
Click to read more »Module:AfC submission catcheck
Sabtu, 2024-12-07 13:51:02local p = {} local function removeFalsePositives(str) if not str then return '' end str = mw.ustring.gsub(str, "<!--.--->", "") str = mw.ustring...
Click to read more »Module:Portal bar
Senin, 2026-03-16 21:32:43for key, default in pairs({border=true,redlinks=false,tracking=true}) do if args[key] == nil then args[key] = default end args[key] = yesno(args[key]...
Click to read more »Module:Video game wikidata
Kamis, 2023-08-31 21:42:41if(platformA == nil) then platformA = mw.wikibase.label('Q'..a['qualifiers']['P400'][1]['datavalue']['value']['numeric-id']); end; end; if...
Click to read more »Module:WLink
Jumat, 2020-10-30 22:03:05error, if not available if not URLutil then local lucky, util = pcall( require, "Module:URLutil" ); if lucky then if type(...
Click to read more »Module:Interlinear
Jumat, 2024-09-06 16:54:50GlossingType = "label", -- if set to "label" gloss abbreviations are formatted as an <abbr> with the "label" appearing in a tooltip -- if set to "wikilink"...
Click to read more »Module:Currency
Sabtu, 2026-04-18 11:04:04passthrough) local symbol; local position = properties[code].position; if linked then symbol = string.format ('[[%s|%s]]', properties[code].page,...
Click to read more »Module:Urldecode
Jumat, 2025-08-22 04:56:08enctype = frame.args[2] local ret = nil; if (frame.args[2] ~= nil) then enctype = mw.ustring.upper(enctype) if ((enctype == "QUERY") or (enctype == "PATH")...
Click to read more »Module:RexxS
Kamis, 2022-11-03 00:49:08function(frame) local switchtime = tonumber(frame.args.switchsecs) or 43200 if switchtime < 1 then switchtime = 43200 end local imgs = { "Pelicans 11...
Click to read more »Module:Settlement short description
Sabtu, 2022-02-12 23:43:02cattype) if category then p.categories = p.categories..category end --categorize end --sanity and other checks function p.validate (parameter, cat) if not...
Click to read more »Module:Convert/helper
Rabu, 2024-01-10 08:46:26stripToNil(text) -- If text is a non-empty string, return its trimmed content, -- otherwise return nothing (empty string or not a string). if type(text) ==...
Click to read more »Module:Other uses
Selasa, 2020-06-02 06:06:08emptyArgs = true for k, v in pairs(args) do if type(k) == 'number' then emptyArgs = false break end end if emptyArgs then args = { options.defaultPage...
Click to read more »Module:Football manager history
Jumat, 2024-11-22 11:17:34Return text, if not empty, after trimming leading/trailing whitespace. -- Otherwise return default which is nil unless set by caller. if text then ...
Click to read more »Module:NewDYKnomination
Senin, 2024-10-21 15:14:24given page name. Return nil if the title is -- invalid. local function makeTitle(page) local title = mw.title.new(page) if title and title.text ~= ""...
Click to read more »Module:If elseif
Sabtu, 2025-11-08 00:10:34thenval if args[n] then if args[n+1] then ifval, thenval = args[n], args[n+1] n = n + 2 else return args[n] end elseif args['if' .....
Click to read more »Module:Hatnote list
Selasa, 2023-11-14 04:00:31do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then...
Click to read more »Module:Ancient Greek
Selasa, 2021-10-12 01:38:22shared among different characters so that they can be checked -- for equality if needed, and to use less space. local vowel = { vowel = true, diacritic_seat...
Click to read more »Module:Official website
Jumat, 2025-11-28 13:13:53failure. local function quickPcall(func) local success, result = pcall(func) if success then return result end end -- Gets the rank for a Wikidata property...
Click to read more »Module:Infobox television disambiguation check
Selasa, 2026-01-06 18:30:17removeFromArray(t, delete) local j = 1 local n = #t for i = 1, n do if t[i] ~= delete then if i ~= j then t[j] = t[i] t[i] = nil end j = j +...
Click to read more »Module:Redirect template
Selasa, 2025-08-12 06:33:36args local function valueFunc(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil end end ...
Click to read more »Module:Infobox road/length
Kamis, 2021-12-16 20:57:46abandon end local first, unit, unit2, unit3 -- if nmi ~= '0' and mi == '' and km == '' then if tonumber (nmi) then first = nmi unit = "nmi" ...
Click to read more »Module:Lang/utilities
Kamis, 2025-01-09 21:19:30template, '#Error messages|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not nocat then -- categorize in...
Click to read more »Module:See also if exists/doc
Kamis, 2023-12-28 21:44:29Used by Template:see also if exists and Template:Category see also if exists. {{#invoke:See also if exists| main}}...
Click to read more »Module:Delink/sandbox
Minggu, 2023-04-23 01:29:13require("strict") local p = {} local getArgs local function delinkReversePipeTrick(s) if s:match("^%[%[|.*[|\n]") then -- Check for newlines or multiple pipes. return...
Click to read more »Module:Location map/multi
Selasa, 2024-04-30 08:22:33= {} if not args then args = getArgs(frame, {wrappers = 'Template:Location map+', valueFunc = locmap.valueFunc}) end if not map then if args[1]...
Click to read more »Module:Template parameter value
Kamis, 2025-10-23 22:11:46function getTitle(title) local success, titleObj = pcall(mw.title.new, title) if success then return titleObj else return nil end end -- Finds all templates...
Click to read more »Module:Track listing
Senin, 2025-05-12 11:35:39class. local function addMixin(class, mixin) for k, v in pairs(mixin) do if k ~= 'init' then class[k] = v end end end ------------------------...
Click to read more »Module:CountryData
Kamis, 2021-05-06 03:40:05country if params and next(params) then return p.gettable(frame, country, params) end -- Uses mw.loadData to cache data for the most-used templates if mostUsed...
Click to read more »Module:ScribuntoUnit
Rabu, 2026-05-27 01:46:51pairs(table) do if first then first = false else concatted = concatted .. separator end if k == i and unnamedArguments...
Click to read more »Module:Uses Wikidata
Kamis, 2022-06-09 00:12:17function p.usesProperty(frame) local args = frame.getParent(frame).args or nil if mw.text.trim(args[1] or '') == '' then args = frame.args end local result...
Click to read more »Module:Class
Senin, 2025-06-02 19:35:38--Normalizes strings, particularly class codes if type(val) == 'string' then val = trim(val):lower() end if val == '' then val = nil end return val end...
Click to read more »Module:Sports table/styledoc
Jumat, 2025-10-24 23:34:31be inserted automatically if they are called; see XXX and YYY). The update date is set by |update=, see below for details. If no source is given a citation-needed...
Click to read more »Module:External links
Selasa, 2024-05-28 13:09:32pagetitle) local label = (pagetitle and pagetitle ~= '') and pagetitle or nil if not label and not entity then label = mw.title.getCurrentTitle().text elseif...
Click to read more »Module:MultiReplace
Rabu, 2022-11-16 03:58:002] do local change = {pattern = args[i * 2], repl = args[i * 2 + 1]} if not change.repl then return require('Module:Error').error{ 'MultiReplace:...
Click to read more »Module:Sister project links
Kamis, 2026-04-02 20:52:27-- x = nil if s is canonicalized, otherwise has trimmed s -- y = canonical form of s (true if "yes" or other, false if "no", nil if blank) local...
Click to read more »Module:URL/sandbox
Selasa, 2025-11-11 02:54:01msg == 'false' -- boolean: true if msg is "false" or starts with n or N if url == '' then if text == '' then if nomsg then return nil else...
Click to read more »Module:Automated taxobox/sandbox
Selasa, 2026-06-02 13:27:36end -- set the taxobox name if not supplied, italicizing it if appropriate. if name == '' then name = basePagename if italicTitle == 'yes' then ...
Click to read more »Module:Protected edit request/sandbox
Selasa, 2025-12-09 15:10:28require('Module:Message box').main local getArgs local activeBox -- lazily initialized if we get an active request -----------------------------------------------...
Click to read more »Module:Hatnote inline
Jumat, 2023-12-22 03:46:48mHatnote.hatnote(frame:newChild{title="Module:Hatnote inline", args = args}) if args.inline == nil or yesno(args.inline, true) then local subs = { ['<div']...
Click to read more »Module:Date/sandbox
Rabu, 2026-02-18 12:27:47} end local function strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (convenient when...
Click to read more »Module:Su
Senin, 2024-04-15 09:27:21frame:getParent().args local args = {} for k, v in pairs(origArgs) do if v ~= '' then args[k] = v end end -- Define the variables to pass to...
Click to read more »Module:Graph/sandbox
Minggu, 2025-07-13 00:29:11_(xAxisFormat_=) -- linewidths - doesnt work for two values (eg 0, 1) but work if added third value of both are zeros? Same for marksStroke - probably bug in...
Click to read more »Module:Cite Q
Senin, 2026-04-27 10:27:09local card = tonumber(cardinal) if not card then return cardinal end local ordsuffix = cfg.i18n_t.ordinal.default if card % 10 == 1 then ordsuffix...
Click to read more »Module:Template link general/sandbox
Sabtu, 2026-02-07 00:02:18local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns]...
Click to read more »Module:Listen
Jumat, 2022-07-08 00:12:31duration in seconds in "(h:)mm:ss" (minutes are zero-padded -- only if there are hours). if not length or length == 0 then return nil end -- Add 0.5 to...
Click to read more »Module:GHS phrases/data/sandbox
Senin, 2022-10-03 01:43:07'IF SWALLOWED:', ['P302'] = 'IF ON SKIN:', ['P303'] = 'IF ON SKIN (or hair):', ['P304'] = 'IF INHALED:', ['P305'] = 'IF IN EYES:', ['P306'] = 'IF...
Click to read more »Module:IP
Sabtu, 2022-10-22 16:07:04validating a specific object. return function (methodName, argIdx, arg) if not isObjectFunc(arg) then error(string.format( "bad argument #%d to...
Click to read more »Module:Lua banner
Jumat, 2024-04-05 09:45:24title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then...
Click to read more »Module:PageLinks
Rabu, 2026-01-21 05:39:06section) local help if section then help = ' ([[Template:Page-multi#' .. section .. '|help]])' else help = '' end local cat if demo == 'yes' then...
Click to read more »Module:Year in various calendars
Minggu, 2026-03-22 13:44:13-- Checks if a value is an integer. If so, returns the value converted to a number. -- If not, returns false. num = tonumber( num ) if num and math...
Click to read more »Module:Unicode data/sandbox
Sabtu, 2025-08-02 23:33:56local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1)...
Click to read more »Module:GHS phrases/sandbox
Rabu, 2026-01-28 23:17:51phrases' if sLabel == nil then sLabel = sSection end if (sLabel or '') == '' then sLabel = '' else sLabel = '|' .. sLabel end if (sSection...
Click to read more »Module:Shortcut/sandbox
Jumat, 2025-06-06 00:20:28local templatePath, prefix if templateMode then -- Namespace detection local titleObj = mw.title.new(shortcut, 10) if titleObj.namespace == 10...
Click to read more »Module:PHL sports overall tally
Minggu, 2026-05-10 08:19:39local found = teams[t].res[r].rank == 1 or raw == 'T1' or raw == 'GC' if found or (t == 1) then return found else return findchamp(teams, t -...
Click to read more »Module:Article history/config
Jumat, 2024-11-22 11:26:36[[Module:Good article topics]]. local function getGoodArticleTopic(key) if not key then return nil end return require('Module:Good article topics')...
Click to read more »Module:Clade
Kamis, 2024-03-28 23:33:49"" then -- if using a newick string instead of a clade structure newickString = p.processNewickString(newickString,childNumber) if nodeLabel ==...
Click to read more »Module:Time/sandbox
Senin, 2025-05-05 00:40:57numbers just in case month = tonumber (month); if (2 == month) then -- if February if (0 == (year%4) and (0 ~= (year%100) or 0 == (year%400)))...
Click to read more »Module:File link
Rabu, 2020-04-01 13:31:54ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile'...
Click to read more »Module:Wikipedia ads
Senin, 2019-02-25 05:34:26ad to display. local imageData, isRandom if args.ad then imageData = getSomeImageData(args.ad, 'ad') if not imageData then return nil end isRandom...
Click to read more »Module:Yemeni Civil War detailed map
Senin, 2026-01-12 16:34:57sources &/or status description (if available, the cursor will show as [[File:Pointing hand cursor vector.svg|25px]]; if not, it will show as [[File:Cursor...
Click to read more »Module:Sortkey
Rabu, 2021-10-06 01:54:13sortkey nesting. -- Example: {{sort|{{dts|2013|07|07}}|{{dts|1990|12|01}}}} if string.find(sortkey, "sortkey") or string.find(sortkey, "data-sort-value")...
Click to read more »Module:Infobox road/sandbox
Rabu, 2024-09-04 21:31:36function p.headerStyle(frame) local args = getArgs(frame) local header if args.header_type == nil then header = args.header_type else header...
Click to read more »Module:Arbcom election banner/sandbox
Rabu, 2025-07-30 13:55:11getUnixDate(date) local success, unixDate = pcall(lang.formatDate, lang, 'U', date) if success then return tonumber(unixDate) end end local function unixDateError(date)...
Click to read more »Module:WDL
Senin, 2026-03-23 05:10:25played, won, drawn, lost, category) if played == '-' or played == '—' then return '—' elseif not played then if not won and not drawn and not lost...
Click to read more »Module:Val/units
Rabu, 2026-02-11 13:43:06[[Square degree|μas<sup>2</sup>]] ]=] -- If val has "|long scale=on" the following definitions are used -- (then, if not found here, the normal definitions...
Click to read more »Module:Native name
Jumat, 2024-10-11 00:06:54native_name_list(), etc if not (args_t[1] or args_t[2]) and yes_no (args_t.suppress_empty_list_error) then return ''; -- if empty list error...
Click to read more »Module:Flag/sandbox
Rabu, 2026-06-03 21:11:59value) if value then value = mw.text.trim(value) --Change empty string to nil for all args except 'image' and 'border' if argkey=="image"...
Click to read more »Module:Lang/documentor tool
Senin, 2025-05-12 23:10:52table local private_t = {} for tag, lang in pairs (override_t) do if tag:find ('%-x%-') then table.insert (private_t, table.concat ({'\n|-\n|'...
Click to read more »Module:Convert/doc
Senin, 2026-04-06 23:48:39optional and are used only if required and if the module exists: Module:Convert/extra – extra (temporary) unit definitions; used if a unit is not found in...
Click to read more »Module:If any equal
Selasa, 2025-02-04 08:01:03pairs(frame.args) do if type(n)=='number' and v:lower()==value:lower() then return true end end end local match = false if frame.args.value and...
Click to read more »Module:Category described in year
Jumat, 2026-02-13 12:31:1212th, etc. if tonumber(i) then local s = tostring(i) local tens = string.match(s, '1%d$') local ones = string.match(s, '%d$') if tens ...
Click to read more »Module:Jcon
Selasa, 2025-05-06 05:03:36title.new('File:' .. fileName) if not titleObj or not titleObj.file.exists then return '' -- Return nothing if no existing file was found end ...
Click to read more »Module:Good article topics
Rabu, 2014-02-19 15:07:56frame:getParent().args[1] if not topic then return '' end topic = topic:match('^%s*(.-)%s*$') -- Trim whitespace local ret if topic ~= '' then ret...
Click to read more »Module:Medical cases chart
Minggu, 2026-02-15 06:50:15beyond nTime +-nTol if no match was found. local tRet = nil if bAll then tRet = {} end for nRowNum = #tRows, 1 ,-1 do if tRows[nRowNum] and tRows[nRowNum]...
Click to read more »Module:Goalscorers
Rabu, 2026-06-03 14:22:03content if v and v ~= "" then g.args[k]=mw.text.trim(v) --parents.args[k] end end for k,v in pairs(frame.args) do --check content if v and v...
Click to read more »Module:Zodiac date
Senin, 2024-07-15 09:22:08args[2]) or os.date("!*t").year --<span style="color:red">red writing</span> if (year < 2015) or (year > 2050) or ((year == 2050) and (signNumber == 10))...
Click to read more »Module:Gutenberg
Jumat, 2022-04-01 15:43:54author" -- name of calling template. Change if template is renamed. local id = nil ...
Click to read more »Module:Check for deprecated parameters
Selasa, 2026-06-09 05:52:55passed to the parent -- with a list of arguments, returning a specified result if an argument is -- on the list local p = {} local MAX_PARAMS = 9 -- Limit to...
Click to read more »Module:Formatted appearance
Senin, 2024-05-06 18:55:40checks if the array had a value added by checking the counter, -- and returns the relevant result. local function getFormattedEntry(args, counter) if (counter...
Click to read more »Module:TaxonItalics/sandbox
Rabu, 2025-05-21 17:40:51algorithm used is: * If the name has italic markup at the start or the end, do nothing. * Else * Remove (internal) italic markup. * If the name is made...
Click to read more »Module:Television episode disambiguation description
Jumat, 2020-10-23 05:23:02disambiguation (disambiguation is extended). if (not isDisambiguationExtended) then -- Check if the article name has extended disambiguation...
Click to read more »Module:Italic title/sandbox
Kamis, 2026-03-05 20:57:34the key up in. local function checkKey(name, argId, key, lookupTable) if not lookupTable[key] then error(string.format( "bad argument #%d...
Click to read more »Module:WDL/sandbox
Senin, 2025-03-31 04:52:35played, won, drawn, lost, category) if played == '-' or played == '—' then return '—' elseif not played then if not won and not drawn and not lost...
Click to read more »Module:Find sources/sandbox
Rabu, 2024-10-16 05:26:50searchStrings = {} for i, s in ipairs(searchTerms) do searchStrings[i] = s end if transformFunc then for i, s in ipairs(searchStrings) do searchStrings[i]...
Click to read more »Module:Infobox road/length/sandbox
Jumat, 2022-11-25 13:34:19abandon end local first, unit, unit2, unit3 -- if nmi ~= '0' and mi == '' and km == '' then if tonumber (nmi) then first = nmi unit = "nmi" ...
Click to read more »Module:AfC submission catcheck/sandbox
Senin, 2024-09-16 02:26:10local p = {} local function removeFalsePositives(str) if not str then return '' end str = mw.ustring.gsub(str, "<!--.--->", "") str = mw.ustring...
Click to read more »Module:Format TemplateData
Minggu, 2026-02-08 09:48:03r1, r2, r3, r4 if s == "table" then local values = elements.values if type(values) == "table" then r1 = values if type(elements.scroll)...
Click to read more »Module:Taxonbar/sandbox
Rabu, 2025-12-17 19:42:44) if thing == nil or thing == '' then return true end return nil end local function getIdFromWikidata( item, property ) local id = nil if property...
Click to read more »Module:Flags
Kamis, 2013-08-22 10:50:39local master = mw.loadData("Module:Flags/MasterData") -- check if name is an original name in translation.fullname and -- return its value,...
Click to read more »Module:TwitterSnowflake
Rabu, 2023-01-25 06:20:20frame.args.id_str if type(id_str) ~= "string" then error("bad argument #1 (expected string, got " .. type(id_str) .. ")", 2) end if type(format) ~= "string"...
Click to read more »Module:Rfx
Senin, 2024-11-25 04:10:19getTitleObject(title) local success, titleObject = pcall(newTitle, title) if success and titleObject then return titleObject else return nil end...
Click to read more »Module:Parameter validation
Jumat, 2026-05-15 20:39:27local options, n = {} if frame.args.module_options then local module_options = mw.loadData( frame.args.module_options ) if type( module_options )...
Click to read more »Module:Find sources/autodoc
Senin, 2021-12-06 17:15:44isValidLinkCfg(linkCfg) if type(linkCfg) ~= 'table' then return false end for _, s in ipairs{'url', 'display'} do if type(linkCfg[s]) ~= 'string'...
Click to read more »Module:Rail-interchange multi
Senin, 2019-09-23 08:23:26v1 in ipairs(data) do args = {} if v1 ~= '' and v1 ~= '\\' then local tmp = mw.text.split(v1, '\\') if i1 == 1 then default = tmp[1] ...
Click to read more »Module:PopulationFromWikidata
Kamis, 2023-07-20 08:57:48initialise an empty URL, check if there is one then populate with the actual value (if not it stays as an empty string) if claim.references[b].snaks[RefURL_P]...
Click to read more »Module:Infobox/dates
Kamis, 2021-07-08 03:09:16airdate_overall if start_date then if not start_date:find("dtstart") then return error_category end end local end_date = args.last_aired if end_date...
Click to read more »Module:National squad
Sabtu, 2023-01-21 06:18:54pv = require('Module:If preview') local preview, tracking = '', '' if #badargs > 0 then for k, v in pairs(badargs) do if v == '' then v = ' ' end...
Click to read more »Module:Check for conflicting parameters/sandbox
Minggu, 2025-12-28 10:34:01trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1...
Click to read more »Module:ResolveEntityId/sandbox
Rabu, 2022-11-02 22:32:26local function checkId(id) if id and mw.wikibase.entityExists(id) then local sitelink = mw.wikibase.getSitelink(id) if sitelink then return mw...
Click to read more »Module:Is infobox in lead
Senin, 2019-10-07 11:35:39= string.find(content, "==", 1 , true) if offset then local lead = string.sub(content, 1, offset-1) if (string.find(lead, searchString)) then ...
Click to read more »Module:Science redirect/sandbox
Senin, 2021-05-17 09:54:39function p.R(frame) local template = mw.ustring.gsub(frame.args[1], ' ', '_') if conf.templates[template] then return p._main(frame, 'R_' .. template, conf...
Click to read more »Module:R avoided double redirect
Jumat, 2025-06-27 21:54:21otherPage = mw.title.new(args[1] or "") if not otherPage then return formatError("No other page was specified."); end if mw.title.equals(thisPage, otherPage)...
Click to read more »Module:AutosortTable
Minggu, 2021-02-21 07:27:13= html:tag('table') if class then htable:attr('class', class) end if style then htable:attr('style', style) end if caption then local...
Click to read more »Module:Ordnance Survey coordinates
Minggu, 2026-06-07 21:40:00if T1>8 then T1 = T1-1 end local T2 = nil if mw.ustring.len(lett)>1 then T2 = mw.ustring.byte(mw.ustring.sub(lett,2))-65 if T2>8...
Click to read more »Module:Category more if exists/doc
Jumat, 2024-08-30 03:35:34Used by Template:Category more if exists {{#invoke:Category more if exists| main}} This is a crude fork of Module:See also if exists. It may be possible to...
Click to read more »Module:Random slideshow/sandbox
Minggu, 2024-08-18 18:07:29for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:R from fictional object multi
Senin, 2024-05-06 18:35:58_main(args) -- If category wasn't set, return error. if (not args.category) then return error end local categories = "" for i = 1, 10 do if (args[i])...
Click to read more »Module:Demo
Rabu, 2024-08-14 09:31:11parent:newChild{} orphan.getParent = parent.getParent --returns nil orphan.args = {} if onlyTheseKeys then local family = {parent, frame} for f = 1, 2 do for...
Click to read more »Module:Multilingual
Selasa, 2022-08-09 07:07:40access ] if not suited then finer() lucky, r = pcall( fun, "Module:" .. storage ) end if not lucky then if not suited...
Click to read more »Module:Infobox television episode
Rabu, 2026-06-03 14:33:30and fixing it to use the --- "Space+single" and "Single+space" templates if a leading or trailing apostrophe or quotation mark is used. --- --- Note:...
Click to read more »Module:Clickable button
Sabtu, 2024-07-27 05:19:50args[1] args[1] = delink({args[1]}) if args[1] == "" then args[1] = nil end if not args[1] and not args.url then if args[2] then p.nolink = true...
Click to read more »Module:Detect singular
Kamis, 2025-10-16 13:01:56plural (default false) -- origArgs.parse_number: if true, parse number in argument: if 1, singular; if >1, plural (default false) -- Returns: -- singular...
Click to read more »Module:Series overview
Sabtu, 2026-04-25 12:14:09regular season if entry.startA or entry.releasedA then if not entry[key..'A'] then spanlength = spanlength + 1 else break end if not entry[key...
Click to read more »Module:IncrementParams
Kamis, 2022-11-03 00:53:30on the "edit" tab at the top of the page to edit this module. -- STEP 2: if you want to increment by a number other than 1, put that number below, after...
Click to read more »Module:MLB standings
Sabtu, 2024-09-07 07:29:08defaultOutputForInput: table mapping from input format to default output format -- (if the output format is not specified in the template arguments) -- local defaultOutputForInput...
Click to read more »Module:Convert/tester
Selasa, 2026-03-03 13:50:15= {} Collection.__index = Collection do function Collection:add(item) if item ~= nil then self.n = self.n + 1 self[self.n] = item end end...
Click to read more »Module:Ordinal
Senin, 2019-03-18 02:44:32local suffix = "th" -- If tonumber(n) worked: if x then local mod10 = math.abs(x) % 10 local mod100 = math.abs(x) % 100 if mod10 == 1 and mod100...
Click to read more »Module:Football box collapsible
Kamis, 2024-08-08 20:52:25local tracking, preview local function checkarg(k,v) if k and type(k) == 'string' then if k == 'id' or k == 'team1' or k == 'team2' or k == 'class'...
Click to read more »Module:ISO 3166/sandbox
Selasa, 2025-08-26 00:55:47local function errors(errType, args, code, alpha2) if not (args.nocat and args.nocat == 'true') then if code then local warningText = code .. ' ("%s")...
Click to read more »Module:Gallery
Senin, 2025-02-10 17:31:44-- Check if the extension is in the valid list if ext then for _, valid_ext in ipairs(valid_extensions) do if ext == valid_ext...
Click to read more »Module:Track gauge/autodocument
Senin, 2024-08-12 19:10:45origArgs[1] or '' for k, v in pairs(origArgs) do if tonumber(k) == nil then -- Named argument if k == 'docsortlabel' then -- not in TG args[k]...
Click to read more »Module:High-use
Kamis, 2025-10-09 03:24:46if tonumber(args.count) then -- check if function has already been used return tonumber(args.count) -- early exit if so end local count if...
Click to read more »Module:Type in location/sandbox
Jumat, 2023-04-28 01:05:25--Gets general location from more specific one for short descriptions --i.e if a location is specified to be "P. Sherman 42 Wallaby Way Sydney, Australia"...
Click to read more »Module:Subject bar
Senin, 2026-04-13 07:28:52tonumber(mw.ustring.match(k,pattern)) --- if "foo_?%d+", extract number if ord then values[ord] = v end end if args[key] ~= nil then values[1] =...
Click to read more »Module:Jctint
Kamis, 2024-09-19 07:57:41`unitdef` -- to the other supported unit. local function convert(unit, unitdef) if unit == nil or unitdef == nil then return {} end -- Import module to convert...
Click to read more »Module:WikidataIB/doc
Minggu, 2025-12-21 03:30:35getPropOfProp if the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 of each of those wikibase-items getAwardCat if the item...
Click to read more »Module:Bibleverse
Sabtu, 2025-10-18 19:59:27local function trimArg(text) if type(text) == 'string' then text = text:match('(%S.-)%s*$') --trimmed text or nil if empty end return text end local...
Click to read more »Module:Naval Vessel Register URL
Senin, 2025-08-11 23:02:19suffix, srv_craft) local category = ''; -- for concatenation if 0 == mw.title.getCurrentTitle().namespace then -- article namespace...
Click to read more »Module:Cs1 documentation support
Rabu, 2026-02-25 02:24:53-- if there is an id handler if access then -- and if this is a request for the handler's custom access parameter if id_src[meta]...
Click to read more »Module:If elseif/doc
Sabtu, 2025-11-08 00:12:52Implements {{If elseif}}. Tests a series of expressions, which are evaluated either as blank/noblank or, if |yesno= is set, using {{Yesno}}. Functionally...
Click to read more »Module:Chessboard mxn/sandbox
Rabu, 2026-05-27 11:27:45if ( numbers_lt ) then width = width + 18 end if ( numbers_rt ) then width = width + 18 end local b = '' local caption = '' if ( letters_tp...
Click to read more »Module:DYK nompage links
Senin, 2025-04-14 11:03:32makeFullUrl(page, query, display) local url = mw.uri.fullUrl(page, query) if not url then url = makeWikitextError(string.format( '"%s" is not a valid...
Click to read more »Module:Professional wrestling profiles
Sabtu, 2025-10-11 08:18:31fetch_wikidata(entity, property) if entity and property then local value = entity:getBestStatements(property)[1] if value then return...
Click to read more »Module:Nihongo/sandbox
Rabu, 2025-06-18 17:52:37formatting[index][2][3], formatting[index][2][4]) or nil; if extra2 then -- always just attached to the end (if there is an end) so not part of formatting{}...
Click to read more »Module:Sandbox/Alex 21
Minggu, 2025-01-12 07:47:31"%(([%w%s]+) (series %d+)%)", "(%1 TV series) %2" } for i=1, #matches, 2 do if content:match(matches[i]) then content = content:gsub(matches[i], matches[i+1])...
Click to read more »Module:Category series navigation/doc
Selasa, 2025-08-12 05:41:35{{Category series navigation}} on both sides, or in the middle, of the gap. Even if {{Category series navigation}} is isolated, it has the benefit of confirming...
Click to read more »Module:Taxonbar/exists
Kamis, 2024-04-18 18:17:43for _, v in pairs (tregex) do local found = string.match(content, v) if found then local v_cmt_before = '%<%!%-%-%s*'..v local v_cmt_after ...
Click to read more »Module:Parameters
Sabtu, 2020-07-04 17:52:26language; if more than one, separate ' .. 'using {{Plainlist}} use {{lang}}, and omit native_name_lang -->', dlist = 'name in local language; if more...
Click to read more »Module:Userbox/sandbox
Sabtu, 2026-05-16 05:33:28greater than or equal to zero. If so, -- returns it as a number. If not, returns a default value. val = tonumber(val) if val and val >= 0 then return...
Click to read more »Module:Pagetype/sandbox
Jumat, 2026-06-05 02:43:41namespace] or {} local keys = {} if nsInfo.name ~= '' then table.insert(keys, nsInfo.name) end if nsInfo.canonicalName ~= nsInfo.name and nsInfo...
Click to read more »Module:Category handler/sandbox
Minggu, 2020-05-17 21:35:33trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then if s ~= '' then return s...
Click to read more »Module:TaxonList/sandbox
Rabu, 2025-05-21 17:51:11taxon name with any † before it removed and either '†' if it was present or the empty string if not. =================================================...
Click to read more »Module:Excerpt/sandbox
Jumat, 2026-03-06 19:54:40if title.isRedirect then title = title.redirectTarget if fragment == "" then fragment = title.fragment -- page merge potential end end if...
Click to read more »Module:Sports roster
Rabu, 2025-02-12 05:29:05local function addflags(frame, names, key) for k,v in ipairs(names) do if v[key] then names[k][key] = '<span data-sort-value="' .. v[key] .. '">'...
Click to read more »Module:CFB schedule
Sabtu, 2026-05-23 06:34:49if (p or '') == '' then p = 'Coaches\'' end -- if p is linked then just return p if (p or ''):find('[%[%]]') then return p end -- else if y...
Click to read more »Module:Easter
Sabtu, 2025-05-31 01:00:39loadEasterYear(year) if not year then return false, formatEasterError(EasterData.errorMissingYear) end local result = tonumber(year) if not result...
Click to read more »Module:Cite IUCN
Rabu, 2026-05-13 01:51:09url_assesment_ID if args.doi then local lang_tag doi_taxon_ID, doi_assesment_ID, lang_tag = args.doi:match ('[Tt](%d+)[Aa](%d+)%.(%l%l)$') if not doi_taxon_ID...
Click to read more »Module:Routelist row
Jumat, 2025-01-03 10:31:57routeStates table corresponding to the status of the route. ]]-- if decommissioned == 'yes' then --If the decommissioned property just says "yes", then mark it...
Click to read more »Module:Formatted appearance/sandbox
Senin, 2024-05-06 18:43:16checks if the array had a value added by checking the counter, -- and returns the relevant result. local function getFormattedEntry(args, counter) if (counter...
Click to read more »Module:IPAddress/sandbox
Senin, 2025-12-08 09:27:07local p = {} function p._isIpV6(s) local dcolon, groups if type(s) ~= "string" or s:len() == 0 or s:find("[^:%x]") -- only colon and hex digits...
Click to read more »Module:Protected edit request/active
Rabu, 2026-04-15 08:14:15---------------------------- local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else...
Click to read more »Module:AfC
Jumat, 2025-05-30 07:25:29local is_userspace = string.sub(frame.args.t, 1, 4) == "User" if is_userspace or display_notes then cols[3] = string.format("<td>%s</td>"...
Click to read more »Module:Category main article
Selasa, 2025-12-09 01:37:11initialise local mArguments -- lazily initialise local p = {} -- Helper: true if the page is in Template: or Module: namespace local function isTemplateOrModule(title)...
Click to read more »Module:Icon
Jumat, 2026-01-30 13:27:05iconData if code then code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case iconData = data[code] end if not iconData...
Click to read more »Module:Team roster navbox
Selasa, 2020-09-22 22:16:22lazily initialized local function colorlinks(v, s) if v and v ~= '' and s and s ~= '' then if not mw.ustring.match(v, '<span style') then v = mw...
Click to read more »Module:Person height
Rabu, 2025-12-10 18:10:59person/height]] local p = {} local function splitsuffix(s) local suffix = '' if mw.ustring.match(s,'^(.-)(<sup.*)$') then local a = mw.ustring.gsub(s, '^(...
Click to read more »Module:Effective protection expiry
Rabu, 2022-02-23 17:59:29expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed...
Click to read more »Module:Collapsible list
Rabu, 2026-05-20 07:05:09local p = {} local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height:...
Click to read more »Module:Lang/data/iana languages/make
Rabu, 2024-07-10 21:55:31label = string.match(line, "(.-):") if not label and string.find (line, '^ .+') and not in_comments then -- if a continuation line but not a comments...
Click to read more »Module:List of hieroglyphs
Selasa, 2023-01-10 03:30:15"Unclassified signs" } function clc(gardiner) local cat = gardiner_cat[gardiner] if cat then return ("[[:Category:%s]] (%d)"):format(cat, mw.site.stats...
Click to read more »Module:UserLinks/extra
Rabu, 2024-08-28 06:55:47http(snippets) -- To see if an IP is serving a web page local host = snippets.username if not host:match('^%d+%.%d+%.%d+%.%d+$') then if host:match('^[%x:]+$')...
Click to read more »Module:Highest archive number
Selasa, 2019-10-08 22:47:04inputs if type(prefix) ~= 'string' or not prefix:find('%S') then error('No prefix supplied to [[Module:Highest archive number]]', 2) end if start ~=...
Click to read more »Module:Attached KML
Jumat, 2026-04-17 01:32:34for key, val in pairs(argsTable) do if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val ~= '' then cleanArgs[key] = val...
Click to read more »Module:World topic
Kamis, 2025-05-08 16:32:01local target = nil if redlinks then if override[y] then target = override[y] elseif y == "Georgia" then if mw.title.new(prefix..country[y][1]...
Click to read more »Module:Pagelist
Sabtu, 2026-06-06 20:22:25['tpt-languages'] = true } local function getSeparator(sep) if type(sep) ~= 'string' then return nil end if separators[sep] then return mw.message.new(sep...
Click to read more »Module:Infobox multi-lingual name
Jumat, 2026-05-08 04:51:28>------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil)...
Click to read more »Module:Svara
Kamis, 2025-10-16 21:50:42local svaras = svaraResolve[type] for key, value in pairs(input) do if svaras[value] then input[key] = svaras[value]; end end return input...
Click to read more »Module:Sort title
Kamis, 2020-05-21 02:15:13check if the word is an article. Returns true if it is, false if it isn't. --]] local function isFirstWordAnArticle(word) word = string.lower(word) if (word...
Click to read more »Module:Automarkup
Senin, 2015-12-14 23:33:54frame:getParent().args local templateArgs = { } for key, value in pairs(args) do if type(key) == "number" then templateArgs[2 * key - 1] = value templateArgs[2...
Click to read more »Module:Libyan Civil War detailed map
Minggu, 2026-05-10 18:33:29display name; click to go to location row in the "table of cities and towns" (if available).'''<br/> *[[File:Location dot red.svg|11px]] Under the control...
Click to read more »Module:Purge
Senin, 2017-11-13 23:20:48-- Make the URL local url do local title if args.page then title = mw.title.new(args.page) if not title then error(string.format( "'%s'...
Click to read more »Module:Webarchive/data
Selasa, 2026-02-24 05:15:39tname = 'Webarchive', -- name of calling template. Change if template rename. verifydates = true, -- See documentation....
Click to read more »Module:Convert/documentation/conversion data/introduction
Minggu, 2026-05-24 14:22:45gives conversion factors correct to 7 places. Factors in bold are exact. If exact factors have more than 7 places, they are rounded and no longer exact...
Click to read more »Module:Category pair
Jumat, 2022-10-21 13:49:24formatLink{link = nextTitle.fullText} local note = '' if prevTitle and nextTitle then -- if both note = mw.ustring.format('See also the preceding...
Click to read more »Module:Trim quotes
Selasa, 2019-05-21 08:19:23local p = {} function p._trim(s) if s then if s:match([[^(['"]).*%1$]]) then return p._trim(string.sub(s,2,-2)) else return s end else return ""...
Click to read more »Module:If elseif/sandbox
Sabtu, 2025-11-08 00:10:34thenval if args[n] then if args[n+1] then ifval, thenval = args[n], args[n+1] n = n + 2 else return args[n] end elseif args['if' .....
Click to read more »Module:Flag list
Selasa, 2025-11-04 05:08:56local p = {} function p.luawidth(size) --For use within Lua local w if string.find(size,"^%d+x%d+px$") then -- width and height (eg. 20x10px) --...
Click to read more »Module:NYC bus link
Jumat, 2022-10-21 13:34:27getArgs(frame); local result = {}; local city; args.city = args.city:lower(); if 'nyc' == args.city then city = 'New York City bus'; elseif 'li' == args...
Click to read more »Module:Video game wikidata/sandbox
Jumat, 2023-08-11 22:13:39if(platformA == nil) then platformA = mw.wikibase.label('Q'..a['qualifiers']['P400'][1]['datavalue']['value']['numeric-id']); end; end; if...
Click to read more »Module:I18n/complex date
Rabu, 2020-11-25 04:55:02decYear(state,lang,case) --Declension of word "year" in several languages if state.precision == 9 then yearCase = { fi={xxx='vuosien', gen='vuoden'...
Click to read more »Module:Footnotes/whitelist
Sabtu, 2026-05-30 10:57:19ssts_registry = pcall(require, 'Module:SST/registry') if success and type(ssts_registry) == 'table' then if ssts_registry.defaults then for t_name...
Click to read more »Module:Track gauge/sandbox
Selasa, 2023-04-11 08:20:28local rawDisp for k, v in pairs(origArgs) do if tonumber(k) == nil then -- Named argment if k == 'disp' then rawDisp = v -- Keep raw disp...
Click to read more »Module:Team appearances list/sandbox
Selasa, 2025-07-29 19:58:02strip_to_nil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example, be nil). if type(text)...
Click to read more »