https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ASports_table%2FBadminton_team
Modul:Sports table/Badminton team - Versionsgeschichte
2025-04-24T12:05:05Z
Versionsgeschichte dieser Seite in Wikipedia
MediaWiki 1.44.0-wmf.25
https://de.wikipedia.org/w/index.php?title=Modul:Sports_table/Badminton_team&diff=248769270&oldid=prev
Antonsusi am 20. September 2024 um 23:53 Uhr
2024-09-20T23:53:03Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="de">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 21. September 2024, 01:53 Uhr</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Zeile 193:</td>
<td colspan="2" class="diff-lineno">Zeile 193:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Sub-module usage</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Sub-module usage</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local mm = require('Module:Math')</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local mm = require('Module:<ins style="font-weight: bold; text-decoration: none;">Sports table/</ins>Math')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local yesno = require('Module:Yesno')</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local yesno = require('Module:Yesno')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td>
</tr>
</table>
Antonsusi
https://de.wikipedia.org/w/index.php?title=Modul:Sports_table/Badminton_team&diff=218567402&oldid=prev
Florentyna: AZ: Die Seite wurde neu angelegt: -- Style for football tables local pp = {} function pp.header(t,Args,p_sub,pos_label,group_col,VTE_text,full_table,results_header_txt) -- Load relevant modules local yesno = require('Module:Yesno') -- Create table header -- Pre stuff local team_width = Args['teamwidth'] or '165' local sort_text = '' local sort_table_val = Args['sortable_table'] or 'no' if yesno(sort_table_val) then sort_…
2021-12-28T13:45:11Z
<p><a href="/wiki/Hilfe:Zusammenfassung_und_Quellen#Auto-Zusammenfassung" title="Hilfe:Zusammenfassung und Quellen">AZ</a>: Die Seite wurde neu angelegt: -- Style for football tables local pp = {} function pp.header(t,Args,p_sub,pos_label,group_col,VTE_text,full_table,results_header_txt) -- Load relevant modules local yesno = require('Module:Yesno') -- Create table header -- Pre stuff local team_width = Args['teamwidth'] or '165' local sort_text = '' local sort_table_val = Args['sortable_table'] or 'no' if yesno(sort_table_val) then sort_…</p>
<p><b>Neue Seite</b></p><div>-- Style for football tables<br />
local pp = {}<br />
<br />
function pp.header(t,Args,p_sub,pos_label,group_col,VTE_text,full_table,results_header_txt)<br />
-- Load relevant modules<br />
local yesno = require('Module:Yesno')<br />
<br />
-- Create table header<br />
-- Pre stuff<br />
local team_width = Args['teamwidth'] or '165'<br />
local sort_text = ''<br />
local sort_table_val = Args['sortable_table'] or 'no'<br />
if yesno(sort_table_val) then sort_text = 'sortable' end<br />
table.insert(t,'{|class="wikitable '..sort_text..'" style="text-align:center;"\n') -- Open table<br />
<br />
-- Custom header options<br />
local draw_head_text = Args['draw_header'] or '<abbr title="Drawn">D</abbr>'<br />
local group_head_text = Args['group_header'] or '<abbr title="Group">Grp</abbr>'<br />
local team_head_text = Args['team_header'] or 'Team'<br />
local loss_first = Args['loss_before_draw'] or false<br />
-- What to rank the teams by<br />
local ranking_style = Args['ranking_style'] or 'pts'<br />
local show_points, show_perc = false<br />
ranking_style = string.lower(ranking_style)<br />
if ranking_style=='w' or ranking_style=='win' or ranking_style=='wins' then<br />
-- Based on wins<br />
elseif ranking_style=='perc' or ranking_style=='percentage' or ranking_style=='%' then<br />
-- Based on percentage<br />
show_perc = true<br />
else<br />
-- Based on points<br />
show_points = true<br />
end<br />
<br />
-- Use points instead of goals for/against<br />
local for_against_style = Args['for_against_style'] or 'matches'<br />
local fa_letter, fa_word_sing, fa_word_plur<br />
local hide_for_against = false<br />
-- First convert to lower case if it is a string<br />
for_against_style = string.lower(for_against_style)<br />
if for_against_style=='m' or for_against_style=='match' or for_against_style=='matches' then<br />
fa_letter = 'M'<br />
fa_word_sing = 'Match'<br />
fa_word_plur = 'Matches'<br />
elseif for_against_style=='none' then<br />
hide_for_against = true<br />
else<br />
fa_letter = 'M'<br />
fa_word_sing = 'Match'<br />
fa_word_plur = 'Matches'<br />
end<br />
<br />
-- Whether to use goal ratio (goal average) instead<br />
local use_ratio_val = Args['use_goal_ratio'] or 'no'<br />
local do_ratio = false<br />
-- True if exist, false otherwise<br />
if yesno(use_ratio_val) then do_ratio = true end<br />
<br />
-- Whether to use goal percentage instead<br />
local use_percentage_val = Args['use_goal_percentage'] or 'no'<br />
local do_percentage = false<br />
-- True if exist, false otherwise<br />
if yesno(use_percentage_val) then do_percentage = true end<br />
<br />
-- Use points instead of point for/against<br />
local game_for_against_style = Args['game_for_against_style'] or 'games'<br />
local gfa_letter, gfa_word_sing, gfa_word_plur<br />
local hide_game_for_against = false<br />
-- First convert to lower case if it is a string<br />
for_against_style = string.lower(for_against_style)<br />
if game_for_against_style=='g' or game_for_against_style=='game' or game_for_against_style=='games' then<br />
gfa_letter = 'G'<br />
gfa_word_sing = 'Game'<br />
gfa_word_plur = 'Games'<br />
elseif game_for_against_style=='none' then<br />
hide_game_for_against = true<br />
else<br />
gfa_letter = 'G'<br />
gfa_word_sing = 'Game'<br />
gfa_word_plur = 'Games'<br />
end<br />
<br />
-- Whether to use goal ratio (goal average) instead<br />
local use_ratio_val = Args['use_goal_ratio'] or 'no'<br />
local do_ratio = false<br />
-- True if exist, false otherwise<br />
if yesno(use_ratio_val) then do_ratio = true end<br />
<br />
-- Whether to use goal percentage instead<br />
local use_percentage_val = Args['use_goal_percentage'] or 'no'<br />
local do_percentage = false<br />
-- True if exist, false otherwise<br />
if yesno(use_percentage_val) then do_percentage = true end<br />
<br />
-- Use points instead of point for/against<br />
local point_for_against_style = Args['point_for_against_style'] or 'points'<br />
local pfa_letter, pfa_word_sing, pfa_word_plur<br />
local hide_point_for_against = false<br />
-- First convert to lower case if it is a string<br />
for_against_style = string.lower(for_against_style)<br />
if point_for_against_style=='p' or point_for_against_style=='match' or point_for_against_style=='points' then<br />
pfa_letter = 'P'<br />
pfa_word_sing = 'Point'<br />
pfa_word_plur = 'Points'<br />
elseif point_for_against_style=='none' then<br />
hide_point_for_against = true<br />
else<br />
pfa_letter = 'P'<br />
pfa_word_sing = 'Point'<br />
pfa_word_plur = 'Points'<br />
end<br />
-- Whether to use goal ratio (goal average) instead<br />
local use_ratio_val = Args['use_goal_ratio'] or 'no'<br />
local do_ratio = false<br />
-- True if exist, false otherwise<br />
if yesno(use_ratio_val) then do_ratio = true end<br />
<br />
-- Whether to use goal percentage instead<br />
local use_percentage_val = Args['use_goal_percentage'] or 'no'<br />
local do_percentage = false<br />
-- True if exist, false otherwise<br />
if yesno(use_percentage_val) then do_percentage = true end<br />
<br />
-- Initialize<br />
local tt = {}<br />
tt.count = 0 -- Up by one after every call<br />
tt.tab_text = t -- Actual text<br />
-- Actual headers<br />
tt = p_sub.colhead(tt,20,pos_label) -- Position col<br />
-- Add group header<br />
if full_table and group_col then<br />
tt = p_sub.colhead(tt,20,group_head_text) -- Group col<br />
end<br />
tt = p_sub.colhead(tt,team_width,team_head_text..VTE_text) -- Team col<br />
tt = p_sub.colhead(tt,20,'<abbr title="Played">Pld</abbr>') -- Matches played col<br />
if full_table then<br />
tt = p_sub.colhead(tt,20,'<abbr title="Won">W</abbr>') -- Win col<br />
if loss_first then<br />
tt = p_sub.colhead(tt,20,'<abbr title="Lost">L</abbr>') -- Loss col<br />
else<br />
tt = p_sub.colhead(tt,20,'<abbr title="Lost">L</abbr>') -- Loss col<br />
end<br />
if not hide_for_against then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_plur..' for">'..fa_letter..'F</abbr>') -- For col<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_plur..' against">'..fa_letter..'A</abbr>') -- Against col<br />
if do_ratio then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_sing..' ratio">'..fa_letter..'R</abbr>') -- Ratio col<br />
elseif do_percentage then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_sing..' percentage">%</abbr>') -- Percentage col<br />
else<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_sing..' difference">'..fa_letter..'D</abbr>') -- Difference col<br />
end<br />
if not hide_game_for_against then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..gfa_word_plur..' for">'..gfa_letter..'F</abbr>') -- For col<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..gfa_word_plur..' against">'..gfa_letter..'A</abbr>') -- Against col<br />
if do_ratio then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..gfa_word_sing..' ratio">'..gfa_letter..'R</abbr>') -- Ratio col<br />
elseif do_percentage then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..gfa_word_sing..' percentage">%</abbr>') -- Percentage col<br />
else<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..gfa_word_sing..' difference">'..gfa_letter..'D</abbr>') -- Difference col<br />
end<br />
<br />
if not hide_point_for_against then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..pfa_word_plur..' for">'..pfa_letter..'F</abbr>') -- For col<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..pfa_word_plur..' against">'..pfa_letter..'A</abbr>') -- Against col<br />
if do_ratio then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..pfa_word_sing..' ratio">'..pfa_letter..'R</abbr>') -- Ratio col<br />
elseif do_percentage then<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..pfa_word_sing..' percentage">%</abbr>') -- Percentage col<br />
else<br />
tt = p_sub.colhead(tt,20,'<abbr title="'..pfa_word_sing..' difference">'..pfa_letter..'D</abbr>') -- Difference col<br />
end<br />
end<br />
end<br />
end<br />
end<br />
if show_points then<br />
tt = p_sub.colhead(tt,20,'<abbr title="Points">Pts</abbr>') -- Points col<br />
elseif show_perc then<br />
tt = p_sub.colhead(tt,36,'<abbr title="Win percentage">PCT</abbr>') -- Win percentage col<br />
end<br />
if full_table then<br />
tt.count = tt.count+1<br />
table.insert(tt.tab_text,results_header_txt)<br />
end<br />
<br />
return tt<br />
end<br />
<br />
function pp.row(frame,t,Args,p_sub,notes_exist,hth_id_list,full_table,rand_val,team_list,team_code_ii,ii_start,ii_end,ii_fw,bg_col,N_teams,ii,ii_show)<br />
-- Build the inner parts of individual rows<br />
<br />
-- Sub-module usage<br />
local mm = require('Module:Math')<br />
local yesno = require('Module:Yesno')<br />
<br />
-- Get custom/default options for in table<br />
local win_points = tonumber(Args['winpoints']) or 1<br />
local loss_points = tonumber(Args['losspoints']) or 0<br />
<br />
-- Order of draws and losses --<br />
local loss_first = Args['loss_before_draw'] or false <br />
<br />
-- Get some input<br />
local wins = tonumber(Args['win_'..team_code_ii]) or 0<br />
local losses = tonumber(Args['loss_'..team_code_ii]) or 0<br />
local mfor = tonumber(Args['mf_'..team_code_ii]) or tonumber(Args['mf_'..team_code_ii]) or 0<br />
local maig = tonumber(Args['ma_'..team_code_ii]) or tonumber(Args['ma_'..team_code_ii]) or 0<br />
local gfor = tonumber(Args['gf_'..team_code_ii]) or tonumber(Args['gf_'..team_code_ii]) or 0<br />
local gaig = tonumber(Args['ga_'..team_code_ii]) or tonumber(Args['ga_'..team_code_ii]) or 0<br />
local pfor = tonumber(Args['pf_'..team_code_ii]) or tonumber(Args['pf_'..team_code_ii]) or 0<br />
local paig = tonumber(Args['pa_'..team_code_ii]) or tonumber(Args['pa_'..team_code_ii]) or 0<br />
local s_pts = tonumber(Args['adjust_points_'..team_code_ii]) or tonumber(Args['startpoints_'..team_code_ii]) or 0<br />
local hth_local = Args['hth_'..team_code_ii] or nil<br />
-- Then calculate some values<br />
local matches = wins + losses<br />
local points = win_points*wins + loss_points*losses + s_pts<br />
<br />
local win_perc = ''<br />
if matches == 0 then <br />
-- Escape for zero matches<br />
win_perc = '&mdash;' <br />
else<br />
--Some sports use draw as well<br />
win_perc = mm._precision_format((2*wins) / (2*matches), 3)<br />
if losses > 0 then<br />
-- Drop the leading zero (from the string)<br />
win_perc = string.sub(win_perc,2,string.len(win_perc))<br />
end<br />
end<br />
<br />
-- Show for/against<br />
local for_against_style = Args['for_against_style'] or 'goals'<br />
local hide_for_against = false<br />
for_against_style = string.lower(for_against_style)<br />
if for_against_style=='none' then<br />
hide_for_against = true<br />
end<br />
<br />
-- Comparison of for against<br />
local mcomp<br />
-- Whether to use goal ratio (goal average) or goal percentage instead<br />
local use_ratio_val = Args['use_goal_ratio'] or 'no'<br />
local use_percentage_val = Args['use_goal_percentage'] or 'no'<br />
local skip_sign<br />
if yesno(use_ratio_val) then<br />
-- Now it is the goal ratio/goal average<br />
if maig == 0 then<br />
mcomp = '&mdash;'<br />
else<br />
mcomp = mm._precision_format(gfor / gaig, 3)<br />
end<br />
elseif yesno(use_percentage_val) then<br />
-- Now it is the percentage<br />
if maig == 0 then<br />
mcomp = '&mdash;'<br />
else<br />
mcomp = mm._precision_format(100 * gfor / gaig , 1)<br />
end<br />
else<br />
-- It's match difference<br />
mcomp = mfor - maig<br />
-- Formatting with signs<br />
if mcomp>0 then<br />
mcomp='+'..mcomp<br />
elseif mcomp < 0 then<br />
mcomp='&minus;'..-mcomp<br />
end<br />
end<br />
<br />
local gcomp<br />
-- Whether to use goal ratio (goal average) or goal percentage instead<br />
local use_ratio_val = Args['use_goal_ratio'] or 'no'<br />
local use_percentage_val = Args['use_goal_percentage'] or 'no'<br />
local skip_sign<br />
if yesno(use_ratio_val) then<br />
-- Now it is the goal ratio/goal average<br />
if gaig == 0 then<br />
gcomp = '&mdash;'<br />
else<br />
gcomp = mm._precision_format(gfor / gaig, 3)<br />
end<br />
elseif yesno(use_percentage_val) then<br />
-- Now it is the percentage<br />
if gaig == 0 then<br />
gcomp = '&mdash;'<br />
else<br />
gcomp = mm._precision_format(100 * gfor / gaig , 1)<br />
end<br />
else<br />
-- It's match difference<br />
gcomp = gfor - gaig<br />
-- Formatting with signs<br />
if gcomp>0 then<br />
gcomp='+'..gcomp<br />
elseif gcomp < 0 then<br />
gcomp='&minus;'..-gcomp<br />
end<br />
end<br />
<br />
local pcomp<br />
-- Whether to use goal ratio (goal average) or goal percentage instead<br />
local use_ratio_val = Args['use_goal_ratio'] or 'no'<br />
local use_percentage_val = Args['use_goal_percentage'] or 'no'<br />
local skip_sign<br />
if yesno(use_ratio_val) then<br />
-- Now it is the goal ratio/goal average<br />
if paig == 0 then<br />
pcomp = '&mdash;'<br />
else<br />
pcomp = mm._precision_format(gfor / gaig, 3)<br />
end<br />
elseif yesno(use_percentage_val) then<br />
-- Now it is the percentage<br />
if paig == 0 then<br />
pcomp = '&mdash;'<br />
else<br />
pcomp = mm._precision_format(100 * gfor / gaig , 1)<br />
end<br />
else<br />
-- It's match difference<br />
pcomp = pfor - paig<br />
-- Formatting with signs<br />
if pcomp>0 then<br />
pcomp='+'..pcomp<br />
elseif pcomp < 0 then<br />
pcomp='&minus;'..-pcomp<br />
end<br />
end<br />
-- Some local vars <br />
local hth_string<br />
local tt_return = p_sub.hth(frame,Args,full_table,hth_id_list,hth_local,notes_exist,team_list,team_code_ii,ii_start,ii_end,rand_val)<br />
hth_string = tt_return.str<br />
hth_id_list = tt_return.list<br />
notes_exist = tt_return.notes_exist<br />
<br />
-- What to rank the teams by<br />
local ranking_style = Args['ranking_style'] or 'pts'<br />
local rank_points, rank_perc = false<br />
local win_fw, win_string<br />
ranking_style = string.lower(ranking_style)<br />
if ranking_style=='w' or ranking_style=='win' or ranking_style=='wins' then<br />
-- Based on wins<br />
win_fw = 'font-weight: bold;'<br />
win_string = hth_string<br />
elseif ranking_style=='perc' or ranking_style=='percentage' or ranking_style=='%' then<br />
-- Based on percentage<br />
rank_perc = true<br />
win_fw=ii_fw<br />
win_string = ''<br />
else<br />
-- Based on points<br />
rank_points = true<br />
win_fw=ii_fw<br />
win_string = ''<br />
end<br />
<br />
-- Row building<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..matches..'\n') -- Played<br />
if full_table then<br />
table.insert(t,'| style="'..win_fw..bg_col..'" |'..wins..win_string..'\n') -- Won<br />
<br />
if loss_first then<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..losses..'\n') -- Lost<br />
else<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..losses..'\n') -- Lost<br />
end<br />
<br />
if not hide_for_against then<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..mfor..'\n') -- MF<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..maig..'\n') -- MA<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..mcomp..'\n') -- Match comparison<br />
if Args['game_for_against_style'] ~= 'none' then <br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gfor..'\n') -- GF<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gaig..'\n') -- GA<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gcomp..'\n') -- Game comparison<br />
<br />
if Args['point_for_against_style'] ~= 'none' then -- game param hides games and points in header<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..pfor..'\n') -- PF<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..paig..'\n') -- PA<br />
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..pcomp..'\n') -- Point comparison<br />
end<br />
end<br />
end<br />
<br />
end<br />
if rank_points then<br />
-- Add &minus; for negative point totals<br />
if points<0 then<br />
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | &minus;'..-points..hth_string..'\n')<br />
else<br />
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..points..hth_string..'\n')<br />
end<br />
elseif rank_perc then<br />
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..win_perc..hth_string..'\n')<br />
end<br />
return {t=t, notes_exist=notes_exist, hth_id_list=hth_id_list}<br />
end<br />
<br />
function pp.status(Args)<br />
-- Declare status options<br />
-- ------------------------------------------------------------<br />
-- NOTE: If you add to status_code, also add to status_called and status_letters!!<br />
-- Or functionality will be compromised<br />
-- ------------------------------------------------------------<br />
local status_code, status_called = {}<br />
status_code = { A='Advance to a further round', C='Champion', D='Disqualified', <br />
E='Eliminated', G='Guest', H='Host', O='Play-off winner', P='Promoted', Q='Qualified to the phase indicated',<br />
R='Relegated', T='Qualified, but not yet to the particular phase indicated',<br />
X='?', Y='?', Z='?'}<br />
status_called = { A=false, C=false, D=false, E=false, G=false, H=false, O=false, P=false,<br />
Q=false, R=false, T=false, X=false, Y=false, Z=false}<br />
local status_letters = 'ACDEGHOPQRTXYZ'<br />
<br />
-- Status position (before or after read and default)<br />
local stat_pos_val = Args['status_pos'] or ''<br />
local status_position = 'after' -- Default location<br />
stat_pos_val = string.lower(stat_pos_val)<br />
if stat_pos_val=='before' then<br />
status_position = 'before'<br />
elseif stat_pos_val=='after' then<br />
status_position = 'after'<br />
end<br />
<br />
-- Read in custom status options<br />
if Args['status_text_X'] then status_code.X = Args['status_text_X'] end<br />
if Args['status_text_Y'] then status_code.Y = Args['status_text_Y'] end<br />
if Args['status_text_Z'] then status_code.Z = Args['status_text_Z'] end<br />
<br />
return {code=status_code, called=status_called, letters=status_letters, position=status_position}<br />
end<br />
<br />
return pp</div>
Florentyna