Kairosoft Wiki
Advertisement

Documentation for this module may be created at Module:Poll/doc

--
-- This module implements {{StarPoll}}
--
 
local p = {}

function p.starPoll(frame)
    local args = frame.args
    local pArgs = frame:getParent().args
    
    local pollName = args[1] or pArgs[1] or "Example"
    
    local t = {}
    t[#t+1] = "<div id='starRatingPollCont'>"
    t[#t+1] = "<h2>Game Rating</h2>"
    t[#t+1] = "<poll>"
    t[#t+1] = pollName .. " Rating"
    t[#t+1] = "★★★★★"
    t[#t+1] = "★★★★"
    t[#t+1] = "★★★"
    t[#t+1] = "★★"
    t[#t+1] = "★"
    t[#t+1] = "</poll>"
    t[#t+1] = "</div>"
    
    return frame:preprocess( table.concat(t,"\n") )
end
 
return p
Advertisement