FANDOM


local Stub = {}
local getArgs = require('Dev:Arguments').getArgs
 
function Stub.main(frame)
	local args = getArgs(frame)
	return Stub._main(args)
end
 
function Stub._main(args)
    local container = mw.html.create('div')
        :attr('id', 'mntExpand')
        :addClass('stub')
 
    local image = container:tag('span')
        :addClass('image')
        :css('text-align', 'center')
        :wikitext(args['image'] or '[[File:Riki.png|40px]]')
 
    local seguetext1 = ''
    local seguetext2 = ''
    local topicparam = args['topic']
    local releaseparam = args['title'] or args[1]
    if topicparam and releaseparam then
        seguetext2 = ' in '
    end
    if topicparam or releaseparam then
        seguetext1 = ' about '
    end
    if not topicparam then
        topicparam = ''
    end
    if not releaseparam then
        releaseparam = ''
    end
 
    local beginningtext = 'This article or section is a [[wikipedia:Wikipedia:Stub|stub]]'
    local extratext = seguetext1 .. topicparam .. seguetext2 .. releaseparam
    local closingtext = 'You can help the '..mw.site.siteName..' by ['..tostring(mw.uri.fullUrl(mw.title.getCurrentTitle().prefixedText,'action=edit'))..' expanding it]'
 
    local text = container:tag('span')
        :addClass('text')
        :css('left', '-40px')
        :css('padding-left', '40px')
        :wikitext(beginningtext .. extratext .. '. ' .. closingtext .. '.')
 
    local cat1 = '[' .. '[' .. 'Category:Stubs' .. ']' .. ']'
    local cat2 = ''
    if releaseparam ~= '' then
        cat2 = '[' .. '[' .. 'Category:' .. releaseparam .. ' stubs' .. ']' .. ']'
    end
 
    local categories = container:wikitext(cat1 .. cat2)
 
    return container
end
 
return Stub

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.