Modül:Voleybol maç sonuçları
Görünüm
Kullanımı
[kaynağı değiştir]Bir voleybol organizasyonunda maç sonuçlarından puan durumunu hesaplar. İlgili turnuvanın [[Şablon:{turnuvaadı} maçları/maçlar]] şeklinde şablonu olmalı ve maç içerikleri aşağıdaki örnekteki gibi girilmelidir. Örnek şablon incelenebilir.
|W1-FRA-TUR =
{{vb res 51
| takım1 = {{vbk-sğ|FRA}}
| takım2 = {{vbk|TUR}}
| tarih = 4 Haziran
| zaman = 06.30
| sonuç = 1-3
| set1 = 17-25
| set2 = 25-23
| set3 = 13-25
| set4 = 14-25
| set5 =
| rapor = [https://www.fivb.org/vis2009/getdocument.asmx?no=256750530 P2] [https://en.volleyballworld.com/volleyball/competitions/volleyball-nations-league/schedule/21553?match=France-vs-T%c3%bcrkiye Rapor]
| bc =
}}
Puan durumu örnek
[kaynağı değiştir]{{#invoke:Voleybol maç sonuçları|standings|2025 FIVB Kadınlar Voleybol Milletler Ligi|teamFinalist=POL
|update=future|start_date=4 Haziran 2024
|res_col_header=Q
|startQ1=1|finishQ1=9|textQ1=[[#Final turu 3|Final turu]]|colorQ1=#ccffcc
|source=[https://en.volleyballworld.com/volleyball/competitions/volleyball-nations-league/standings/women/ VNL 2025 - Kadınlar sıralaması]
|class_rules = [[#Grup sıralama prosedürü|Kurallar]]
}}
Puan durumu sonuç:
| Maçlar | Puan | Setler | Puanlar | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sıra | Takım | O | G | M | A | V | SO | ASP | VSP | SPO | Eleme | |
| 1 | 12 | 12 | 0 | 33 | 36 | 7 | 5,143 | 1037 | 822 | 1,262 | Final turu | |
| 2 | 12 | 11 | 1 | 31 | 33 | 11 | 3,000 | 1051 | 906 | 1,160 | ||
| 3 | 12 | 9 | 3 | 27 | 30 | 12 | 2,500 | 966 | 858 | 1,126 | ||
| 4 | 12 | 9 | 3 | 27 | 31 | 15 | 2,067 | 1067 | 957 | 1,115 | Final turu | |
| 5 | 12 | 9 | 3 | 24 | 30 | 20 | 1,500 | 1142 | 1059 | 1,078 | Final turu | |
| 6 | 12 | 8 | 4 | 23 | 28 | 17 | 1,647 | 1025 | 927 | 1,106 | ||
| 7 | 12 | 7 | 5 | 23 | 29 | 22 | 1,318 | 1110 | 1092 | 1,016 | ||
| 8 | 12 | 7 | 5 | 20 | 26 | 23 | 1,130 | 1084 | 1085 | 0,999 | ||
| 9 | 12 | 5 | 7 | 17 | 23 | 25 | 0,920 | 1010 | 1042 | 0,969 | ||
| 10 | 12 | 5 | 7 | 15 | 19 | 27 | 0,704 | 972 | 1029 | 0,945 | ||
| 11 | 12 | 5 | 7 | 14 | 21 | 26 | 0,808 | 1032 | 1046 | 0,987 | ||
| 12 | 12 | 5 | 7 | 13 | 20 | 27 | 0,741 | 1028 | 1071 | 0,960 | ||
| 13 | 12 | 4 | 8 | 11 | 19 | 31 | 0,613 | 1001 | 1142 | 0,877 | ||
| 14 | 12 | 4 | 8 | 11 | 15 | 29 | 0,517 | 931 | 1029 | 0,905 | ||
| 15 | 12 | 3 | 9 | 14 | 21 | 28 | 0,750 | 1043 | 1068 | 0,977 | ||
| 16 | 12 | 3 | 9 | 10 | 19 | 33 | 0,576 | 1099 | 1157 | 0,950 | ||
| 17 | 12 | 1 | 11 | 6 | 11 | 34 | 0,324 | 948 | 1059 | 0,895 | ||
| 18 | 12 | 1 | 11 | 5 | 11 | 35 | 0,314 | 877 | 1074 | 0,817 | ||
14 Temmuz tarihine kadar oynanan maçlara göre güncellenmiştir. Kaynak: VNL 2025 - Kadınlar sıralaması
Sıralama kuralları: Kurallar
Notlar:
Sıralama kuralları: Kurallar
Notlar:
- ^ Finallere ev sahibi olarak katılmaya hak kazandı
Puan durumu örnek 2
[kaynağı değiştir]{{#invoke:Voleybol maç sonuçları|standings|2025 Dünya Kadınlar Voleybol Şampiyonası|teamFinalist=
|update=future|start_date=4 Haziran 2024
|res_col_header=Q
|Round=PA
|startQ1=1|finishQ1=3|textQ1=[[#Final turu 3|Final turu]]|colorQ1=#ccffcc
|source=[https://en.volleyballworld.com/volleyball/competitions/women-world-championship/standings/ WCH 2025 - Kadınlar sıralaması]
|class_rules = [[#Grup sıralama prosedürü|Kurallar]]
}}
Puan durumu sonuç 2:
| Maçlar | Puan | Setler | Puanlar | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sıra | Takım | O | G | M | A | V | SO | ASP | VSP | SPO | Eleme | |
| 1 | 3 | 3 | 0 | 7 | 9 | 4 | 2,250 | 298 | 225 | 1,324 | Final turu | |
| 2 | 3 | 2 | 1 | 7 | 8 | 4 | 2,000 | 264 | 238 | 1,109 | ||
| 3 | 3 | 1 | 2 | 4 | 5 | 7 | 0,714 | 254 | 268 | 0,948 | ||
| 4 | 3 | 0 | 3 | 0 | 2 | 9 | 0,222 | 189 | 274 | 0,690 | ||
26 Ağustos tarihine kadar oynanan maçlara göre güncellenmiştir. Kaynak: WCH 2025 - Kadınlar sıralaması
Sıralama kuralları: Kurallar
Sıralama kuralları: Kurallar
Puan durumu parametreler
[kaynağı değiştir]{{#invoke:Voleybol maç sonuçları|standings|{turnuva adı}|teamFinalist={finalistTakım}
|Round={Grup}
}}
Maçlar örnek
[kaynağı değiştir]Gruba göre maçları getirir.
{{#invoke:Voleybol maç sonuçları|matches|2025 Dünya Erkekler Voleybol Şampiyonası|Round=PC}}
Maçlar sonuç:
| Tarih | Saat | Skor | 1. Set | 2. Set | 3. Set | 4. Set | 5. Set | Toplam | Rapor | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 14 Eylül | 05.30 | Arjantin |
3-2 | 19-25 | 18-25 | 25-22 | 25-22 | 15-11 | 102–105 | Rapor | |
| 14 Eylül | 13.00 | Fransa |
3-0 | 25-12 | 25-18 | 25-16 | 75–46 | Rapor | |||
| 16 Eylül | 05.30 | Arjantin |
3-1 | 25-22 | 23-25 | 25-21 | 25-18 | 98–86 | Rapor | ||
| 16 Eylül | 13.00 | Fransa |
2-3 | 19-25 | 25-17 | 27-29 | 25-21 | 9-15 | 105–107 | Rapor | |
| 18 Eylül | 05.30 | Finlandiya |
3-1 | 25-18 | 25-23 | 17-25 | 25-21 | 92–87 | Rapor | ||
| 18 Eylül | 13.00 | Fransa |
2-3 | 26-28 | 23-25 | 25-21 | 25-20 | 12-15 | 111–109 | Rapor |
Maçlar örnek 2
[kaynağı değiştir]Takıma göre maçları getirir.
{{#invoke:Voleybol maç sonuçları|matches|2025 FIVB Kadınlar Voleybol Milletler Ligi|TUR}}
Maçlar sonuç 2:
| Tarih | Saat | Skor | 1. Set | 2. Set | 3. Set | 4. Set | 5. Set | Toplam | Rapor | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 Haziran | 06.30 | Fransa |
1-3 | 17-25 | 25-23 | 13-25 | 14-25 | 69–98 | P2 Rapor | ||
| 6 Haziran | 14.30 | Türkiye |
3-0 | 25-23 | 25-14 | 25-22 | 75–59 | P2 Rapor | |||
| 7 Haziran | 10.00 | Türkiye |
3-2 | 25-21 | 18-25 | 25-23 | 22-25 | 15-7 | 105–101 | P2 Rapor | |
| 8 Haziran | 14.30 | Çin |
2-3 | 25-19 | 20-25 | 31-29 | 26-28 | 12-15 | 114–116 | P2 Rapor | |
| 18 Haziran | 19.30 | Dominik Cumhuriyeti |
0-3 | 25-27 | 19-25 | 26-28 | 70–80 | P2 Rapor | |||
| 19 Haziran | 19.30 | Kanada |
0-3 | 16-25 | 18-25 | 24-26 | 58–76 | P2 Rapor | |||
| 21 Haziran | 19.30 | Güney Kore |
0-3 | 11-25 | 13-25 | 17-25 | 41–75 | P2 Rapor | |||
| 22 Haziran | 19.30 | Türkiye |
1-3 | 18-25 | 25-23 | 23-25 | 15-25 | 81–98 | P2 Rapor | ||
| 9 Temmuz | 21.30 | Hollanda |
0-3 | 19-25 | 16-25 | 21-25 | 56–75 | P2 Rapor | |||
| 11 Temmuz | 21.30 | Çekya |
3-1 | 25-22 | 25-21 | 4-25 | 25-20 | 79–88 | P2 Rapor | ||
| 12 Temmuz | 20.00 | Türkiye |
2-3 | 19-25 | 25-21 | 25-21 | 20-25 | 11-15 | 100–107 | P2 Rapor | |
| 13 Temmuz | 21.00 | Sırbistan |
3-0 | 25-18 | 25-20 | 25-18 | 75–56 | P2 Rapor | |||
| 24 Temmuz | 17.30 | Japonya |
3-2 | 25-21 | 16-25 | 25-20 | 22-25 | 15-9 | 103–100 | P2 Rapor |
Maçlar parametreler
[kaynağı değiştir]{{#invoke:Voleybol maç sonuçları|matches|{turnuva adı}|{takım kodu}|Round={Grup}}}
local p = {}
function p.standings(frame)
local args = frame.args
local league = frame.args[1]
local gender=''
local teamFinalist = frame.args['teamFinalist']
local groupPosition = tonumber(frame.args['groupPosition'])
if league then
local leagueLower = mw.ustring.lower(league)
if mw.ustring.find(leagueLower, "erkekler") then
gender = "vb"
elseif mw.ustring.find(leagueLower, "kadınlar") then
gender = "vbk"
end
end
local function getQualificationRules()
local rules = {}
local i = 1
while true do
local start = frame.args['startQ' .. i]
local finish = frame.args['finishQ' .. i]
local text = frame.args['textQ' .. i]
local color =frame.args['colorQ'..i]
if start or finish or text then
table.insert(rules, {
start = tonumber(start),
finish = tonumber(finish),
text = text or "",
color=color or "",
name="Q"..i
})
i = i + 1
else
break
end
end
return rules
end
local qualificationRules = getQualificationRules()
local results = {}
local teams = {}
local filterRound=frame.args['Round'] or ''
local groupTeams = {}
local pattern = "|(..)-(...)-(...)%s*=%s*\n{{vb res %d+\n|%s*takım1%s*=%s*{{(vb[^}]*)}}%s*\n|%s*takım2%s*=%s*{{(vb[^}]*)}}%s*\n|%s*tarih%s*=%s*([^\n]*)\n|%s*zaman%s*=%s*([^\n]*)\n|%s*sonuç%s*=%s*([^\n]*)\n|%s*set1%s*=%s*([^\n]*)\n|%s*set2%s*=%s*([^\n]*)\n|%s*set3%s*=%s*([^\n]*)\n|%s*set4%s*=%s*([^\n]*)\n|%s*set5%s*=%s*([^\n]*)" local templateName = "Şablon:"..league.." maçları/maçlar"
local templatePage = mw.title.new(templateName)
local content = templatePage:getContent()
local lastMatchPlayed=nil
local function initTeam(teamCode)
if not teams[teamCode] then
teams[teamCode] = {
name = teamCode,
matches = 0,
wins = 0,
losses = 0,
points = 0,
setsWon = 0,
setsLost = 0,
pointsWon = 0,
pointsLost = 0,
s3Win = 0,
s4Win = 0,
s5Win = 0,
s3Lose = 0,
s4Lose = 0,
s5Lose = 0,
sr = 0,
pr = 0
}
end
end
-- Tüm maçları işle
for round, team1, team2, t1, t2, date, time, result, s1, s2, s3, s4, s5 in mw.ustring.gmatch(content, pattern) do
if filterRound == '' or round == filterRound then
if not groupTeams[round] then
groupTeams[round] = {}
end
-- Takımları grup listesine ekle (tekrar etmesinler diye kontrol et)
local team1Found = false
local team2Found = false
for _, existingTeam in ipairs(groupTeams[round]) do
if existingTeam == team1 then team1Found = true end
if existingTeam == team2 then team2Found = true end
end
if not team1Found then
table.insert(groupTeams[round], team1)
end
if not team2Found then
table.insert(groupTeams[round], team2)
end
initTeam(team1)
initTeam(team2)
if result ~="-" then
lastMatchPlayed=date
teams[team1].matches = teams[team1].matches + 1
teams[team2].matches = teams[team2].matches + 1
local sets = {s1, s2, s3, s4, s5}
local team1Sets = 0
local team2Sets = 0
-- Set skorlarını hesapla
for _, set in ipairs(sets) do
if set and set ~= "" and mw.ustring.sub(set, 1, 1) ~= "|" then
local t1Score, t2Score = set:match("(%d+)-(%d+)")
if t1Score and t2Score then
t1Score = tonumber(t1Score)
t2Score = tonumber(t2Score)
-- Puan toplamları
teams[team1].pointsWon = teams[team1].pointsWon + t1Score
teams[team1].pointsLost = teams[team1].pointsLost + t2Score
teams[team2].pointsWon = teams[team2].pointsWon + t2Score
teams[team2].pointsLost = teams[team2].pointsLost + t1Score
-- Set kazananı
if t1Score > t2Score then
team1Sets = team1Sets + 1
teams[team1].setsWon = teams[team1].setsWon + 1
teams[team2].setsLost = teams[team2].setsLost + 1
else
team2Sets = team2Sets + 1
teams[team2].setsWon = teams[team2].setsWon + 1
teams[team1].setsLost = teams[team1].setsLost + 1
end
end
end
end
-- Maç sonucunu belirle ve puan ver
if team1Sets > team2Sets then
teams[team1].wins = teams[team1].wins + 1
teams[team2].losses = teams[team2].losses + 1
if team1Sets == 3 and team2Sets == 0 then
teams[team1].s3Win = teams[team1].s3Win + 1
teams[team2].s3Lose = teams[team2].s3Lose + 1
elseif team1Sets == 3 and team2Sets == 1 then
teams[team1].s4Win = teams[team1].s4Win + 1
teams[team2].s4Lose = teams[team2].s4Lose + 1
elseif team1Sets == 3 and team2Sets == 2 then
teams[team1].s5Win = teams[team1].s5Win + 1
teams[team2].s5Lose = teams[team2].s5Lose + 1
end
else
teams[team2].wins = teams[team2].wins + 1
teams[team1].losses = teams[team1].losses + 1
if team2Sets == 3 and team1Sets == 0 then
teams[team2].s3Win = teams[team2].s3Win + 1
teams[team1].s3Lose = teams[team1].s3Lose + 1
elseif team2Sets == 3 and team1Sets == 1 then
teams[team2].s4Win = teams[team2].s4Win + 1
teams[team1].s4Lose = teams[team1].s4Lose + 1
elseif team2Sets == 3 and team1Sets == 2 then
teams[team2].s5Win = teams[team2].s5Win + 1
teams[team1].s5Lose = teams[team1].s5Lose + 1
end
end
end
end
end
-- Tüm maçlar işlendikten SONRA her takım için hesaplamaları yap
for teamCode, team in pairs(teams) do
-- Puan hesaplama: (s3Win + s4Win) * 3 + s5Win * 2 + s5Lose
teams[teamCode].points = (team.s3Win + team.s4Win) * 3 + team.s5Win * 2 + team.s5Lose
-- SR hesaplama: setsWon / setsLost
if team.setsLost > 0 then
teams[teamCode].sr = team.setsWon / team.setsLost
teams[teamCode].sr = math.floor(teams[teamCode].sr * 1000) / 1000
else
teams[teamCode].sr = team.setsWon
end
mw.log(teamCode..' '..teams[teamCode].sr)
-- PR hesaplama: pointsWon / pointsLost
if team.pointsLost > 0 then
teams[teamCode].pr = team.pointsWon / team.pointsLost
teams[teamCode].pr = math.floor(teams[teamCode].pr * 1000) / 1000
else
teams[teamCode].pr = team.pointsWon
end
end
local groupRankings = {} -- groupRankings[round][position] = team
for round, teamList in pairs(groupTeams) do
local groupSorted = {}
for _, teamCode in ipairs(teamList) do
if teams[teamCode] then
table.insert(groupSorted, {code = teamCode, data = teams[teamCode]})
end
end
-- Bu grubu sırala
table.sort(groupSorted, function(a, b)
-- Önce galibiyet sayısına göre sırala (fazla olan üstte)
if a.data.wins ~= b.data.wins then
return a.data.wins > b.data.wins
end
-- Galibiyetler eşitse, puana göre sırala (fazla olan üstte)
if a.data.points ~= b.data.points then
return a.data.points > b.data.points
end
-- Puanlar eşitse, set oranına göre sırala (yüksek olan üstte)
local a_sr_is_max = (a.data.setsLost == 0)
local b_sr_is_max = (b.data.setsLost == 0)
if a_sr_is_max and not b_sr_is_max then
return true
elseif not a_sr_is_max and b_sr_is_max then
return false
elseif a_sr_is_max and b_sr_is_max then
-- İkisi de MAX ise, diğer kriterlere geç
else
-- İkisi de normal değer ise, büyük olan üstte
if math.abs(a.data.sr - b.data.sr) > 0.001 then
return a.data.sr > b.data.sr
end
end
-- Set oranları eşitse, puan oranına göre sırala (yüksek olan üstte)
if math.abs(a.data.pr - b.data.pr) > 0.001 then
return a.data.pr > b.data.pr
end
-- Hepsi eşitse takım koduna göre alfabetik sırala
return a.code < b.code
end)
groupRankings[round] = groupSorted
end
-- YENİ: Eğer groupPosition belirtilmişse, her gruptan o pozisyondaki takımları al
local finalTeams = {}
local teamGroups = {}
if groupPosition and groupPosition > 0 then
-- Her gruptan belirtilen pozisyondaki takımı al
for round, ranking in pairs(groupRankings) do
if ranking[groupPosition] then
local team = ranking[groupPosition]
table.insert(finalTeams, team)
-- Grup bilgisini sakla (round'dan grup harfini çıkar)
local groupLetter = mw.ustring.match(round, "(.)$")
teamGroups[team.code] = groupLetter
end
end
-- Bu takımları kendi aralarında tekrar sırala
table.sort(finalTeams, function(a, b)
if a.data.wins ~= b.data.wins then
return a.data.wins > b.data.wins
end
if a.data.points ~= b.data.points then
return a.data.points > b.data.points
end
local a_sr_is_max = (a.data.setsLost == 0)
local b_sr_is_max = (b.data.setsLost == 0)
if a_sr_is_max and not b_sr_is_max then
return true
elseif not a_sr_is_max and b_sr_is_max then
return false
elseif not a_sr_is_max and not b_sr_is_max then
if math.abs(a.data.sr - b.data.sr) > 0.001 then
return a.data.sr > b.data.sr
end
end
if math.abs(a.data.pr - b.data.pr) > 0.001 then
return a.data.pr > b.data.pr
end
return a.code < b.code
end)
else
-- Normal sıralama (tüm takımlar)
for teamCode, team in pairs(teams) do
table.insert(finalTeams, {code = teamCode, data = team})
end
table.sort(finalTeams, function(a, b)
if a.data.wins ~= b.data.wins then
return a.data.wins > b.data.wins
end
if a.data.points ~= b.data.points then
return a.data.points > b.data.points
end
local a_sr_is_max = (a.data.setsLost == 0)
local b_sr_is_max = (b.data.setsLost == 0)
if a_sr_is_max and not b_sr_is_max then
return true
elseif not a_sr_is_max and b_sr_is_max then
return false
elseif not a_sr_is_max and not b_sr_is_max then
if math.abs(a.data.sr - b.data.sr) > 0.001 then
return a.data.sr > b.data.sr
end
end
if math.abs(a.data.pr - b.data.pr) > 0.001 then
return a.data.pr > b.data.pr
end
return a.code < b.code
end)
end
local output = {}
table.insert(output,'{{#invoke:Spor tablosu|main|style=Voleybol')
-- Team order satırı
local teamOrder = {}
for _, team in ipairs(finalTeams) do
table.insert(teamOrder, team.code)
end
table.insert(output, "|team_order=" .. table.concat(teamOrder, ", "))
table.insert(output, "")
-- Name satırları
for _, team in ipairs(finalTeams) do
local teamCode = team.code
local nameStr = ""
if teamCode == teamFinalist then
nameStr = "|name_" .. teamCode .. "={{"..gender.."|" .. teamCode .. "}} |note_" .. teamCode .. "=Finallere ev sahibi olarak katılmaya hak kazandı"
else
nameStr = "|name_" .. teamCode .. "={{"..gender.."|" .. teamCode .. "}}"
end
-- Grup bilgisini ekle (eğer groupPosition belirtilmişse)
if groupPosition and groupPosition > 0 and teamGroups[teamCode] then
nameStr = nameStr .. " |group_" .. teamCode .. "=[[#Grup " .. teamGroups[teamCode] .. "|" .. teamGroups[teamCode] .. "]]"
end
table.insert(output, nameStr .. "\n")
table.insert(output,"|win3s_"..teamCode.."="..team.data.s3Win.." |win4s_"..teamCode.."="..team.data.s4Win.." |win5s_"..teamCode.."="..team.data.s5Win.." |loss5s_"..teamCode.."="..team.data.s5Lose.." |loss4s_"..teamCode.."="..team.data.s4Lose.." |loss3s_"..teamCode.."="..team.data.s3Lose.." |spw_"..teamCode.."="..team.data.pointsWon.." |spl_"..teamCode.."="..team.data.pointsLost.."\n")
end
local positionFinalist=0
for i, team in ipairs(finalTeams) do
if teamFinalist~=nil then
if teamFinalist==team.code then
positionFinalist=i
break
end
end
end
for _, rule in ipairs(qualificationRules) do
table.insert(output,'|col_'..rule.name..'='..rule.color..'|text_'..rule.name..'='..rule.text)
if positionFinalist>rule.finish then
--eğer finalist takım zaten kontenjan alamadıysa bir kontenjan azalt
rule.finish=rule.finish-1
end
for i= rule.start, rule.finish-1 do
table.insert(output,'|result'..i..'='..rule.name)
end
end
if teamFinalist~=nil and qualificationRules[1]~=nil then
table.insert(output,'|col_QH=#87ceeb|text_QH='..qualificationRules[1].text)
table.insert(output,'|result'..positionFinalist..'=QH')
end
local allowedParams = {
'res_col_header', 'update', 'start_date', 'source','class_rules'
}
for _, param in ipairs(allowedParams) do
if args[param] and mw.text.trim(args[param]) ~= '' then
table.insert(output, '|' .. param .. '=' .. args[param])
end
end
if groupPosition and groupPosition > 0 then
table.insert(output, '|show_groups=yes')
table.insert(output, '|group_header=Pool')
end
if lastMatchPlayed~=nil then
table.insert(output,'|update='..lastMatchPlayed)
end
table.insert(output,'}}')
return mw.text.trim(frame:preprocess(table.concat(output,"\n")))
end
function p.matches(frame)
local league = frame.args[1]
local team=frame.args[2] or ''
local filterRound=frame.args['Round'] or ''
local pattern =
"|([^|-]+)-(...)-(...)%s*=%s*\n{{vb res %d+\n|%s*takım1%s*=%s*{{(vb[^}]*)}}%s*\n|%s*takım2%s*=%s*{{(vb[^}]*)}}%s*\n|%s*tarih%s*=%s*([^\n]*)\n|%s*zaman%s*=%s*([^\n]*)\n|%s*sonuç%s*=%s*([^\n]*)\n|%s*set1%s*=%s*([^\n]*)\n|%s*set2%s*=%s*([^\n]*)\n|%s*set3%s*=%s*([^\n]*)\n|%s*set4%s*=%s*([^\n]*)\n|%s*set5%s*=%s*([^\n]*)"
local templateName = "Şablon:" .. league .. " maçları/maçlar"
local templatePage = mw.title.new(templateName)
local content = templatePage:getContent()
local results={}
table.insert(results, "<div style='overflow-x: auto; white-space: nowrap;'>\n{{Vb res start 5}}")
for round, team1, team2, t1, t2, date, time, result, s1, s2, s3, s4, s5 in mw.ustring.gmatch(content, pattern) do
mw.log(round)
if (filterRound == '' or round == filterRound) and
(team == '' or team1 == team or team2 == team) then
local pattern2 = "(%d+)%s*-%s*(%d+)"
local matchResult=''
for num1, num2 in mw.ustring.gmatch(result, pattern2) do
if result == '-' then
matchResult = " "
end
if team == team1 then
matchResult = (num1 > num2 and "G") or (num1 < num2 and "M") or "B"
elseif team == team2 then
matchResult = (num1 > num2 and "M") or (num1 < num2 and "G") or "B"
end
end
table.insert(results, "{{" .. league .. " maçları|" .. round .. '-' .. team1 .. "-" .. team2 .. "|" .. matchResult .. "}}")
end
end
table.insert(results, "{{end}}")
return mw.text.trim(frame:preprocess(table.concat(results, "\n")))
end
return p