Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
simp
check article_class earlier
Line 240:
local class = raw_args.class
if class then -- banner gives quality ratings
local show_quality, conflict = true, false
local title = args.demo_page and mw.title.new(args.demo_page) or current_title
local article_class = p.readarticleclass({ignore_subtemplates=true}, title.prefixedText)
article_class = article_class and class_mask({article_class}, title)
local show_quality, conflict = true, false
if args.QUALITY_CRITERIA=='custom' then -- project has opted out of standard assessment scale and uses a custom mask
local custom_mask = banner_name:subPageTitle('class')
Line 250 ⟶ 252:
})
if class=='' then -- unassessed, see if there is an article assessment
local article_class = p.readarticleclass({ignore_subtemplates=true}, title.prefixedText)
article_class = article_class and class_mask({article_class}, title)
if article_class and article_class~='' then -- article class exists, check if it can be inherited
class = mw.text.trim(frame:expandTemplate{
Line 263:
local classmask_args = {FQS = 'yes', [1] = class}
class = class_mask(classmask_args, title)
local article_class = p.readarticleclass({ignore_subtemplates=true}, title.prefixedText)
article_class = article_class and class_mask({article_class}, title)
if article_class then -- banner shell exists
if article_class=='' then -- no article class defined