Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
+1 user project page
move banner shell check outside of class code
Line 293:
end
local class = raw_args.class
local title = args.demo_page and mw.title.new(args.demo_page) or current_title
if class then -- banner gives quality ratings
local article_class = p.readarticleclass({ignore_subtemplates=true}, title.prefixedText)
local title = args.demo_page and mw.title.new(args.demo_page) or current_title
if not article_class then
local article_class = p.readarticleclass({ignore_subtemplates=true}, title.prefixedText)
if not article_classpagetype=='article' then
add_category(cfg.category.no_banner_shell_articles)
if pagetype=='article' then
elseif title.namespace==3 then --User talk namespace
add_category(cfg.category.no_banner_shell_articles)
local valid_users = {
elseif title.namespace==3 then --User talk namespace
"AlexNewArtBot",
local valid_users = {
"AlexNewArtBotInceptionBot",
"InceptionBotSDZeroBot",
"SDZeroBotUBX",
"UBXWP 1.0",
}
"WP 1.0",
for _, user in ipairs(valid_users) do
}
if string.find(title.rootText, user) then
for _, user in ipairs(valid_users) do
add_category(cfg.category.no_banner_shell)
if string.find(title.rootText, user) then
add_category(cfg.category.no_banner_shell)
end
end
else
add_category(cfg.category.no_banner_shell)
end
else
add_category(cfg.category.no_banner_shell)
end
end
if class then -- banner gives quality ratings
article_class = article_class and p.class_mask(article_class, title, false, pagetype)
local show_quality, conflict = true, false