Module documentation

This module has various functions described below and should only be utilized on templates. To call a module in a template, insert {{#invoke:Number|function name|various parameters}} onto the template.[ Data ]

For help on this module, please contact an administrator.
Visit Module:Number/doc to edit this text! (How does this work?)

--[[Category:Lua modules]]
local p = {}
local numData = mw.loadData('Module:Number/data')

function p.getNum(frame)
    local show= frame.args[1]
	local number={}
    if numData[show]
        then number=numData[show][1]
        else number="0[[Category:"
			 .."Broken S link]]"
    return number

function p.current(frame)
	local show=frame.args[1]
	local pagename=frame.args[2]
	local currentDisplay=""
	local length= mw.ustring.len(show)
    local par={}
    if mw.ustring.find(show,'(',1,true)==nil
        then par=length
        else par=mw.ustring.find(show,'(',1,true)-2
	local title=mw.ustring.sub(show,1,par)
	pagename = mw.text.decode(pagename,false)
	if numData[show]
		then local season=numData[show][2]
			local suggestedPN="Season "
				.." ("
			if suggestedPN==pagename and numData[show][3]>0
				then currentDisplay="<small>("
						.." aired)</small>"
	return frame:preprocess(currentDisplay)
return p
Community content is available under CC-BY-SA unless otherwise noted.