ਸਮੱਗਰੀ 'ਤੇ ਜਾਓ

ਫਰਮਾ:Infobox basketball biography/style/doc

ਵਿਕੀਪੀਡੀਆ, ਇੱਕ ਆਜ਼ਾਦ ਵਿਸ਼ਵਕੋਸ਼ ਤੋਂ

This subtemplate of {{Infobox basketball biography}} is used to generate the colored headers corresponding to the team colors for the individual's current professional team.

{{Infobox basketball biography/style|team}}

or

{{Infobox basketball biography/style|team|team_link}}

How it works

[ਸੋਧੋ]

The template checks to see if the team is known by checking the return code from the 'check' function in Module:Sports color. If the team is known by the module, then it will return known, and the template uses coloring specified by the 'colorcell' function in Module:Sports color. If the team is not known by the module, then it will return nothing, and the template uses the coloring specified by the 'header' function in Module:College color.

If a second team_link parameter is passed, this style statement is used to generate a colored link, otherwise the template simply returns the style statement.

The following are tests to make sure the template has not been broken. The tests check the last team in a few sections of the module, and in the NCAA color template.

Test League Result
Blank N/A background-color: #DCDCDC !important; color: #000000 !important;
Retired N/A background-color: #DCDCDC !important; color: #000000 !important;
Free Agent N/A background-color: #DCDCDC !important; color: #000000 !important;
Washington Wizards NBA Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Žalgiris Kaunas Euroleague Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Wollongong Hawks NBL Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Talk 'N Text Tropang Texters PBA Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Smart Gilas Pilipinas PBA Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
s.Oliver Baskets European leagues Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Wonju Dongbu Promy KBL Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
South Korea national basketball team KBL Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Youngstown State Penguins NCAA Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Moncton Magic Canada Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.
Raleigh Firebirds The Basketball League Lua error in package.lua at line 80: module 'Module:Sports color/basketball' not found.

The third column in the table above should not be blank for any of the queries. Only the first three should return DCDCDC/000000 (the default).

Complexity

[ਸੋਧੋ]

In principle, more leagues could be added, but there is a risk that this would increase the module's complexity, and either (a) reduce rendering speed, or (b) trigger the dreaded script error.

See also

[ਸੋਧੋ]