Module:Sports table/WDL: Difference between revisions

Content deleted Content added
add optional |hide_for_against_columns=y per request
allow both percentage and points for 2013–14 KML season
Line 39:
-- Based on points per game
show_ppg = true
elseif ranking_style=='percpts' or ranking_style=='%pts' then
-- Based on percentage and points
show_perc = true
show_points = true
else
-- Based on points
Line 117 ⟶ 121:
if show_points then
tt = p_sub.colhead(tt,28,'<abbr title="Points">Pts</abbr>') -- Points col
end
elseifif show_perc then
tt = p_sub.colhead(tt,36,'<abbr title="Win percentage">PCT</abbr>') -- Win percentage col
end
elseifif show_ppg then
tt = p_sub.colhead(tt,36,'<abbr title="Points per game">PPG</abbr>') -- Points per game col
end
Line 167 ⟶ 173:
if show_points then
tt = p_sub.colhead(tt,28,'<abbr title="Points">Pts</abbr>') -- Points col
end
elseifif show_perc then
tt = p_sub.colhead(tt,36,'<abbr title="Win percentage">PCT</abbr>') -- Win percentage col
end
elseifif show_ppg then
tt = p_sub.colhead(tt,36,'<abbr title="Points per game">PPG</abbr>') -- Points per game col
end
Line 336 ⟶ 344:
-- Based on points per game
rank_ppg = true
win_fw=ii_fw
win_string = ''
elseif ranking_style=='percpts' or ranking_style=='%pts' then
-- Based on percentage and points
rank_perc = true
rank_points = true
win_fw=ii_fw
win_string = ''
Line 363 ⟶ 377:
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..points..hth_string..'\n')
end
end
elseifif rank_perc then
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..win_perc..hth_string..'\n')
end
elseifif rank_ppg then
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..ppg..hth_string..'\n')
end
Line 431 ⟶ 447:
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..points..hth_string..'\n')
end
end
elseifif rank_perc then
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..win_perc..hth_string..'\n')
end
elseifif rank_ppg then
table.insert(t,'| style="font-weight: bold;'..bg_col..'" | '..ppg..hth_string..'\n')
end