FANDOM


local Asbox = {}
local HF = require('Module:HF')
local CH = require('Module:Category handler').main
 
function Asbox.main( frame )
  local subject = frame.args.subject or ''
  local article = frame.args.article or '[{{fullurl:{{FULLPAGENAME}}|action=edit}} article]'
  local qualifier = frame.args.qualifier or ''
  local categories = {}
  local TABLE = mw.html.create('table')
    :addClass('metadata plainlinks stub')
    :css('background','transparent')
    :attr('role','presentation')
  local TR = mw.html.create('tr')
  if not HF.isempty( frame.args.icon ) then
      local imagecell = mw.html.create('td')
        :wikitext( frame.args.icon )
      TR:node(imagecell)
    elseif not HF.isempty ( frame.args.image ) then
        local picsize = frame.args.pix or '40x30'
        local alttext = frame.args.imagealt or 'Stub icon'
        local imagestring = '[[File:'.. frame.args.image ..'|'.. picsize ..'px|alt='.. alttext ..']]'
        local imagecell = mw.html.create('td')
          :wikitext(imagestring)
        TR:node( imagecell )
  end
  local TEXT = mw.html.create('td')
  local textstring = "''This ".. subject ..' '.. article ..' '.. qualifier .." is a [[:Category:Article stubs|stub]].'' You can help American Horror Story Wiki by expanding it."
 
-- I'll add navbar later.
-- local navbar = ''
 
  if not HF.isempty( frame.args.note ) then
    local note = mw.html.create( 'span' )
      :css('font-style','normal')
      :css('font-size','smaller')
      :wikitext(frame.args.note)
    textstring = textstring .. '<br />' .. tostring(note)
  end
 
  TEXT:wikitext(textstring)
  TR:node(TEXT)
  TABLE:node(TR)
 
  table.insert( categories, '[[Category:' .. 'All stub articles]]' ) 
  if not HF.isempty( frame.args.category ) then table.insert( categories, '[[Category:' .. frame.args.category ..']]' ) end
  if not HF.isempty( frame.args.category1 ) then table.insert( categories, '[[Category:' .. frame.args.category1 ..']]' ) end
  if not HF.isempty( frame.args.category2 ) then table.insert( categories, '[[Category:' .. frame.args.category2 ..']]' ) end 
  local catguts = CH{main = table.concat( categories ), category = table.concat( categories )}
 
  return tostring(TABLE) .. tostring(catguts)
end
 
return Asbox

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.