April 30, 2009

Publishing with WordPress

WordPress

I have been frequently asked how this publishing method would work with WordPress (WP) blogging software. My principal response has been that the approach should work as expected with any publishing software since I don’t rely on anything specific to Blogger.com. Although that statement is entirely correct several people didn’t quite manage to do the WP integration. Naturally, that made me very curious and eager to try my hands at. Initially I had very little experience with WP but I came up to speed quickly and, now, I’m ready with a clear and affirmative answer to the WP community.

Before I start, I want to thank Toomas Römer for the inspiring work on his jsPgnViewer and especially the “WordPress Plug-in” which he developed. Without it, my solution would’ve taken much longer to see daylight.

Installing the plug-in

One of the many nice features of WP software is the support for the concept of plug-ins. Those can be used to extend the functionality of pretty much every aspect of the publishing process. In our case, the plug-in handles the post’s content (i.e. the body) and takes care of all the internal and specific to WP details.

The only downside of using plug-ins is that a blogger would need a file-level (FTP) access to the Web server in order to do the installation. Luckily, that’s not a big restriction in the WP's world because the software was meant to be used that way from the very beginning and many people already do so. An alternative would be to ask the site administrator to install the plug-in for you. One way or the other, here are the actual steps:

  1. Download the WordPress plug-in's ZIP from the download page to the Webspace on your server.
  2. Uncompress it into your server's folder "[WP install folder]/wp-content/plugins".
    Note: If your hosting provider supports it there may be a way of combining the first two steps.
  3. To make sure that the folder was created in the right place locate the plug-in module
    at "[WP install folder]/wp-content/plugins/cvd-viewer/cvd-viewer.php"
  4. Log in to the WP's administration interface, look under the Plugins section and click on the Installed option. On the "Manage Plugins" screen find the cvd-viewer plug-in and activate it.
  5. The installation is complete.

Using the new feature

To try out the new functionality simply create a new post and copy/paste the following section into the post’s body:

<pgn id='oChessViewer' onload='makeChessApplet ( null );'>
[Event "4th FIDE Grand Prix"]
[Site "Nalchik RUS"]
[Date "2009.04.29"]
[Round "13"]
[White "Levon Aronian"]
[Black "Peter Leko"]
[Result "1-0"]
[WhiteElo "2754"]
[BlackElo "2751"]
[ECO "E55"]
[EventDate "2009.04.15"]
[PlyCount "107"]

1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.e3 0-0 5.Bd3 d5 6.Nf3 c5 7.0-0 dxc4
8.Bxc4 Nbd7 9.Qe2 b6 10.Rd1 cxd4 11.exd4 Bxc3 12.bxc3 Bb7 13.Bb3 Qc7
14.c4 Rfe8 15.Bb2 Qf4 16.Qe3 Qf5 17.Ne1 b5 18.c5 Nd5 19.Qg3 Nf4
20.Rd2 Nf6 21.f3 N6h5 22.Qf2 Bd5 23.Bc2 Qg5 24.Kh1 Bc4 25.g3 Ng6
26.Ng2 Bd5 27.Ne3 Nf6 28.h4 Qh5 29.Nxd5 Nxd5 30.Re1 Red8 31.Rde2 Rab8
32.Bc1 h6 33.Kg2 Nc3 34.Re5 Nxe5 35.Rxe5 f5 36.Bb3 Nd5 37.Rxe6 Kh8
38.Qe1 Nf6 39.Qe5 Re8 40.c6 Rbc8 41.Qxb5 Qg6 42.h5 Qxh5 43.Bf4 a6
44.Qxa6 Nh7 45.c7 Ng5 46.Rxe8+ Qxe8 47.d5 Ra8 48.Qc4 Kh7 49.d6 Qe1
50.Qf1 Qe8 51.Qd3 Qd7 52.Qc4 Qe8 53.Bxg5 hxg5 54.Qg8+
1-0
</pgn>

The above is pretty straightforward and easy to understand except for the following two points:

  • There is an id defined on the PGN tag which should always be present and contain the value of oChessViewer. It uniquely identifies the group of PGN tags that belong to our current plug-in and allows for future extensions. Also the ID is later inherited by the chess viewer (CV) object and can be used in your CSS to define a style that applies to each of the CV objects.
  • There is a mandatory onload event handler which corresponds to this method's main Javascript entry point. The function call is easy to recognize when you look at any ready-to-publish CV section, e.g. The Result page of the "HTML Code Generator for Blogs". That's the place where all of the custom parameters and values will appear when you start using them.

April 29, 2009

Chess Today Tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Chess Today Tactic

4th FIDE Grand Prix Tournament

The original live broadcast is here.

April 28, 2009

Solve in 30 seconds

Originally posted by SusanPolgar here: Solve in 30 seconds

April 27, 2009

Easy tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Easy tactic

April 26, 2009

Sunday morning chess tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Sunday morning chess tactic

Test yourself with Svidler

Here is the link to the actual game Peter Svidler vs Peter Leko
Originally posted by SusanPolgar here: Test yourself with Svidler

April 25, 2009

Overnight Chess Tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Overnight Chess Tactic

April 23, 2009

Overnight chess tactic

Originally posted by SusanPolgar here: Overnight chess tactic

April 22, 2009

Earth day chess tactic

Originally posted by SusanPolgar here: Earth day chess tactic

Wednesday morning tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Wednesday morning tactic

A beautiful win could've been more beautiful

Here is the link to the actual game Boris Gelfand vs Pavel Eljanov

April 21, 2009

Six Must-Have Features of a user-friendly Chess Viewer

The following game (and the excellent annotations) was originally found here

A wooden chessboard and pieces is all we need in order to enjoy an exciting game of such quality. If we want to study and begin to understand comprehensive analyses like these, however, we are going to need as much help as we can get from the chess viewer software. Here are few features that can make a big difference:

  • Consistent navigation through variations and especially variation's branching points (BPs, where we split into alternative lines). Keeping track of BPs becomes quite tricky after branching into several levels of variations. Simply pressing the "Home" key (even multiple times) or using the powerful "Variations Navigator" (top of the board) will save you the trouble of guessing (to practice it drill down into this Variation at > 16... Bf6 > 19... Ne5 > 20. Nd5+ > 22... Ng6 line);
  • While in deeply branched variations the following will be very helpful. You can directly step out to the mainline (with a single click) and replay the entire most recent line (with the right-arrow key or even auto-replay with F9). Notice that you won't have to recall nor choose any moves at the BPs because the chess viewer, by default, automatically selects the most recent ones;
  • Annotations are context sensitive, which means they are only displayed along with the relevant position in the game. The pre-move comments (that precede the very first move of a variation) are supported and usually appear before stepping into the actual variation line. Explore the way they are handled in the variation after 16.f5 (starting with 16…Nf8?) or the one after 30...Ka7 (starting with 31.Qc7);
  • By design, the annotation’s text appears in its own GUI element (a Tab), separate from the actual moves. This way, the information is neatly available (if and when you need it) but it won’t disrupt the game flow (if you feel like ignoring it). In addition, the scoresheet displays annotation indicators (small “A” symbols) that makes locating a particular comment easier;
  • The support for "null" move (shown as "- - -"). The advantages of such moves can be seen in the variation after 23.Ne2 (which explains the 24.Rc7+ threat) or the one after 30...Ka7 (which explains the power of white's closing move 31.Qc7);
  • The movetext GUI element uses the concept of dynamic scoresheet which displays only the line you're exploring at any given moment. This structured approach is very different from the more conservative, paper-oriented GUI style where all of the variations and annotations are visible all the time (e.g. the original link). If you compare these two, you'll be bound to agree that the look-and-feel of chess magazine's approach fails to impress in the new Web 2.0 world.

In conclusion, with the great help of computers today’s game analyses are getting much deeper and of higher quality than ever. Therefore, the ability to efficiently navigate through a complex tree of varia­tions has become a standard requirement for a modern Chess Viewer.

If you’re looking for a Web based chess GUI, you should be ready to do some testing using PGN games with many variations and annotations. Compare what is displayed by the chess viewer against the original PGN text and make sure nothing’s missing. In other words, PGN specification should be fully supported. Depending on your goals, you might also double-check the “user-friendly” claims. If you do so you will certainly be rewarded later when you post your own analyses.

Here are some examples of putting these features to good use:

Wayne’s MY WORLD blog A well balanced mixture of computer assisted and human made analyses with annotations which provide reasons and principles.
Very Instructive Endgame Fairly deep and complete analyses begin after 44.Kf2

Tuesday chess tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Tuesday chess tactic

April 20, 2009

Monday night chess tactic

Originally posted by SusanPolgar here: Monday night chess tactic

Scholastic chess tactic

Originally posted by SusanPolgar here: Scholastic chess tactic

An amazing checkmate in 2

Originally (Source: The Washington Post) posted by SusanPolgar here: An amazing checkmate in 2

US Champion's chess tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: US Champion's chess tactic

April 19, 2009

Birthday tactic by Chess Today

Here is the link to the actual game Zsuzsa Polgar vs Zoltan Varga
Originally (Source: ChessToday.net) posted by SusanPolgar here: Birthday tactic by Chess Today

April 18, 2009

Saturday morning chess tactic

Here is the link to the actual game Walter Shipman vs Arpad Elo
Originally (Source: ChessToday.net) posted by SusanPolgar here: Saturday morning chess tactic

April 16, 2009

Thursday morning chess tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Thursday morning chess tactic

April 14, 2009

20 second challenge

Originally (Source: ChessToday.net) posted by SusanPolgar here: 20 second challenge

April 13, 2009

Monday afternoon chess tactic

Originally posted by SusanPolgar here: Monday afternoon chess tactic

April 12, 2009

Rapid fire chess tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Rapid fire chess tactic

April 11, 2009

Brain Challenge

Originally posted by SusanPolgar here: Brain Challenge

April 9, 2009

Solve in 45 seconds

Originally posted by SusanPolgar here: Solve in 45 seconds

April 8, 2009

Wednesday morning chess tactic

Originally posted by SusanPolgar here: Wednesday morning chess tactic

April 7, 2009

Solve in 30 seconds

Originally posted by SusanPolgar here: Solve in 30 seconds

April 6, 2009

Can you find the best line in less than 2 minutes?

Originally posted by SusanPolgar here: Can you find the best line in less than 2 minutes?

Can you solve this in 60 seconds?

Here is the link to the actual game Evgeny A Levin vs Artyom Timofeev
Originally (Source: ChessToday.net) posted by SusanPolgar here: Can you solve this in 60 seconds?

April 5, 2009

Can you solve it in 20 seconds?

Originally posted by SusanPolgar here: Can you solve it in 20 seconds?

April 4, 2009

Solve in 60 seconds

Frankly, if you're not absolutely sure keep thinking after the minute's up. You will enjoy it. Originally (Source: ChessToday.net) posted by SusanPolgar here: Solve in 60 seconds

Overnight chess tactic

Originally posted by SusanPolgar here: Overnight chess tactic

April 3, 2009

Lightning quick tactic

Originally posted by SusanPolgar here: Lightning quick tactic

TGIF chess tactic

Originally posted by SusanPolgar here: TGIF chess tactic

April 2, 2009

Find the best continuation

Originally posted by SusanPolgar here: Find the best continuation

Flash tactic

Originally (Source: ChessToday.net) posted by SusanPolgar here: Flash tactic

April 1, 2009

Four checkmates in four missed

Here is the link to the actual game Aron Nimzowitsch vs Systemsson

Classic chess

Here is the link to the actual game Max Euwe vs Frederick D Yates
Originally posted by SusanPolgar here: Classic chess