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!
===Basic usage=== In its simplest form only several parameters need to be used to build a table. {| class="wikitable" style="background:white;" |- |'''What you type''' |<syntaxhighlight lang=moin>{{#invoke:Sports table|main|style=Custom |num_cols=6 |colstyle2=win |col_header4={{Abbr|Ex|Example header}} |default_value5=— |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=6 |colstyle2=win |col_header4={{Abbr|Ex|Example header}} |default_value5=— |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}} }} |} The main command is the <code><nowiki>{{#invoke:Sports table|main|style=Custom}}</nowiki></code> statement which basically calls the module and enables you to set everything up. You also need to set the {{para|num_cols}} parameter to determine how many columns will be displayed after the team column. If this is not set, then there will be one column after the team column. For each column you now define the column style and/or column header by using {{para|colstyleN}} and {{para|col_headerN}} respectively (with N replaced by the column number). For more information on column styles, see [[#Column styles]]. To set the order and number of rows, you list the positions of the teams as {{para|team1}}, {{para|team2}}, etc for however many teams you need in the table. You can use full team names there <u>without spaces</u> if you want, but using codes (as in the example) can make it easier. For each team you now define the wins, draws, losses, and values contained in column number N by using {{para|win_TTT}}, {{para|draw_TTT}}, {{para|loss_TTT}} and {{para|colN_TTT}} respectively (with TTT replaced by the team code). If you do not define these numbers, it is automatically assumed to be <code>&nbsp;&nbsp;</code>, except for columns which use a column style or have defined {{para|default_valueN}}. It is good practice though to include them anyway and to align the columns using appropriate spaces (as in the example), so the code is easy to read. The last step now is to define the {{para|name_TTT}} parameters which determine what name is shown in the table, you can use wiki markup and templates in here as well. See [[#Dating]] to see how to change the update date.
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)