Template:Pgnviewer/doc

This template is used to display Chess games in an "interactive" display. It can display one to thirty games, using the game's PGN.

PGN of many historic chess games can be found in many databases over the internet. Please note that the notation of the game itself is generally not considered to be copyrighted material, however, if the PGN contains annotations, these may be copyrighted, so when copying the pgn, it's usually best to clear all annotations, and possibly add your own.

In order for this template to work, a script has to be loaded. at this time, this script is not loaded on enwiki by default, so this template can't be used in articles. It is meant to demonstrate the function of the Chess-viewer script, and to see it, one needs to add to Special:MyPage/common.js the following line:

Parameters

 * 1) collapsible: any non-empty value will show a Hide/Show button to the left of the selector (when there is a selector) or above the board when showing a single game. Clicking it will collapse and expand the viewer.
 * 2) collapsed: (only relevant when "collapsible" is set). any non-empty value will display the viewer initially collapsed (hidden).
 * 3) square-size (defaults to 35): size in pixel of one square on the board, similar to parameter "size" of Chess diagram. if used, must be a number. any value below 20 will be considered as 20, and any number larger than 60 will be considered to be 60.
 * 4) hide-annotations (not supported yet): any non-empty value will display all the game with the annotations (if exist) hidden
 * 5) style: any additional html style. To show the viewer flushed to the left use  . To display the viewer centered, use
 * 1, 2, 3... = the PGN or algebraic notations of the games themselves.

special PGN tags
The viewer supports several special PGN tags, some of which are not standard:
 * FEN (standard PGN tag): use this tag when opening position of the game is anything other than standard opening position. When this parameter is used, the viewer will display the board in the opening state rather than the last position.
 * FirstMove (non-standard PGN tag): this parameter instructs the viewer to initially show the board in some intermediate position. the value should be the move # followed by "l" (lowercase L) for white or "d" for black. To show initial position after move 15 of white, add to the pgn tags ("metadata", before the game notation), and initial position after move 22 of black,

Example
{	"params": { "1": {},		"2": {},		"3": {},		"4": {},		"5": {},		"6": {},		"7": {},		"8": {},		"9": {},		"10": {},		"11": {},		"12": {},		"13": {},		"14": {},		"15": {},		"16": {},		"17": {},		"18": {},		"19": {},		"20": {},		"21": {},		"22": {},		"23": {},		"24": {},		"25": {},		"26": {},		"27": {},		"28": {},		"29": {},		"30": {},		"style": {}, "class": {}, "square-size": {}, "collapsible": {}, "collapsed": {} },	"paramOrder": [ "square-size", "collapsible", "collapsed", "class", "style", "1",		"2",		"3",		"4",		"5",		"6",		"7",		"8",		"9",		"10",		"11",		"12",		"13",		"14",		"15",		"16",		"17",		"18",		"19",		"20",		"21",		"22",		"23",		"24",		"25",		"26",		"27",		"28",		"29",		"30"	] }