How to configure the chess game viewer?
This post explains how you can adapt your template in order to use the Chess Game Viewer, but first configure and try the FEN-viewer.
If the FEN-viewer is working fine we start to configure the chess game viewer.
Go to Layout » Edit html
and make a backup of your template
Then find something like
]]></b:skin>We are going to add some lines above and below this, but also adding an onLoad statement to the body tag.
</head>
<body>
#pc1 {position:absolute; visibility:hidden; cursor:hand;}And (after saving your template) the configuration part is finished.
.qzs {position:relative; visibility:hidden;}
]]></b:skin>
</head>
<body onLoad='InitSys();'>
<div id='pc1' onClick='DropPc(cg)'>
<img name='dpc'
src='http://sites.google.com/site/viewchessgame/pcs/i.gif'/>
</div>
Let's try it by adding the following code to a post.
<SCRIPT language='JavaScript'
type='text/javascript'>
Game('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR 1',
'sc@@K[@@z^@@@Q@@|a@@ET@@^L@A',
'1.e4 e5 2.Qh5 Nc6 3.Bc4 Nf6 4.Qxf7# 1-0',
1,6);</SCRIPT>
This is the Scholar's Mate.
The arguments for the Game function are similar to the Fen2Page function. At the moment we still have to add the coded moves (that can be copied from the file generated by Palview). The last optional argument indicates the initial position that has to be shown, because the starting position of the chess board isn't very informative.
Delenn
31 October 2009 at 16:37
Once again I was successful after a few tries. Thanks for these tips again.
P.S. Maybe you could just upload the last version of this html template somewhere so other blogger users can easily download and use it with a few clicks.
Chess Teacher
1 November 2009 at 03:27
This sounds like a good idea, but I don't feel that I can distribute the theme I currently use. I'll have to think about writing some dedicated chess themes.
Anonymous
2 December 2009 at 21:57
Hi Chess Teacher! Finally, I managed to configure the FEN and PAL Viewer on my blog.Take a look.Thanks for guiding us.
n.b : http://centralchessclub.blogspot.com/
Anonymous
25 January 2010 at 08:49
"file generated by PALView"? what do you mean by those phrases? how do we generate the files? Could we?
Chess Teacher
25 January 2010 at 09:06
Palview can be downloaded at this page.
In the future my intention is to make it unnecessary to add these coded moves, but adding them will speed up the page loading time.
Anonymous
25 January 2010 at 09:27
After downloading the PALViewm files, What should i do with those downloaded files? Then, how do i generate the needed code to publish game(s) on the blog?
Chess Teacher
25 January 2010 at 10:15
There is a manual and a lot of examples at the palview pages, but if you drop a PGN file on palview4.exe a html file will be generated that contains the code in the gm var.
var gm=['Coded_Moves'];
Anonymous
25 January 2010 at 10:34
Thank you very much Chess Teacher..I'm on my way downloading the palview4 and trying to make use of Palmate as well.It becomes more and more interesting like this way.Again, thx for revealing the secret of the code!
Anonymous
25 January 2010 at 13:01
ok Chess Teacher, I managed to get the code generated by PALViewer.Thanks again,next I'll post the sample games which contains the generated code on my blog.See you again..!
Regads...Sam
Tom-R
2 February 2010 at 05:38
2 days searching a simple way to publish chessgames, and i found yours, hopefully....
simple and effective, thanks!
Tom-R
2 February 2010 at 08:03
it works... but only with your game Scholar's Mate... how to publish a different game??
for exemple i changed to :
< SCRIPT language='JavaScript'
type='text/javascript' >
Game('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR 1',
'sc@@K[@@z^@@@Q@@|a@@ET@@^L@A',
'1.d4 d5',
1,1);< /SCRIPT >
and i still have your game played on the board...
Chess Teacher
2 February 2010 at 08:45
@Tom-R
You also have to change the coded moves. The easiest way to get these coded moves is by means of the Palview program as mentioned above.
In your (1.d4 d5) case they are: 'rb@@JZ@@'
Tom-R
7 February 2010 at 09:33
palview is not working for me :-( .... another way to get the coded moves?
Chess Teacher
7 February 2010 at 10:42
@Tom-R
It's a lot of work to code the moves without a computer program.
As soon as I have some free time I'm going to create a new version of the Game Viewer in which the coded moves aren't necessary anymore, and only useful for page loading time improvements.
However I don't expect to finish this within the next months.
Chess Teacher
16 February 2010 at 07:55
A first version of the Game Viewer in which the coded moves aren't necessary anymore has been published today.
Rauan Sagit
4 March 2011 at 05:58
Hi there. I have a blog on http://chess-team-viking-swe.blogspot.com/, where I write about Team Viking, the only financially sponsored chess team in Sweden. I would like to publish games together with comments and variations. I do have some programming experience. I tried to configure the FEN viewer exactly according to instructions, but when making a test entry, also according to instructions, it just gives an empty page. I followed http://chesspublishing.blogspot.com/2009/10/how-to-configure-fen-viewer.html, I am grateful if you help me out, we would benefit a lot from being able to use your viewer. Kind regards.
Chess Teacher
4 March 2011 at 06:42
Can you give me the link of your test posting?
Rauan Sagit
4 March 2011 at 06:49
Suddenly it worked. I wrote a new test entry, but first I removed the newline before script's closing tag. I don't know much about java scripts in html, so this was a silly mistake by me, I will continue and try to set up everything to work! Here is the link. http://chess-team-viking-swe.blogspot.com/2011/03/testing-fen-viewer.html
Rauan Sagit
4 March 2011 at 08:46
I think I made everything work now. It looks great! I wrote a post to refer to your site. Please see http://chess-team-viking-swe.blogspot.com/2010/12/daniel-semcesen-game.html for a game that I published. There is one thing I couldn't do, and that is to move back and forth in the game using the keyboard strokes "left" and "right". I also tried "space" and several other keys :) Do you have such a feature implemented?
Chess Teacher
4 March 2011 at 09:10
Thanks for your post about this site.
At the moment I don't have keyboard support implemented, but I will probably add it in the next release.
Your annotated game looks very nice.
Unknown
13 October 2011 at 00:20
Thanks for your efforts in bringing out a very useful tool to publish chess games. I have used the chess game viewer in my blog and I have added a link to your site below. Thanks again
http://rmn-explores.blogspot.com/2011/10/chess-classics-series-1.html
keelasever
23 January 2013 at 20:44
Hi,thanks for the post.
I have the viewer implemented in my blog . the only thin i dont know is how to generate the codes for the games. ¿
How should I go about it?
Chess Teacher
24 January 2013 at 00:38
I suggest to use Palview to generate the coded moves, but it's also possible to use the Game viewer without the coded moves. See http://chesspublishing.blogspot.nl/2010/02/published-game-without-coded-moves.html