Module:Lua banner and Module:Transclusion count/data/H: Difference between pages

From Frontierpedia, the Microsoft Agent encyclopedia
(Difference between pages)
en>MSGJ
No edit summary
 
en>Ahechtbot
m (Bot: Updated page.)
 
Line 1: Line 1:
-- This module implements the {{lua}} template.
return {
local yesno = require('Module:Yesno')
["H-phrases"] = 2000,
local mList = require('Module:List')
["HABS"] = 2100,
local mTableTools = require('Module:TableTools')
["HDS"] = 4100,
local mMessageBox = require('Module:Message box')
["HD_color"] = 2800,
 
["HKG"] = 2700,
local p = {}
["HMAS"] = 6600,
 
["HMCS"] = 4400,
function p.main(frame)
["HMM"] = 5200,
local origArgs = frame:getParent().args
["HMNZS"] = 2000,
local args = {}
["HMS"] = 32000,
for k, v in pairs(origArgs) do
["HOUR"] = 2300,
v = v:match('^%s*(.-)%s*$')
["HRV"] = 4000,
if v ~= '' then
["HUN"] = 9500,
args[k] = v
["Hab"] = 11000,
end
["Hair_space"] = 6800,
end
["Hansard-contribs"] = 9300,
return p._main(args)
["Harv"] = 6300,
end
["Harvard_citation"] = 6900,
 
["Harvard_citation_no_brackets"] = 38000,
function p._main(args)
["Harvard_citation_text"] = 5300,
local modules = mTableTools.compressSparseArray(args)
["Harvid"] = 53000,
local box = p.renderBox(modules)
["Harvnb"] = 38000,
local trackingCategories = p.renderTrackingCategories(args, modules)
["Harvp"] = 2900,
return box .. trackingCategories
["Harvtxt"] = 5300,
end
["Hat"] = 10000,
 
["Hatnote"] = 351000,
function p.renderBox(modules)
["Hatnote_inline"] = 2800,
local boxArgs = {}
["Hatnote_inline/invoke"] = 2800,
if #modules < 1 then
["Height"] = 106000,
boxArgs.text = '<strong class="error">Error: no modules specified</strong>'
["Help_me-helped"] = 14000,
else
["Helpbox"] = 2500,
local moduleLinks = {}
["Helpme-helped"] = 2100,
for i, module in ipairs(modules) do
["Hex2dec"] = 2300,
moduleLinks[i] = string.format('[[:%s]]', module)
["Hidden"] = 345000,
end
["Hidden/FC"] = 3600,
local moduleList = mList.makeList('bulleted', moduleLinks)
["Hidden_archive_bottom"] = 11000,
boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList
["Hidden_archive_top"] = 11000,
end
["Hidden_begin"] = 380000,
boxArgs.type = 'notice'
["Hidden_category"] = 6200,
boxArgs.small = true
["Hidden_end"] = 379000,
boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=|link=]]'
["Hidden_ping"] = 3000,
return mMessageBox.main('mbox', boxArgs)
["Hidden_sort_key"] = 16000,
end
["Hide_in_print"] = 76000,
 
["High-Class"] = 15000,
function p.renderTrackingCategories(args, modules, titleObj)
["High-importance"] = 15000,
if yesno(args.nocat) then
["High-use"] = 3200,
return ''
["Highlight"] = 4700,
end
["Highlight/core"] = 4900,
["Hilite"] = 2900,
local cats = {}
["Historical"] = 24000,
["Historical_populations"] = 33000,
-- Error category
["History_icon"] = 9200,
if #modules < 1 then
["History_icon2"] = 9200,
cats[#cats + 1] = 'Lua templates with errors'
["Hlist"] = 170000,
end
["Hmbox"] = 22000,
["Hmmm"] = 4900,
-- Lua templates category
["Hndis"] = 61000,
titleObj = titleObj or mw.title.getCurrentTitle()
["HockeyDB"] = 3900,
local subpageBlacklist = {
["Hockeydb"] = 3700,
doc = true,
["Hong_Kong_English"] = 2800,
sandbox = true,
["Horizontal_TOC"] = 4400,
sandbox2 = true,
["Horizontal_TOC/styles.css"] = 4400,
testcases = true
["Horse_racing"] = 3300,
}
["HoursElapsed"] = 41000,
if titleObj.namespace == 10
["Hours_elapsed"] = 41000,
and not subpageBlacklist[titleObj.subpageText]
["Hover_title"] = 52000,
then
["How_to_request_photo_in"] = 2100,
local category = args.category
["Howtoreqphotoin"] = 2100,
if not category then
["Hr"] = 4000,
local categories = {
["Hs"] = 16000,
['Module:String'] = 'Lua String-based templates',
["Hugman"] = 6600,
['Module:Math'] = 'Templates based on the Math Lua module',
["Human_name_disambiguation"] = 64000,
['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',
["Humor"] = 2100,
['Module:Citation'] = 'Lua-based citation templates'
["Hurricane"] = 2700,
}
["Hurricane_season_bar"] = 2300,
categories['Module:Citation/CS1'] = categories['Module:Citation']
["Hurricane_season_bar/button"] = 2300,
category = modules[1] and categories[modules[1]]
["Hurricane_season_bar/end"] = 2300,
category = category or 'Lua-based templates'
["Hurricane_season_bar/start"] = 2300,
end
["Hurricane_status_small"] = 2300,
cats[#cats + 1] = category
["Module:HTMLDecode"] = 582000,
local protLevels = {
["Module:Hatnote"] = 1440000,
autoconfirmed = 1,
["Module:Hatnote_inline"] = 2800,
extendedconfirmed = 2,
["Module:Hatnote_list"] = 949000,
templateeditor = 3,
["Module:Hidden_ping"] = 3000,
sysop = 4
["Module:High-use"] = 3200,
}
["Module:Highest_archive_number"] = 102000,
local currentProt = titleObj.protectionLevels["edit"][1]
["Module:Historical_populations"] = 33000,
if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end
["Module:Hms"] = 226000,
for i, module in ipairs(modules) do
}
local moduleProt = mw.title.new(module).protectionLevels["edit"][1]
if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end
if moduleProt < currentProt then
cats[#cats + 1] = "Templates using under-protected Lua modules"
break
end
end
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
 
return p

Revision as of 05:38, 10 January 2021

Documentation for this module may be created at Module:Transclusion count/data/H/doc

return {
["H-phrases"] = 2000,
["HABS"] = 2100,
["HDS"] = 4100,
["HD_color"] = 2800,
["HKG"] = 2700,
["HMAS"] = 6600,
["HMCS"] = 4400,
["HMM"] = 5200,
["HMNZS"] = 2000,
["HMS"] = 32000,
["HOUR"] = 2300,
["HRV"] = 4000,
["HUN"] = 9500,
["Hab"] = 11000,
["Hair_space"] = 6800,
["Hansard-contribs"] = 9300,
["Harv"] = 6300,
["Harvard_citation"] = 6900,
["Harvard_citation_no_brackets"] = 38000,
["Harvard_citation_text"] = 5300,
["Harvid"] = 53000,
["Harvnb"] = 38000,
["Harvp"] = 2900,
["Harvtxt"] = 5300,
["Hat"] = 10000,
["Hatnote"] = 351000,
["Hatnote_inline"] = 2800,
["Hatnote_inline/invoke"] = 2800,
["Height"] = 106000,
["Help_me-helped"] = 14000,
["Helpbox"] = 2500,
["Helpme-helped"] = 2100,
["Hex2dec"] = 2300,
["Hidden"] = 345000,
["Hidden/FC"] = 3600,
["Hidden_archive_bottom"] = 11000,
["Hidden_archive_top"] = 11000,
["Hidden_begin"] = 380000,
["Hidden_category"] = 6200,
["Hidden_end"] = 379000,
["Hidden_ping"] = 3000,
["Hidden_sort_key"] = 16000,
["Hide_in_print"] = 76000,
["High-Class"] = 15000,
["High-importance"] = 15000,
["High-use"] = 3200,
["Highlight"] = 4700,
["Highlight/core"] = 4900,
["Hilite"] = 2900,
["Historical"] = 24000,
["Historical_populations"] = 33000,
["History_icon"] = 9200,
["History_icon2"] = 9200,
["Hlist"] = 170000,
["Hmbox"] = 22000,
["Hmmm"] = 4900,
["Hndis"] = 61000,
["HockeyDB"] = 3900,
["Hockeydb"] = 3700,
["Hong_Kong_English"] = 2800,
["Horizontal_TOC"] = 4400,
["Horizontal_TOC/styles.css"] = 4400,
["Horse_racing"] = 3300,
["HoursElapsed"] = 41000,
["Hours_elapsed"] = 41000,
["Hover_title"] = 52000,
["How_to_request_photo_in"] = 2100,
["Howtoreqphotoin"] = 2100,
["Hr"] = 4000,
["Hs"] = 16000,
["Hugman"] = 6600,
["Human_name_disambiguation"] = 64000,
["Humor"] = 2100,
["Hurricane"] = 2700,
["Hurricane_season_bar"] = 2300,
["Hurricane_season_bar/button"] = 2300,
["Hurricane_season_bar/end"] = 2300,
["Hurricane_season_bar/start"] = 2300,
["Hurricane_status_small"] = 2300,
["Module:HTMLDecode"] = 582000,
["Module:Hatnote"] = 1440000,
["Module:Hatnote_inline"] = 2800,
["Module:Hatnote_list"] = 949000,
["Module:Hidden_ping"] = 3000,
["Module:High-use"] = 3200,
["Module:Highest_archive_number"] = 102000,
["Module:Historical_populations"] = 33000,
["Module:Hms"] = 226000,
}