Template:Infobox baseball biography/style

From blackwiki
< Template:Infobox baseball biography
Revision as of 22:35, 19 May 2015 by imported>Frietjes (creating a variant of template:infobox basketball biography/style to allow for college colors)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Script error: No such module "baseball color".

50px Template documentation[view] [edit] [history] [purge]

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

Usage

{{Infobox baseball biography/style|team}}

or

{{Infobox baseball biography/style|team|secondary}}

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 either the 'colorcell' or 'colorcell2' 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 either the 'header1' or 'header2' functions in Module:College color.

Tests

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 college color module.

Test League Primary Result Secondary Result
Blank N/A Script error: No such module "baseball color". Script error: No such module "baseball color".
Retired N/A Script error: No such module "baseball color". Script error: No such module "baseball color".
Free Agent N/A Script error: No such module "baseball color". Script error: No such module "baseball color".
Washington Nationals US/Canada Script error: No such module "baseball color". Script error: No such module "baseball color".
Fukuoka SoftBank Hawks Japan Script error: No such module "baseball color". Script error: No such module "baseball color".
Shanghai Golden Eagles China/Taiwan Script error: No such module "baseball color". Script error: No such module "baseball color".
Toros de Tijuana Mexico Script error: No such module "baseball color". Script error: No such module "baseball color".
Youngstown State Penguins NCAA Script error: No such module "baseball color". Script error: No such module "baseball color".

The third/fourth 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