Archive for December, 2007

jsPgnViewer WordPress Plugin 0.6.1 released

I got excellent bug reports from Jan, providing PGN files that were not working with jsPgnViewer. I launched them in my test environment and no errors. I tried in a WordPress installation. Sometimes they worked and sometimes not. It boiled down to couple of “features” of WordPress and tinyMCE:

  • There is a HTML entity for “…”. The “…” is used to denote black to move, e.g. 43… Ra8 in PGN files. Well, WordPress editor thinks that the three dots should be replaced by the entity for no apparent reason. Thus parsing broke.
  • When pasting games to the WordPress editor and saving the blog post, WordPress or tinyMCE thinks its pretty cool to shuffle the <pgn> tags around a bit and add one extra just to be sure. Well, this breaks the regexes that expect the tags to be intact.

What about a solution? The first problem is easily fixed by the new version of the plugin, which replaces the entity back. The second problem is addressed by letting users use ###pgn## # (three prefix and suffix # marks, the space is because I have the plugin installed) to denote the start of a PGN game and a %%%pgn%% % to denote the end of a PGN game. tinyMCE or WordPress does not shuffle does around, yet.

Comments (19)

jsPgnViewer 0.6 released

A issue was reported that certain FEN combined with some moves produced no board. This issue fixes this. Also themes added in the meantime have been bundled with the release. The default WP theme has changed to Zurich. Here is a sample:

Head off to the downloads section and grab 0.6 and to the issues list to add feature requests. Chesspastebin.com has also been updated with the latest version.

Comments off