Using more than one chess board

This post demonstrates the use of two chess boards in an article about chess which may be useful when you want to publish a game with a lot of comments and/or variations.

  • Hi Chess Teacher, pls show me how to post the "smothered mate" and this posting to my blog,coz I can't post it even i had configured the FEN and Pal Viewer correctly before this.Thanks.

  • @ 17ChessClub

    I looked at the source code of your site.
    Try to remove the newline characters from the long strings.

  • Hi again :)

    I'm trying to use your code in my blog by publishing a weekly study. I think I'm making something wrong because there is a problem with number of the move which people see under the chessboard. It's not like 1.x 1... y 2.z etc but like 0.a 0...b 2.c 3...d

    for example;

    And this is the code that I've used

    Game('8/8/1KP5/3r4/8/8/8/k7','QI@@ZR@BPX@@PHA@RJA@RZ@BX`@@Zb@B`h@@`iA@bzA@iqA@zbA@bj@Bhq@@jb@@IA@`IAApbaABAaA@b_@@qh@@','1.c7 Rd6+ 2.Kb5 (2.Kb7 Rd7) 2...Rd5+ 3.Kb4 Rd4+ 4.Kb3 (4.Kc3 Rd1 5.Kc2 Rd4) 4...Rd3+ 5.Kc2 Rd4 6.c8=R (6.c8=Q Rc4+ 7.Qxc4) 6...Ra4 7.Kb3 1-0',1,0)

    I'll apreciate if you can see what I'm doing wrong. Thanks in advance.

  • Or maybe you could publish a study here and share it's code with us?

  • You only have to add the initial move number after the FEN and adapt the move numbers in the PGN.

    The code you can use is:
    Game('8/8/1KP5/3r4/8/8/8/k7 17','QI@@ZR@BPX@@PHA@RJA@RZ@BX`@@Zb@B`h@@`iA@bzA@iqA@zbA@bj@Bhq@@jb@@IA@`IAApbaABAaA@b_@@qh@@','17.c7 Rd6+ 18.Kb5 (18.Kb7 Rd7) 18...Rd5+ 19.Kb4 Rd4+ 20.Kb3 (20.Kc3 Rd1 21.Kc2 Rd4) 20...Rd3+ 21.Kc2 Rd4 22.c8=R (22.c8=Q Rc4+ 23.Qxc4) 22...Ra4 23.Kb3 1-0',1,0)

  • Hi chess teacher, what about chess puzzle code.Another thing, I could hardly copy & paste to the HTML editting area in my blog? Why is it so?

  • Can you explain to me what is meant by those characters after the move number " 17'" ?

  • @c4d4e4f4
    See also the post about How to configure the chess game viewer?

    These are the coded moves (currently generated by Palview)

  • Hi Chess Teacher,
    Could you please show me how to publish game with annotations;provided that I have the var gm code available.Thanks.

  • Comments can be inserted between curly brackets, but that wasn't the problem on your site. The PGN has to be entered as one string without line breaks.