Sunday, 30 May 2010

Chess Game and Diagram Viewer

After a search for a suitable chess game viewer which was the initial goal of this website I started to create a new Chess Game Viewer. These efforts have resulted in both a Chess diagram viewer as well as a Chess game viewer.
The code for these viewers is still under development, but both can already be used. A link back to this site is appreciated.

If you want to use these viewers first have a look at how to configure the FEN viewer. If everything works fine then configure the Chess game viewer.
Please note that it isn't necessary to use the coded moves anymore, because the viewer is able to generate them, but you can still use them to improve performance (and for complex games).

The game viewer can be used for chess games, but also for chess puzzles, like a mate in two problem and it is possible to use NAG symbols.
It's also rather easy to configure the viewers. You can use your own chess board images or your own piece set.
It is possible to host everything on your own site even if you use blogspot. The previous two non-photo posts explain how to use the images uploaded by blogspot and how you can include the JavaScript in your own template.

Please have a look at some of the previous posts to get a better idea about the possibilities of these viewers and let me know if you have more unfulfilled wishes.

Friday, 14 May 2010

Tuesday, 11 May 2010

How to use images uploaded by Blogspot?

To become really independent from other sites you may also want to use images of chess pieces that you have uploaded by Blogspot/Blogger and are stored in Picasa.

This can also be done.
  1. Just create a new post. Add all the images that you need to this post and when you are finished save it without publishing. You may publish this post, but there is no need to bother the visitors of your site with a post of these images.
  2. Now you have to edit the JavaScript code and edit the array urlpcs in such a way that it contains the urls to the pieces you have uploaded in the previous step.
  3. In addition you'll have change the JavaScript code in such a way that the variable pcsdir gets the empty string value

There are some disadvantages:
  1. It will not be easy to change the images you use between posts.
  2. It will be more difficult to keep the JavaScript code up to date, but at this site I have done it as a kind of exercise (to check that it really worked).
  3. It's a lot of work
But I still think that it's important that it can be done, even if it's currently not advised to do so. This in combination with including the JavaScript in your theme, makes that your site is running solely on Blogspot.

Sunday, 9 May 2010

Wobble Chess Set


Wobble Chess Set by See-ming Lee
All sizes of this photo are available for download on Flickr under a Creative Commons license

Saturday, 8 May 2010

How to include the JavaScript in your own template?

One of the initial requirements for our Chess Game Viewer was that it shouldn't depend on another site. Of course it is possible to host the JavaScript on your own site and a site like Google sites will be sufficient. However the intention of the original requirement was also that it should be possible to host the needed JavaScript on Blogspot.
It is rather easy to accomplish this.
I assume that you already have configured your site to use the FEN viewer and the Chess Game viewer. Then look for the line in your template that refers to the external JavaScript file.

Let's start by downloading the JavaScript file from this site. After downloading open the downloaded file with Wordpad and copy the following lines at the top of this file.
<script type='text/javascript'>
//<![CDATA[

Next we are going to add the following lines at the end of this file.
//]]>
</script>

And by now we only have to replace the following line in your blogspot theme by the content in our Wordpad editor.
<script src='http://sites.google.com/site/viewchessgame/js/gv.js'
type='text/javascript'/>

Before actually changing your template it will be a good idea to backup your full template.

So now you know what to do to include the necessary code within your template. I only advice you to wait a little longer or to replace the code with the new code in the future, because the Chess Game Viewer is still under development and improving all the time.