The PHP script used here is based on the PHPdiag script written by Joost de Heer in 2002 (
http://www.pairlist.net/pipermail/retro ... 00134.html). Several years ago I extended the script for personal use and added more features, many of them being available within this forum. In the near future, more capabilities will be added, together with improvements of the existing ones (i.e. letters and numbers). Below are brief descriptions and usage instructions.
1. CHESSBOARD SIZE Any [m]*[n] rectangular shape is supported. There is just one restriction: all files must have the same number of squares. For example:
5x3: Input:
5/5/53x4: Input:
3/3/3/3 2. SPECIAL CHESSBOARDS Special attributes of the chessboard are handled via parameters (a name/value pair appended to the FFEN string).
Parameter name: sb
Valid values: h, v, i, e, b, nc, r
2.1 Horizontal Cylinder (sb=h)3x3 horizontal cylinder: Input:
3/3/3&sb=h2.2 Vertical Cylinder (sb=v)3x3 vertical cylinder: Input:
3/3/3&sb=v2.3 Rotated Board (sb=i)3x3 rotated board: Input:
3/3/3&sb=i2.4 Empty Board (sb=e)3x3 empty board: Input:
3/3/3&sb=e2.5 Extra Border (sb=b)3x3 extra border: Input:
3/3/3&sb=b2.6 No Piece Count (sb=nc)1x1 no piece count: Input:
Q&sb=nc2.7 Combinations3x3 anchor ring: Input:
3/3/3&sb=hv3x3 rotated, extra border, no piece count: Input:
3/3/3&sb=ibnc3. PIECES Both normal and fairy pieces are supported.
3.1 Normal PiecesNormal chess pieces are specified by using the letters K (King), Q (Queen), R (Rook), B (Bishop), N (Knight) and P (Pawn) (lower case letters for black pieces and upper case letters for white pieces). For Knight, s and, respectively, S can also be used.
Input:
pnbrqks/PNBRQKS3.2 Neutral PiecesA neutral pieces is specified by adding the prefix "-".
Input:
-p-n-b-r-q-k/-P-N-B-R-Q-K3.3 ImitatorInput:
x/X&sb=nc3.4 Other Fairy PiecesFairy pieces are entered by adding the prefix "*", followed by either 1, 2, or 3, to specify the rotation (90, 180 and 270 degrees CCW).
Input:
*1p*2n*3b*1r*2q*3k/*3P*2N*1B-*3R-*2Q-*1K4. COLORS 4.1 Special Squares (default color)Any square on the board can be highlighted by using a special parameter.
Parameter name: ssq
Valid values: a FEN-like string, in which the square to be highlighted is indicated by using the letter "s".
Input:
3/3/3&ssq=1s1/2s/34.2 Special Squares - User defined colorThe default color of the special squares can be replaced by any user defined color, using the 24-bit per pixel RGB color model representation, in which the RGB values are specified using three 8-bit unsigned integers (0 through 255) representing the intensities of Red, Green, and Blue.
Parameter name: ssc
Valid values: as per the convention known as full-range RGB, from (0,0,0) to (255,255,255)
Input:
3/3/3&ssq=1s1/2s/3&ssc=255,0,1004.3 Dark Squares - User defined colorSimilarly, the default color of the dark squares can be changed.
Parameter name: dsc
Valid values: as per the convention known as full-range RGB, from (0,0,0) to (255,255,255)
Input:
3/3/3&dsc=100,250,1004.4 Light Squares - User defined colorSimilarly, the default color of the light squares can be changed.
Parameter name: lsc
Valid values: as per the convention known as full-range RGB, from (0,0,0) to (255,255,255)
Input:
3/3/3&lsc=255,255,1704.5 CombinationsFor example:
Input:
3/3/3&dsc=255,255,170&lsc=255,255,170&ssq=3/1s1/35. GRIDS AND LINES 5.1 Standard GridDefault ColorParameter name: g
Valid values: s
Input:
8/8/8/8/8/8/8/8&g=sUser Defined ColorThe default color of the grid lines can be changed via a dedicated parameter.
Parameter name: lc
Valid values: as per the convention known as full-range RGB, from (0,0,0) to (255,255,255)
Input:
8/8/8/8/8/8/8/8&g=s&ssc=255,0,1005.2 Irregular GridsIrregular grids can be specified by using a special parameter.
Parameter name: gl
Valid values: Pairs of Cartesian coordinates, separated by "/"
Let the chessboard be a plane, with the origin (the point where abscissa (the x-coordinate) and ordinate (the y-coordinate) met) at the upper-left corner. In this plane, each point is defined by two projections, one on to the x-axis and one on to the y-axis, and is written as an ordered pair of real numbers: x, y. A grid line is thus written as two pairs of real numbers: x1,y1,x2,y2.
Input:
8/8/8/8/8/8/8/8&gl=4,0,4,8/0,3,8,35.3. LinesExamples:
Input:
3/3/3&gl=1,1,2,1/1,2,2,2/1,1,1,2/2,1,2,2Input:
3/3/3&gl=1,1,2,1/1,2,2,2/1,1,1,2/2,1,2,2/1,1,2,2/2,1,1,2Input:
3/3/3&gl=1,1,2,1/1,2,2,2/1,1,1,2/2,1,2,2/1.25,1,1.25,2/1.5,1,1.5,2/1.75,1,1.75,2Input:
1R1/R2/3&gl=1.5,0.4,0.5,1.4/1.5,0.6,0.5,1.6&lc=0,0,05.4 Brush SizeThe default width of all lines is two pixels. This can be modified via another special parameter.
Parameter name: bt
Valid values: Integers
Input:
3/3/3&gl=1,1,2,1/1,2,2,2/1,1,1,2/2,1,2,2&bt=56. LETTERS AND NUMBERS In the current version, letters and numbers can also be entered by using the "sb" parameter and a FEN-like string. Only letters and numbers can be displayed on the chessboard - the combination of letters, numbers and chess pieces will be possible in the next version of the script.
Parameter name: sb
Valid values: r
6.1 LettersInput:
abc1/1def/ghi1/1jkl&sb=ncbrThe letters can also be rotated, by adding the prefix "*", followed by either 1, 2, or 3, to specify the rotation (90, 180 and 270 degrees CCW).
Input:
1a1/*1a1*3a/1*2a1&sb=ncbre6.2 NumbersNumbers are entered by adding the prefix "!"
Input:
8/8/3!14/2!2!3!45/1!0!9!8!7!52/8/8/8&sb=ncbreThe numbers can also be rotated, by adding the prefix "*", followed by either 1, 2, or 3, to specify the rotation (90, 180 and 270 degrees CCW).
Input:
1!21/!*121!*32/1!*221&sb=ncbre