Module:Infobox live show: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 168: Line 168:
local lat = frame:getParent().args.lat or ''
local lat = frame:getParent().args.lat or ''
local lng = frame:getParent().args.lng or ''
local lng = frame:getParent().args.lng or ''
if lat == '' and lng == '' then
local coords = mw.text.split( info['coords'] or frame:getParent().args.coords or '', ',' )
lat = mw.text.trim(coords[1] or '')
lng = mw.text.trim(coords[2] or '')
end
local location = frame:getParent().args.location or info['location'] or ''
local location = frame:getParent().args.location or info['location'] or ''
local venue_type = frame:getParent().args.venue_type or info['type'] or ''
local venue_type = frame:getParent().args.venue_type or info['type'] or ''
Line 176: Line 181:


frame.args.above = frame:getParent().args.name or (dateStr .. ' – ' .. location)
frame.args.above = frame:getParent().args.name or (dateStr .. ' – ' .. location)
if info ~= '' and info['coords'] ~= nil then
local coords = mw.text.split( info['coords'], ',' )
lat = coords[1]
lng = coords[2]
end


if lat ~= '' and lng ~= '' then
if lat ~= '' and lng ~= '' then