by Steve Lopez

There's a lot of chess information available on the Internet and much of it is pretty good stuff. It's terrific to be able to download gamescores and add them to a database, to have opening analysis available with a few mouse clicks, to be able to see what's happening in chess clubs around the world. But a lot of chess information on the Web gets passed over for the simple reason that in most cases you can't play through a game right on the screen. You'll go to a web site, you'll see the gamescore for the latest big game from Europe, but you'll skip playing through it because you don't want to have to print it out to play through it. "Aw, I'll come back and look at it later", you tell yourself. The trouble is that you rarely do come back.

I'm a big fan of chess club Web pages. I get a huge kick out of seeing pages for scholastic chess clubs in which they post the latest club championship games or matches played against other schools. But I'd like these pages a lot more if I could simply play through the games right there on the site.

ChessBase 7 solves this problem: it now has the capability of creating Javascript gamescores that the reader can play through right there on your Web page.

There are a couple of things you'll need to do to be able to use this new feature. The first is to upgrade your ChessBase 7 to the latest version. There are two ways to do this. If you installed the Internet-enabled version of CB7, you can just go to the Support menu in ChessBase and click "Online upgrade". The second way is to go to the ChessBase International web page, go to the Download page and download the upgrade as a .zip file. Unzip it, run "setup.exe", and follow the prompts. Make sure you download the correct file -- there are .zip files for both the Internet-enabled and non-Internet-enabled versions of the program.

After you've run the Setup file to upgrade your program, return to the ChessBase International site and go to the News page. The first section talks about the new Web publishing features and even shows you an example of what the output looks like. You'll need to fill out a short registration form to gain access to the downloadable file.

After filling out the registration form, you'll be taken to a link to download the new file. Again, this is a .zip file. Once you've downloaded it, unzip it and you'll see a file called WebPublish.dll. Make sure that you've exited (not just minimized) your ChessBase 7 program and copy the new DLL file into the same folder as ChessBase 7. Once you've done that, you're all set to play with the new features!

Fire up your CB7 and open a database's game list. Select a single game or group of games from the list (to select a group of games, hold down the CTRL key on yor keyboard and left-click once on each game you want. To select the whole list, just hit CTRL-A). Once you have the game(s) selected, right-click in the game list. From the menu that appears, select "Generate HTML code". You'll see the following window appear:

This is the window that allows you to set the parameters for your HTML output. There are a number of buttons and check boxes that allow you to configure the output.

The new web publishing tools allow you to publish the ChessBase wysiwyg text files as a web page. You'll sometimes have tournament crosstables as part of these files. "Include tables" allows you to include these crosstables in the HTML output (since they require a fixed pitch font in order to display properly).

"Include game links" means that you can create a "table of contents" page for mutiple games. Each entry in the TOC is actually a link to an individual game. Each game will appear in its own HTML file. This is useful for generating web pages for multiple games; instead of creating an endlessly scrolling window containing all 45 games of a tournament, you can create a Table of Contents with links to each of the 45 games individually. I've also discovered that putting as few as 16 games on a single page causes a delay the first time a user clicks a VCR button for the latter games on the page. I clicked a button for Game 12 and there was a delay of about 30 seconds before the piece moved. However, once the first piece moved, the remaining clicks produced normal behavior (that is, no delays).

The next check box, "Games replayable", is the really important one. If you check this box, CB7 will generate a small file of Java code that will allow visitors to your web page to replay the games right there on the screen. We'll look at this in depth a bit later.

The "Select path" button lets you name the HTML file and select a folder on your computer where the file (and its related PGN and Javascript files) will be saved. This window is just the standard Windows file selector. It's important that you know where the files are saved so that you can later upload them to your web page! I "mirror" my web page on my home computer, retaining the same directory structure as on the web server, so I just save the files into the "mirrored" folder and then just upload them via FTP to my web page.

A few notes on naming your files. It's useful to choose short (six characters or less) file names. The Javascript file will have a couple of extra characters in it and 16-bit FTP programs won't properly recognize the filename if it's more than eight characters long. Be aware, too, that if you type in a file name that already exists in that folder, CB7 will NOT prompt you that the file will be overwritten, so caution is a must.

There's a box for "gif files location". The chessboard that CB7 generates is actually made up of 64 individual .GIF files (see ETN October 18, 1998 for more details). For the chessboard to display properly, the links in the HTML file need to be correct.

Here's what I do to handle this. Let's say I plan to put the HTML game files on my site in a directory called /games. All I need to do is create a directory called /gif as a subdirectory of /games -- ergo the path to the graphics files would be /games/gif. When I have CB7 generate the HTML gamescores, I choose "Gif files local" to tell the program that the chessboard graphics files are in a subdirectory of the directory in which the game files reside.

Finally, there's a checkbox for "Create PGN database for download". If you check this box, CB7 will create a downloadable PGN file of the games and add a link at the bottom of the page so that your readers can download the file to their computers.

After selecting your options, click "OK". A new box appears and allows you to type in an overall header for the games collection. This will appear in the HTML file as a centered headline that uses the H1 tag.

Once you've typed in your header, click "OK". CB7 will now create the files in the folder you previously specified.

After the files have been generated, you can go to the folder and take a look. You'll see an HTML file (or multiple files, if you chose to have a Table of Contents to multiple game pages generated). You'll also see a similarly-named file that ends in .JS -- this is the Javascript file that allows visitors to your page to play through the games directly on your site. No additional software is needed by either you or your visitors. If you checked the "Create PGN" option, you'll see this file as well. You'll also see a new subfolder called "gif" which contains the graphics files needed for the chessboard.

The HTML file is editable, which is a good idea. You can add your own headers and footers, a link back to the previous page, additional graphics, anything you want in fact. Don't mess with the existing body of the CB7-generated text, though. For example, if you add spaces to the table it generates, it will screw up the spacing and the chessboard won't display properly.

Once you have your new page looking all pretty and oh so fine, you simply upload it to your server, along with the additional files that were created (the Javascript and PGN files). You also need to upload the .gif files, remembering to keep the same directory structure that was produced on your hard drive.

So what does all of this swell stuff actually look like? For your viewing pleasure, I now provide three links. Don't forget to hit the "Back" button on your browser after viewing each page (I was just too danged pressed for time to add return links).

The first example contains an annotated game that originally appeared on my personal web page. It's shows quite graphically that all annotations are preserved when these new HTML files are generated, but that it's probably not a good idea to go overboard with your notes, as the whole gamescore won't be visible on the same screen as the chessboard. Of course, the "silver lining" approach is to say that it's still better than just an annotated game with no interactive chessboard, and I suppose that's a valid point, too.

The second lovely entry in our web fashion show shows the same game in unannotated form. It's a much more utilitarian approach -- the raw gamescore with an interactive chess board, both simultaneously visible on the screen in their entirety.

Finally, we have an example of multiple games on a single page, which comes from my Chess Kamikazes web site. This file shows that the HTML output of ChessBase 7 is editable. I've added my own text and graphics to the page, as well as changed the background color. If you scroll down the page to one of the later games, you can see for yourself how clicking on a VCR button takes some extra time to cause the first piece to move in later games on a large page. In the future, I think I'll be limiting the number of games on a single page to about a half-dozen or so.

(OK, OK, so my web page isn't the Victoria's Secret fashion show, but at least it's interactive and the picture's clearer).

As I stated earlier in this article, you can also turn an on-screen text file you create in ChessBase's wysiwyg editor into a web page. I've not experimented with this yet, though, so that's another rambling screed you can look forward to in the future!

Now you have no excuse for not creating a page for your local chess club! It's easier than ever to create attractive and useful chess pages using these new HTML generation tools.

Until next week, enjoy learning those HTML tags and have fun!

You can e-mail me with your comments, suggestions, and analysis for Electronic T-Notes. If you love gambits, stop by the Chess Kamikaze Home Page and the Yahoo Chess Kamikazes Club.