FANDOM


local HF = mw.InfoboxBuilderHF
-- Everything else is just augmentation
HF.getArgs = require('Dev:Arguments').getArgs
HF.L = require('Dev:List')
HF.CH = require('Module:Category handler').main
language = mw.language.new('en')
 
-- Date Functions
function HF.formatDate( field ) -- InfoboxBuilder
    return HF.__formatDate( field.Value )
end
 
function HF._formatDate( frame ) -- invoke
    return HF.__formatDate( frame.args[1] )
end
 
function HF.__formatDate( var ) -- internal
   return language:formatDate("F j, Y", var)
end
 
-- List Functions
function HF.list( field, vars ) -- InfoboxBuilder
    return HF.__list( field.ListType, field.Value )
end
 
function HF._list( frame ) -- invoked
    local listtype = frame.args['type'] or frame.args[1]
    local divisible = frame.args
    return HF.__list( listtype, divisible )
end
 
function HF.__list( listtype, divisible ) -- internal
    local items = HF.explode( ';', divisible )
    if (listtype == 'horizontal') then items.class = 'hwrap plainlinks' end
    return HF.L.makeList( listtype , items )
end
 
function HF.horizontal( frame ) -- invoked
    return HF.__list('horizontal', frame.args[1])
end
 
 
function HF.bulleted( frame ) -- invoked
    return HF.__list('bulleted', frame.args[1])
end
 
function HF.unbulleted( frame ) -- invoked
    return HF.__list('unbulleted', frame.args[1])
end
 
return HF

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.