"); fclose($hdl); include("{$eb}frmtmp.php"); @unlink("{$eb}frmtmp.php"); ?> Net-Chess.Com • View topic - Including games and board diagrams in your posts

Including games and board diagrams in your posts

For discussion pertaining to Chess, Net-Chess, or general interests.

Including games and board diagrams in your posts

Postby gmiller » Mon Jan 30, 2012 9:13 am

If you just want to include a board diagram in your post, you can surround the FEN notation with "fen" tags like this:
Code: Select all

The result looks like this:

To include an entire game and diagram in your post, surround the PGN with "pgn" tags like below:
Or, include an entire PGN game in your post using this code:
Code: Select all
[Event "m1315218948"]
[Site "net-chess.com"]
[White "sorim"]
[Black "gmiller"]
[Result "*"]
[WhiteTimeLeft "005d 00:01:33"]
[BlackTimeLeft "009d 10:13:24"]
[Game "g1105081596"]

1.e4 c5 2.Ng1f3 Nb8c6 3.d4 cxd4 4.Nf3xd4 d6 5.Nb1c3 g6 6.Bc1e3
Bf8g7 7.Qd1d2 Bc8d7 8.f3 a6 9.Bf1c4 *

The result is this:

And, if you want the game to display a particular move as the first diagram, rather than the starting position, add pgn=xx, where xx is the number of half moves to the point you want to display as a diagram:
Code: Select all
[pgn=10][Event "ZMD Open"]
[Site "Dresden GER"]
[Date "2009.07.25"]
[Round "1"]
[White "Holm,S"]
[Black "Schott,Ottmar"]
[Result "1-0"]
[WhiteElo "2254"]
[EventDate "2009.07.25"]
[ECO "D12"]

1. Nf3 d5 2. d4 Bf5 3. c4 c6 4. Nc3 e6 5. e3 Nf6 6. Be2 Bd6 7. Nh4 Bg6 8.
Nxg6 hxg6 9. h3 Nbd7 10. b3 Qe7 11. Bb2 g5 12. Qc2 Ba3 13. O-O-O a6 14.
Bxa3 Qxa3+ 15. Qb2 Qxb2+ 16. Kxb2 b5 17. cxb5 cxb5 18. a3 Ke7 19. Rc1 Rhc8
20. f3 Nb6 21. h4 gxh4 22. Rxh4 Rc7 23. Na2 Rxc1 24. Nxc1 Rc8 25. Rh1 Nfd7
26. Nd3 Nb8 27. g4 N6d7 28. Rh7 Rg8 29. g5 Nc6 30. Nf4 Nf8 31. Rh1 Nd7 32.
Rc1 Kd6 33. Rh1 Ne7 34. Bd3 Nc6 35. Rh7 Nf8 36. Rh2 Nd7 37. Ne2 e5 38. f4
e4 39. Bc2 Ne7 40. Ng3 g6 41. Bd1 Nf8 42. Bg4 Ne6 43. Rh7 Rf8 44. Kc3 Rc8+
45. Kd2 Rf8 46. Nf1 Nc6 47. Be2 Na5 48. Bd1 Nc6 49. Nh2 a5 50. Ng4 b4 51.
a4 Ke7 52. Nh6 Ncd8 53. Be2 Nc7 54. f5 Kd6 55. fxg6 fxg6 56. Rg7 Rf2 57.
Rxg6+ Nde6 58. Ke1 Rg2 59. Kf1 Rh2 60. Bg4 Rb2 61. Nf5+ Kd7 62. Ng7 Rxb3
63. Nxe6 Rxe3 64. Rg7+ Kd6 65. Nxc7 b3 66. Nb5+ Kc6 67. Rc7+ Kb6 68. Rc1
Rg3 69. Bd1 1-0[/pgn]

Greg Miller
Site Admin
Posts: 1255
Joined: Sun Mar 14, 1999 11:13 am
Location: Jeffersonville, IN

Return to General Forum

Who is online

Users browsing this forum: No registered users and 9 guests