Content deleted Content added
change HTML to use <ul> and <li> to show semantics of portal list |
add puzzle piece tracking |
||
Line 99:
end
end
local function getImageName(s)
-- Gets the image name for a given string.
▲ local default = 'Portal-puzzle.svg|link=|alt='
if type(s) ~= 'string' or #s < 1 then
return
end
s = mw.ustring.lower(s)
return matchImagePage(s) or matchImagePage(getAlias(s)) or
end
Line 236 ⟶ 237:
local contents = {}
-- Display the portals specified in the positional arguments.
local defaultUsed = false
for _, portal in ipairs(portals) do
if portalImage == defaultImage then
defaultUsed = true
end
local image = string.format('[[File:%s|32x28px|class=noviewer]]',
portalImage)
▲ getImageName(portal))
local link = string.format('[[Portal:%s|%s%sportal]]',
portal, portal, args.addBreak and '<br />' or ' ')
table.insert(contents, {image, link})
end
if defaultUsed and checkTracking() then
root:wikitext('[[Category:Portal templates with default image]]')
end
return tostring(fillBox(root, contents))
|