FANDOM


-- Sets up a system for the Template:User fanof userbox, allowing one module to create many different forms of the same template.
 
local p = {}
 
p.data = {
    -- {"Username","FileName","Display (This user is a fan of ...)", {configurations}}
    -- configurations: {textbg=example,imagebg=example,fontcolor=example,textimage=example}
    {"Shedletsky","John-shedletsky.jpg","John Shedletsky aka, Telamon.",{bordercolor="#876325",imagebg="#6F0F10"}},
    {"Dued1","Dued1Fan.png","[[Community:Dued1|Dued1]].",{textbg="cyan",imagebg="white",textimage="black",fontcolor="black"}},
    {"Polyhex","TylerMcBride.jpg","[[Community:Polyhex|Polyhex]].",{textbg="purple",imagebg="white",fontcolor="white"}},
    {"Cindering","Cinderingfan.png","[[Community:Cindering|Cindering]].",{textbg="red",imagebg="white",textimage="black",fontcolor="black"}},
    {"Loleris","Lolerisfan.png","[[Community:Loleris|Loleris]].",{textbg="cyan",imagebg="white",textimage="black",fontcolor="black"}},
    {"Alexnewtron","Alexnewtronfan.png","[[Community:Alexnewtron|Alexnewtron]].",{textbg="black",imagebg="white",textimage="black",fontcolor="white"}},
    {"david.baszucki","Current_David.png","[[Community:David.baszucki|David Baszucki]].",{textbg="black",imagebg="white",textimage="white",fontcolor="white"}},
    {"Nathorix","Nathorix's Profile Picture.png","[[Community:Nathorix|Nathorix]].",{bordercolor="#FAFD00",textbg="#540484",imagebg="#BC2AFF",textimage="#C568F0",fontcolor="#FEFEFE"}},
    {"DrTrayBlox","DrTrayBlox.png","DrTrayBlox.",{bordercolor="blue",textbg="#FFFF54",imagebg="blue",textimage="blue",fontcolor="blue"}},
    {"inquisitormaster","Inquisitormaster's Profile Picture.png","[[Community:inquisitormaster|Inquisitormaster]].",{bordercolor="#03FFFD",textbg="#F8AAF4",imagebg="#F5FC01",textimage="#EE7BF4",fontcolor="#000000"}},
    {"Faave","Fave's Profile Picture.png","[[Community:Faave|Faave]].",{bordercolor="#8508C8",textbg="#0A0A0A",imagebg="#9E2BDB",textimage="#A531E2",fontcolor="#FFFCFC"}},
    {"Conor3D","Conor3D1.png","[[Community:Conor3D|Conor3D]].",{bordercolor="#E75480",textbg="#1E90FF",imagebg="#FF0000",textimage="black",fontcolor="#000000"}},
    {"epikrika_a","epikrika.png","[[Community:Epikrika a|Epikrika]].",{bordercolor="black",textbg="black",imagebg="black",textimage="black",fontcolor="white"}},
    {"TheNexusAvenger","TheNexusAvenger.jpg","{{player link|TheNexusAvenger}}.",{bordercolor="#FFFFFF",textbg="#5A4F4D",imagebg="#000000",textimage="black",fontcolor="#FFFFFF"}},
    {"V_yriss","V_yriss' Furry Profile Picture.png","[[Community:V_yriss|V_yriss]].",{bordercolor="#DC851D",textbg="#D70606",imagebg="#000000",textimage="black",fontcolor="#000000"}},
    {"callmehbob","Callmehbob's Profile Picture.png","[[Community:callmehbob|callmehbob]].",{bordercolor="#6ACCF2",textbg="#F3F68D",imagebg="#F590E1",textimage="#E5F72D",fontcolor="#000000"}},
    {"KonekoKittenWasTaken","KonekoKitten's Pansexual Profile Picture.jpg","[[Community:KonekoKittenWasTaken|KonekoKitten]].",{bordercolor="#8542B3",textbg="#C69BEB",imagebg="#F4DCF7",textimage="#FAF8FA",fontcolor="#000000"}},
    {"whos_toxic","iSoToxic's Profile Picture.jpg","[[Community:whos_toxic|iSoToxic]].",{bordercolor="#7E1FDB",textbg="#719B72",imagebg="#7E1FDB",textimage="#FFFFFF",fontcolor="#000"}},
    {"mrflimflam","Flamingo's Profile Picture.jpg","[[Community:mrflimflam|mrflimflam]] (Flamingo).",{bordercolor="#51CAC5",textbg="#67FFFE",imagebg="#FCFCFC",textimage="#97D2EE",fontcolor="#000"}},
    {"Onett","Onett's Profile Picture.png","[[Community:Onett|Onett]].",{bordercolor="#D81D00",textbg="#D81D00",imagebg="#000",textimage="#000",fontcolor="#FFF"}},
    {"ObscureEntity","Isaac's Profile Picture.jpg","[[Community:ObscureEntity|ObscureEntity]].",{bordercolor="#E6E02F",textbg="#000",imagebg="#05AEFF",textimage="#05AEFF",fontcolor="#FFF"}},
    {"RoScripts","RoScripts' Profile Picture.png","[[Community:RoScripts|RoScripts]].",{bordercolor="#132196",textbg="#95CCE9",imagebg="#FFFFFF",textimage="#132196",fontcolor="#000000"}},
    {"phirefox","PhireFox's Profile Picture.png","[[Community:PhireFox|phirefox]].",{bordercolor="#E50303",textbg="#FCDA06",imagebg="#E50303",textimage="#E50303",fontcolor="#000000"}},
    {"intervin","ROBLOXMuff's Profile Picture.png","[[Community:Intervin|intervin]].",{bordercolor="#A360B2",textbg="#B611DB",imagebg="#CC78DF",textimage="#CC78DF",fontcolor="#FFFFFF"}},
    {"forstaken","Tofuu's Profile Picture.jpg","[[Community:Forstaken|forstaken]].",{bordercolor="#1FBA12",textbg="#FFF000",imagebg="#1FBA12",textimage="#000000",fontcolor="#000000"}},
    {"GrottyPuff","Grotesquette2019.png","[[Community:GrottyPuff|GrottyPuff]].",{bordercolor="#736868",textbg="#CE25A8",imagebg="#0A0606",textimage="#0A0606",fontcolor="#FFFFFF"}},
    {"ZacharyZaxor","ZacharyZaxor's Profile Picture.png","[[Community:ZacharyZaxor|ZacharyZaxor]].",{bordercolor="#F9E02B",textbg="#26B496",imagebg="#37E1C8",textimage="#37E1C8",fontcolor="#FFFFFF"}},
    {"NotLeah","Leah Ashe's Profile Picture.jpg","[[Community:NotLeah|NotLeah]].",{bordercolor="#F569B1",textbg="#FBB5D9",imagebg="#EF84BB",textimage="#EF84BB",fontcolor="#000000"}},
    {"Pokediger1","Poke's Profile Picture.jpg","[[Community:Pokediger1|Pokediger1]].",{bordercolor="#000000",textbg="#EFEF62",imagebg="#C6C60C",textimage="#C6C60C",fontcolor="#000000"}},
    {"ChloeUrie","ChloeGames' Profile Picture.jpg","[[Community:ChloeUrie|ChloeGames]].",{bordercolor="#FF0000",textbg="#FF5C5C",imagebg="#000000",textimage="#000000",fontcolor="#000000"}},
    {"applecake3039204536","TheHealthyCow's Profile Picture.jpg","[[Community:applecake3039204536|TheHealthyCow]].",{bordercolor="#000000",textbg="#0062C8",imagebg="#62ADFA",textimage="#70B1FF",fontcolor="#FFFFFF"}},
    {"Linkmon99","Linkmon99's Profile Picture.jpg","[[Community:Linkmon99|Linkmon99]].",{bordercolor="#F8FC00",textbg="#279E17",imagebg="#279E17",textimage="#279E17",fontcolor="#FFFFFF"}},
    {"skoonks","Roblox Minigunner's Profile Picture.jpg","[[Community:skoonks|skoonks]].",{bordercolor="#FF0000",textbg="#FFFFFF",imagebg="#000000",textimage="#000000",fontcolor="#000000"}},
    {"LovelyLyssyy","Lovely Lyssy's Profile Picture.jpg","[[Community:LovelyLyssyy|LovelyLyssyy]].",{bordercolor="#A845FF",textbg="#D773FF",imagebg="#D773FF",textimage="#DD93FF",fontcolor="#000000"}},
    {"kristiexo","TheLaughingUnicorn's Profile Picture.jpg","[[Community:kristiexo|kristiexo]].",{bordercolor="#FF3FBC",textbg="#FF7ED2",imagebg="#FF3FBC",textimage="#FF3FBC",fontcolor="#FFFFFF"}},
    {"THEREALCYBERNOVA","cybernova games' Profile Picture.jpg","[[Community:THEREALCYBERNOVA|cybernova games]].",{bordercolor="#000000",textbg="#E6B2FF",imagebg="#000000",textimage="#000000",fontcolor="#000000"}},
    {"legoseed","Legoseed's Profile Picture.jpg","[[Community:legoseed|legoseed]].",{bordercolor="#000000",textbg="#FFFFFF",imagebg="#FFFFFF",textimage="#000000",fontcolor="#000000"}},
    {"InceptionTime","InceptionTime's Profile Picture.png","[[Community:InceptionTime|InceptionTime]].",{bordercolor="#00C03F",textbg="#000000",imagebg="#36812C",textimage="#36812C",fontcolor="#FFFFFF"}},
    {"Mugalo","Mugalo's Profile Picture.jpg","[[Community:Mugalo|Mugalo]].",{bordercolor="#68D5FF",textbg="#FF9FDF",imagebg="#68D5FF",textimage="#FF9FDF",fontcolor="#000000"}},
    {"CloneTrooper1019","CloneTrooper1019's Profile Picture.png","[[Community:CloneTrooper1019|CloneTrooper1019]].",{bordercolor="#A10000",textbg="#000000",imagebg="#A10000",textimage="#A10000",fontcolor="#FFFFFF"}},
    {"Whimy","Whimy's Profile Picture.png","[[Community:Whimy|Whimy]].",{bordercolor="#11FF00",textbg="#FFFFFF",imagebg="#FFFFFF",textimage="#000000",fontcolor="#000000"}},
    {"TypicalType","TypicalType's Profile Picture.jpg","[[Community:TypicalType|TypicalType]].",{bordercolor="#005E80",textbg="#52C1E9",imagebg="#005E80",textimage="#005E80",fontcolor="#000000"}},
    {"Stickmasterluke","Stickmasterluke's Profile Picture.png","[[Community:stickmasterluke|Stickmasterluke]].",{bordercolor="#FFFFFF",textbg="#006B20",imagebg="#000000",textimage="#000000",fontcolor="#FFFFFF"}},
    {"RickyTheFishy","RickyTheFishy's Profile Picture.jpg","[[Community:RickyTheFishy|RickyTheFishy]].",{bordercolor="#6A74FF",textbg="#2C3177",imagebg="#6A74FF",textimage="#6A74FF",fontcolor="#FFFFFF"}},
    {"PixelatedCandy","PixelatedCandy's Profile Picture.png","[[Community:PixelatedCandy|PixelatedCandy]].",{bordercolor="#00DCD1",textbg="#FF3AD8",imagebg="#00DCD1",textimage="#00DCD1",fontcolor="#000000"}},
    {"Remainings","Remainings' Profile Picture.jpg","[[Community:Remainings|Remainings]].",{bordercolor="#005D5D",textbg="#FFFFFF",imagebg="#005D5D",textimage="#005D5D",fontcolor="#000000"}},
    {"DenisDaily","Denis' Profile Picture.jpg","[[Community:DenisDaily|DenisDaily]].",{bordercolor="#00E1AD",textbg="#00BA8F",imagebg="#00E1AD",textimage="#00E1AD",fontcolor="#000000"}},
    {"DeeterPlays","DeeterPlays' Profile Picture.jpg","[[Community:DeeterPlays|DeeterPlays]].",{bordercolor="#FF0000",textbg="#FFFFFF",imagebg="#FF0000",textimage="#FF0000",fontcolor="#000000"}},
    {"TheMeganPlays","MeganPlays' Profile Picture.jpg","[[Community:TheMeganPlays|MeganPlays]].",{bordercolor="#FF0064",textbg="#FF5899",imagebg="#FFF68F",textimage="#FFF68F",fontcolor="#FFFFFF"}},
    {"StarCode_RealKreek","KreekCraft's Profile Picture.jpg","[[Community:StarCode_RealKreek|KreekCraft]].",{bordercolor="#EAD800",textbg="#0054B6",imagebg="#EAD800",textimage="#EAD800",fontcolor="#FFFFFF"}},
    {"fudsim","FUDZ's Profile Picture.jpg","[[Community:fudsim|FUDZ]].",{bordercolor="#1358CC",textbg="#30C245",imagebg="#1358CC",textimage="#1358CC",fontcolor="#000000"}},
    {"Funnehcake","ItsFunneh's Profile Picture.jpg","[[Community:Funnehcake|ItsFunneh]].",{bordercolor="#264CA3",textbg="#308EE9",imagebg="#264CA3",textimage="#264CA3",fontcolor="#FFFFFF"}},
    {"RussoTalks","RussoPlays' Profile Picture.jpg","[[Community:RussoTalks|RussoTalks]].",{bordercolor="#7FCDFF",textbg="#000000",imagebg="#7FCDFF",textimage="#7FCDFF",fontcolor="#FFFFFF"}},
    {"GPR3","Lonnie's Profile Picture.jpg","[[Community:GPR3|GPR3]].",{bordercolor="#CE2B00",textbg="#FF9762",imagebg="#CE2B00",textimage="#CE2B00",fontcolor="#000000"}},
    {"Berezaa","Berezaa's Profile Picture.png","[[Community:Berezaa|Berezaa]].",{bordercolor="#000000",textbg="#C5C5C5",imagebg="#797979",textimage="#797979",fontcolor="#000000"}},
    {"Beeism","Beeism's Profile Picture.jpg","[[Community:Beeism|Beeism]].",{bordercolor="#000000",textbg="#01D300",imagebg="#000000",textimage="#000000",fontcolor="#000000"}},
    {"Ripull","Ripull's Profile Picture.png","[[Community:Ripull|Ripull]].",{bordercolor="#01FF00",textbg="#019000",imagebg="#01FF00",textimage="#01FF00",fontcolor="#FFFFFF"}},
    {"Keisyo","Keisyo's Profile Picture.jpg","[[Community:Keisyo|Keisyo]].",{bordercolor="#CE598E",textbg="#FF9BC9",imagebg="#CE598E",textimage="#CE598E",fontcolor="#000000"}},
    {"Antilique","Antilique's Profile Picture.png","{{player link|Antilique}}.",{bordercolor="#FF5D5D",textbg="#3F3F3F",imagebg="#FF5D5D",textimage="#FF5D5D",fontcolor="#FFFFFF"}},
    {"NUTEST","NUTEST's Profile Picture.jpg","{{player link|NUTEST}}.",{bordercolor="#FF5D5D",textbg="#3F3F3F",imagebg="#FF5D5D",textimage="#FF5D5D",fontcolor="#FFFFFF"}},
    {"Kittzilla","Kittzilla's Profile Picture.jpg","{{player link|Kittzilla}}.",{bordercolor="#FC7200",textbg="#8D00C5",imagebg="#FC7200",textimage="#FC7200",fontcolor="#FFFFFF"}},
    {"EvilArtist","EvilArtist's Profile Picture.png","[[Community:EvilArtist|EvilArtist]]",{bordercolor="#00BEF9",textbg="#BC6BFF",imagebg="#00BEF9",textimage="#00BEF9",fontcolor="#000000"}},
    }
 
p.getData = function(name)
    for i,v in pairs(p.data) do
        if v[1]:lower() == name:lower() then
            return v
        end
    end
end
 
p.generateList = function(frame)
    local str = ""
    local addNewLine = false
    for i,v in pairs(p.data) do
        str = str .. (addNewLine == true and "\n" or "") .. "* {{Player link|" .. v[1] .. "}}"
        addNewLine = true
    end
    return frame:preprocess(str)
end
 
 
p.getImage = function(frame)
    local name = frame.args[1]
    local data = p.getData(name)
    if not data then
        return "fanof error: player '"..name.."' not found."
    end
    return "[[File:" .. data[2] .. "|55px|link=]]"
end
 
 
p.getText = function(frame)
    local name = frame.args[1]
    local data = p.getData(name)
    if not data then
        return "fanof error: player '"..name.."' not found."
    end
    return "This user is a fan of " .. data[3]
end
 
p.getExtraParameters = function(frame)
    local name = frame.args[1]
    local data = p.getData(name)
    if not data then
        return "fanof error: player '"..name.."' not found."
    end
    local s = ""
    local addNewLine = false
    for i,v in pairs(data[4]) do
        s = s .. (addNewLine == true and "\n" or "") .. "|" .. i .. "=" .. v
        addNewLine = true
    end
    return s
end
 
p.constructUserbox = function(frame)
    local name = frame.args[1]
    local str = "{{Userbox"
    local data = p.getData(name)
    if not data then
        return frame:preprocess("{{Userbox|bordercolor=black|textimage=black|image=|text=}}")
    end
    str = str .. "|image=[[File: " .. data[2] .. "|55px|link=]]|text=This user is a fan of " .. data[3]
    for i,v in pairs(data[4]) do
        str = str .. "|" .. i .. "=" .. v
    end
    str = str .. "}}"
    return frame:preprocess(str)
end
 
 
 
return p
Community content is available under CC-BY-SA unless otherwise noted.