Module:Sandbox/ChaoticShadow/InfoboxBuilder: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 135:
error("name cannot be duplicaate")
end
if type(v.func) ~= 'function' and
type(v.func) ~= 'table' and
type(v.func) ~= 'string'
then
error("func must be of type \"function\", \"table\", or \"string\"")
end
self.params[v.name] = {
Line 193 ⟶ 187:
elseif argparams['type'] == 'table' then
content = self.params[param].func[arg]
else
elseif argparams['type'] == 'string' then
content = arg
end
Line 354 ⟶ 348:
local links = {
"[[Template:%s|<span style=\"color: %s;\">View</span>]]",
"[[Template talk:%s|<span style=\"color: %s;\">Talk</span>]]"
}
self:addHeader{
tag = 'th',
content = string.format(links[1], self.name) ..
string.format(links[21], self.name, self.headerColors.text)
.. " &bull; " ..
string.format(links[2], self.name)
string.format(links[2], self.name, self.headerColors.text)
}
end
439

edits