Module:Staff

local p = {}

local title = mw.title.getCurrentTitle local data = mw.loadData('Module:Staff/data')

function p.main(frame) if title.namespace ~= 2 then return end local group = data.users[title.text] if not group then return end local groupdata = data.appearance[group] local str = {} table.insert(str, '<span title="This user is ')   local first = mw.ustring.lower(mw.ustring.sub(groupdata.name, 0, 1))    if first == 'a' or first == 'e' or first == 'i' or first == 'o' or first == 'u' then        table.insert(str, 'an')    else        table.insert(str, 'a')    end    table.insert(str, ' ')    table.insert(str, groupdata.name)    table.insert(str, ' of the ')    table.insert(str, mw.site.siteName)    table.insert(str, '." class="staff')    if not groupdata.icon then        table.insert(str, ' noicon')    end    table.insert(str, '">') if groupdata.icon then table.insert(str, 'https://community.wikia.com/wiki/Special:FilePath/File:Badge-') table.insert(str, groupdata.icon) table.insert(str, '.svg') else table.insert(str, '*') end table.insert(str, ' ') return table.concat(str) end

return p