Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sports table/Custom/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Column styles=== It is very useful to set column styles in these tables {| class="wikitable" style="background:white;" |- |'''What you type''' |<syntaxhighlight lang=moin>{{#invoke:Sports table|main|style=Custom |num_cols=8 |colstyle1=pld |colstyle2=win |colstyle3=draw |default_value3=— |colstyle4=loss |colstyle5=points |colstyle6=points |colstyle7=ppg |colstyle8=sum_ppg_col6 |winpoints=2 |drawpoints=1 |losspoints=-0.1 |team1=FDT |team2=BBB |team3=CCC |team4=DDD |team5=EEE |win_FDT=5 |loss_FDT=0 |col6_FDT=10 |win_BBB=3 |draw_BBB=1 |loss_BBB=1 |col6_BBB= 3 |win_CCC=3 |loss_CCC=2 |col6_CCC= 3 |win_DDD=1 |draw_DDD=1 |loss_DDD=3 |col6_DDD= 1 |win_EEE=0 |loss_EEE=5 |name_FDT=[[FIFA World Cup Dream Team]] |name_BBB=Team 2 |name_CCC=Team 3 |name_DDD=Team 4 |name_EEE={{fb|GIB}} }}</syntaxhighlight> |- |'''What it looks like''' |{{#invoke:Sports table|main|style=Custom |num_cols=8 |colstyle1=pld |colstyle2=win |colstyle3=draw |default_value3=— |colstyle4=loss |colstyle5=points |colstyle6=points |colstyle7=ppg |colstyle8=sum_ppg_col6 |winpoints=2 |drawpoints=1 |losspoints=-0.1 |team1=FDT |team2=BBB |team3=CCC |team4=DDD |team5=EEE |win_FDT=5 |loss_FDT=0 |col6_FDT=10 |win_BBB=3 |draw_BBB=1 |loss_BBB=1 |col6_BBB= 3 |win_CCC=3 |loss_CCC=2 |col6_CCC= 3 |win_DDD=1 |draw_DDD=1 |loss_DDD=3 |col6_DDD= 1 |win_EEE=0 |loss_EEE=5 |name_FDT=[[FIFA World Cup Dream Team]] |name_BBB=Team 2 |name_CCC=Team 3 |name_DDD=Team 4 |name_EEE={{fb|GIB}} }} |} Note that in this table, even though {{para|default_value3|&mdash;}} an [[Em-dash]] is not displayed when draw data is not given. This is because the default value set by the column style supersedes any manually entered default value. However column 6 shows that data entered manually via {{para|col6_TTT}} supersedes the column style data. This example shows multiple relevant column styles ====pld, played, match, or matches==== If the column style is set to one of these values, then the default value of a cell is calculated by adding up {{para|win_TTT}} plus {{para|draw_TTT}} plus {{para|loss_TTT}}, each of whose default values are 0. The column header is <code><abbr title="Played">Pld</abbr></code>, but may be changed using {{para|pld_header}}. ====w, win, or wins==== If the column style is set to one of these values, then the default value of a cell is the value of {{para|win_TTT}} or 0 if no such value is given. The column header is <code><abbr title="Won">W</abbr></code>. ====d, draw, or draws==== If the column style is set to one of these values, then the default value of a cell is the value of {{para|draw_TTT}} or 0 if no such value is given. The column header is <code><abbr title="Drawn">D</abbr></code>. For backwards compatibility with the WDL style, if {{para|use_tie}} is set to yes, then the header is <code><abbr title="Tied">T</abbr></code>, and in either case, the header may be changed using {{para|draw_header}} ====l, loss, or losses==== If the column style is set to one of these values, then the default value of a cell is the value of {{para|loss_TTT}} or 0 if no such value is given. The column header is <code><abbr title="Lost">L</abbr></code>. ====rw==== For backwards compatibility with the WDL style, there is an option for a rounds won column style. If the column style is set to this value, then the default value of a cell is the value of {{para|rw_TTT}} or 0 if no such value is given. The column header is <code><abbr title="Rounds won">RW</abbr></code>, but may be changed using {{para|rw_header}}. ====pts or points==== If the column style is set to one of these values, then the default value of a cell is the number of points obtained by adding up the appropriate values for the wins, draws, losses, and rounds won. As a default a win is worth 3 points, a draw 1 point, a loss 0 points, and a round won 1 point. These values can be overwritten to what you need by {{para|winpoints}}, {{para|drawpoints}}, {{para|losspoints}} and {{para|rwpoints}}. The column header is <code><abbr title="Points">Pts</abbr></code>. ====ppg==== If the column style is set to this value, then the default value of a cell is the points as calculated above divided by the number of matches as calculated above. Even if these values have been overridden by {{para|colN_TTT}}, the calculated value is used and not the input value. The column header is <code><abbr title="Points per game">PPG</abbr></code>. A column with the ppg style will be slightly wider than the default column width. ====ppga==== It means "ppg average"; same as ppg but the value gives three decimal places. ====sum_S_T or diff_S_T==== If the column style is set to one of these values, with S and T replaced by non-mathematical column styles, then the value of a cell will be the mathematical result of the chosen operation on the values determined by the column styles specified by S and T. Note that if entries for S or T are not defined, then a default value of 0 is set, even if they are present in a column with a different default value. A mathematical style does not alter the column header from the default. The parameter {{para|plus_sign_diffs}} determines whether a plus sign is shown on differences that are positive. By default this value is set to {{para|plus_sign_diffs|no}}. ====other==== Any other column style will not set a default value, and so the default cell value set by {{para|default_valueN}} will be used. If the column style is set to such a value other than those listed above which is at most 3 characters long, then the column header is a fully uppercase version of the column style. For example, if the column style is set to cs, then the column header is <code>CS</code>. However, if the column style is set to a value other than those listed above that is longer than 3 characters, no alteration to the header will be made. For example, if the 2nd column style is set to cscs, then the column header is <code><abbr title="Column 2">2</abbr></code>. Additionally, if the column style is set to a value other than those listed above, then input may be taken from a parameter given by the column style underscore TTT. For example, if the column style is set to cs, then input may be taken via {{para|cs_TTT}} in addition to the usual {{para|colN_TTT}}. Currently, custom column styles should only contain alphanumeric characters. The results of anything else are '''undefined'''.
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)