Module:Guidance: Difference between revisions

Jump to navigation Jump to search
no edit summary
imported>Pingu
No edit summary
imported>Pingu
No edit summary
Line 97: Line 97:
-- Function for the smaller "guidance detail" notices (under testing)
-- Function for the smaller "guidance detail" notices (under testing)
function p.small(frame)
function p.small(frame)
-- Banners
bd = "none"
b = {
frame:expandTemplate{title="ambox",args={
small = "left",
type  = "style",
nocat = "yes",
image = "[[File:Breathe-audio-volume-high.svg|20px]]",
style = "margin:auto;max-width:480px;width:inherit",
text  = "The video of this logo '''may be too loud''' or severely distorted."
}},
frame:expandTemplate{title="ambox",args={
small = "left",
type  = "style",
nocat = "yes",
image = "[[File:Tango_Phone.svg|x20px]]",
style = "margin:auto;max-width:480px;width:inherit",
text  = "This logo '''contains an old telephone number'''. Please do not try to dial it."
}},
}
-- Text
for i = ri,1,-1 do
for i = ri,1,-1 do
if string.find(frame.args[1],r[i][1]) and r[i][4] == 1 then
if string.find(frame.args[1],r[i][1]) and r[i][4] == 1 then
Line 115: Line 136:
end
end
end
end
td = "'''"..r[i][3].."''' at "..ts
td = r[i][3].."''' at "..ts
else
else
td = "'''"..r[i][3].."''' for the whole duration"
td = r[i][3].."''' for the whole duration"
end
end
if rd == nil then
if rd == nil then
rd = td
rd = td
elseif string.find(rd,", and ") then
elseif string.find(rd,", and ") then
rd = td..", "..rd
rd = td..", '''"..rd
else
else
rd = td..", and "..rd
rd = td..", and '''"..rd
end
end
end
end
if rd ~= nil then
rd = frame:expandTemplate{title="ambox",args={
small = "left",
type  = "content",
nocat = "yes",
style = "background:#FFE7CE;margin:auto;max-width:480px;width:inherit",
text  = "This logo '''contains "..rd.."."}}
end
if string.find(frame.args[1],"audio") then
if rd ~= nil then
rd = rd..b[1]
else
rd = b[1]
end
end
if string.find(frame.args[1],"phone") then
if rd ~= nil then
rd = rd..b[2]
else
rd = b[2]
end
end
end
end
return rd
return rd
end
end
return p
return p
Anonymous user

Navigation menu