Bản mẫu:Infobox basketball biography/style

Bách khoa toàn thư mở Wikipedia
Bước tới điều hướng Bước tới tìm kiếm


Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

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.

Cách sử dụng[sửa mã nguồn]

{{Infobox basketball biography/style|đội}}


{{Infobox basketball biography/style|đội|liên kết đội}}

Làm thế nào nó hoạt động[sửa mã nguồn]

The template checks to see if the team is known by checking the return code from the 'check' function in Mô đun:Basketball 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 Mô đun:Basketball 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 Mô đun: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.

Thử nghiệm[sửa mã nguồn]

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.

Thử nghiệm Giải Kết quả
Blank N/A background-color:#DCDCDC;color:#000000;
Retired N/A background-color:#DCDCDC;color:#000000;
Free Agent N/A background-color:#DCDCDC;color:#000000;
Washington Wizards NBA background-color:#E31837;color:#FFFFFF;
Žalgiris Kaunas Euroleague background-color:#006D3E;color:#FFFFFF;
Wollongong Hawks NBL background-color:#FF2000;color:#FFFFFF;
Talk 'N Text Tropang Texters PBA background-color:#FDD501;color:#0055AF;
Smart Gilas Pilipinas PBA background-color:#0038A8;color:#FFFFFF;
s.Oliver Baskets European leagues background-color:#DCDCDC;color:#000000;
Wonju Dongbu Promy KBL background-color:#009D85;color:#FFFFFF;
South Korea national basketball team KBL background-color:#FFFFFF;color:#003478;
Youngstown State Penguins NCAA background-color:#C8102E;color:#FFFFFF;

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).

Phức tạp[sửa mã nguồn]

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.

Xem thêm[sửa mã nguồn]