Jump to content

Module:Banner shell and Module:Banner shell/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
You seem to have toggled sandbox mode there
 
simplify
 
Line 1: Line 1:
require('strict')
require('strict')
local p = {}
local p = {}
local sandbox-- = '/sandbox' -- BE SURE TO COMMENT OUT this definition when deploying to live
local sandbox = '/sandbox' -- BE SURE TO COMMENT OUT this definition when deploying to live
local yesno = require('Module:Yesno')
local yesno = require('Module:Yesno')


Line 93: Line 93:
end
end
local blp = args.blp and args.blp:lower()
local blp = args.blp and args.blp:lower()
if yesno(blp) or blp=='activepol' or yesno(args.living) then
if yesno(blp) or blp=='activepol' then
table.insert(out, frame:expandTemplate{
table.insert(out, frame:expandTemplate{
title = cfg.blp_template.blp,
title = cfg.blp_template.blp,
Line 184: Line 184:
end
end
elseif not yesno(args.vital) and class~='' then -- if no projects and not vital and assessed then add class super category
elseif not yesno(args.vital) and class~='' then -- if no projects and not vital and assessed then add class super category
addCategory(class .. '-Class ' .. (class=='NA' and 'pages' or 'articles'))
if class == 'NA' then
addCategory('NA-Class pages')
else
addCategory(class .. '-Class articles')
end
end
end
local header = mw.html.create('tr')
local header = mw.html.create('tr')