Modul:Football box: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan |
Tidak ada ringkasan suntingan |
||
Baris 10:
local asdet = '[[:en:Sudden death (sport)#Association football|p.w.s.d.]]'
local agget = '[[Perpanjangan waktu (sepak bola)|p.w.]]/[[Gol emas|g.e.]]'
local asget = '[[Perpanjangan waktu (sepak bola)|p.w.]]/[[
local attendance = 'Penonton:'
local referee = 'Wasit:'
Baris 86:
end
return nil
end
local function makeanchor(s)
s = mw.ustring.gsub(s, '%[%[[Ff][Ii][Ll][Ee]:[^%[%]]*%]%]', '')
s = mw.ustring.gsub(s, '<[Ss][Pp][Aa][Nn][^<>]*>', '')
s = mw.ustring.gsub(s, '</[Ss][Pp][Aa][Nn][^<>]*>', '')
s = mw.ustring.gsub(s, '[\'"]', '')
s = mw.ustring.gsub(s, '%s* %s*', ' ')
s = mw.ustring.gsub(s, '%[%[[^%[%]%|]*%|([^%[%]]*)%]%]', '%1')
s = mw.ustring.gsub(s, '%[%[([^%[%]]*)%]%]', '%1')
s = mw.ustring.gsub(s, '\127[^\127]*UNIQ%-%-[^\127]*%-%x+%-QINU[^\127]*\127', '')
s = mw.ustring.gsub(s, '<[Ss][Uu][Pp]>[^<>]*</[Ss][Uu][Pp]>', '')
s = mw.ustring.gsub(s, '%s%s*', ' ')
return s
end
local function checkTitle()
local pageTitle = mw.title.getCurrentTitle().text
local titlePhrases = {
"babak grup", "babak penyisihan grup", "fase grup", "babak gugur", "fase gugur", "babak final", "fase final", "putaran final", "babak liga", "fase liga",
"babak", "putaran", "kualifikasi", "play-off", "babak perebutan tempat", "perebutan tempat", "Liga Negara", "Liga Negara-Negara"
}
for _, phrase in ipairs(titlePhrases) do
if mw.ustring.match(mw.ustring.lower(pageTitle), phrase) then
return true
end
end
return false
end
Baris 129 ⟶ 159:
end
-- Hasilkan jangkar
if id and id == 'event' and args['event'] then
id = makeanchor(args['event'])
end
if (id and id == 'auto') or (not id and checkTitle()) then
id = makeanchor((args['team1'] or 'Team 1') .. ' v ' .. (args['team2'] or 'Team 2'))
end
-- Kotak mulai
local root =
|