Module:Asbox

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 '[ 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 = '' 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 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 .. ' ' .. tostring(note) end

TEXT:wikitext(textstring) TR:node(TEXT) TABLE:node(TR)

table.insert( categories, '' ) if not HF.isempty( frame.args.category ) then table.insert( categories, '' ) end if not HF.isempty( frame.args.category1 ) then table.insert( categories, '' ) end if not HF.isempty( frame.args.category2 ) then table.insert( categories, '' ) end local catguts = CH{main = table.concat( categories ), category = table.concat( categories )}

return tostring(TABLE) .. tostring(catguts) end

return Asbox