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.
DylanDog said,
December 29, 2007 @ 12:17 am
Hello, sorry to use this comment to advise I have problems with the installation of your pgn viewer, I am just creating a chess blog and would like to use your viewer but I cannot get it working. I can activate it but the games simply do not appear.
DylanDog said,
December 29, 2007 @ 12:24 am
this is the text I have posted here(http://www.smolinari.com/chessblog/?p=12):
Test:
###pgn### 1. d4 d6 2. Qd1d3 Bc8d7 3. Bc1f4 a5 4. g3 Nb8a6 5. e4 c5 6. c3 e5
7. dxe5 dxe5 8. Bf4xe5 Ng8h6 9. Qd3f3 Bf8e7 10. Be5xg7 Nh6g4 11. Bg7xh8 Qd8b6
12. Bf1c4 f6 13. b3 Ng4e5 14. Qf3h5 Ne5g6 15. Qh5xh7 Ng6xh8 16. Qh7xh8 Be7f8
17. Nb1a3 Qb6c6 18. O-O-O Qc6xe4 19. Ng1f3 Qe4xf3 20. Rh1e1 Bd7e6
21. Re1xe6 Ke8f7 22. Qh8h7 Bf8g7 23. Rd1d7 Kf7f8 24. Qh7xg7 1-0 %%%pgn%%%
Feel free to remove both posts.
DylanDog said,
December 29, 2007 @ 12:35 am
Hallo Thomas, I saw you removed my comments, this will be the last one: I have found the bug, your PGN Viewer does not like one of the following: 23. Rd1d7 Kf7f8 24. Qh7xg7…because if I remove them from the pgn the the viewer works. Gute Arbeit…mach weiter so!
toomasr said,
December 29, 2007 @ 1:47 pm
Sry, I have not removed any comments. I just have to approve comments before they appear.
I will check your problem tonight as at the moment I’m away without my laptop.
DylanDog said,
December 29, 2007 @ 5:50 pm
No problem tomasr, I like your tool, any way i can make some suggestion? For example would be nice to have the comments just below the moves, on the right bottom part of the viewer, ideally the comment should appear when the move has been selected. Keep up the good work!
DylanDog said,
January 4, 2008 @ 4:39 pm
I have tried to answer to your email but your email address is not working.
Your pgn viewer works fine now. I think it was a problem just related to the game I have posted here on December 29th, 2007 at 12:24 am
Please take into account the feature of showing annotation just below the moves -> you click on a move and the annotation appears…
DylanDog
toomasr said,
January 7, 2008 @ 8:50 am
I like the idea. I’ll try to whip up something soon and I’ll let you know.
I was thinking that maybe a hovering region when you hover on the move text.
And when you click on it, it will remain somewhere until you click a next one.
DylanDog said,
January 8, 2008 @ 1:30 pm
I do not think the hover is a good idea but it is up to you to decide. What I would like is the annotation to be showed under the moves when clicking on the “next move” or “prevoius move” buttons, on this way you can clearly view the board and the comment to that move. If a move has no comments then notes should be cleared.
DylanDog said,
January 10, 2008 @ 7:35 pm
Have a look at the project page in google, I have added an issue concerning the NAG. Cheers!
Toomas Römer said,
January 13, 2008 @ 1:09 pm
Thank you for the bug report. I have released 0.6.2 which includes the fix.
e said,
January 29, 2008 @ 10:56 pm
I’ve integrated the pgn viewer but i’m not much of a code writer so forgive me if this is too simple a question. Can I work FEN into the code so as to set up and show portions of games?
toomasr said,
January 29, 2008 @ 11:42 pm
Sure. Include the FEN in the header of the PGN. Like this: [Site “Some site”]
[Date “Some Date”]
[FEN “r1b2k1B/pppp3p/2n2p2/8/3N2nq/1QP3bN/P2PP1Bp/R4K1R b - - 0 14″]
[PlyCount “21″]
LOmiG said,
March 18, 2008 @ 6:44 pm
hi,
thnaks for this great plugin !
i tried it a few minutes ago, and it doesn’t seem to work on my blog (http://www.blomig.com).
Do i have to declare some stuff in the header ?
I moved the …/wp-content/plugins/pgnviewer/pgnviewer folder to …wp-content/ ; is it correct ?
thanks
Toomas Römer said,
March 18, 2008 @ 7:02 pm
This is correct, I see that the images are in the correct place (http://www.blomig.com/wp-content/pgnviewer/). It seems that you are using Yahoo export format and not the PGN format. There are yahoo to pgn converters out there. Currently the jsPgnViewer supports only the PGN format.
http://www.douglassdavis.com/pgnchess2006/
http://www.geocities.com/pgnchess2004/
http://www.baydsoft.com/yahoochess/default.asp?p=download
LOmiG said,
March 27, 2008 @ 12:25 pm
Thanks for your answer…i will try with a “clean” pgn file…and i’ll tell you.
regards.
LOmiG said,
March 27, 2008 @ 12:44 pm
Hi,
i pasted a correct PGN file, and it still doesn’t work. Sorry for being dum !
if you know another way of solving my problem, thanks a lot !
Toomas Römer said,
March 31, 2008 @ 7:14 pm
Hi
I think you got it to work, your page is showing a game:
http://www.blomig.com/2008/03/18/pgnviewer-affichez-vos-parties-dechecs-sous/
Let me know if you still have any problems…
Rook House said,
May 1, 2008 @ 11:59 pm
I love the viewer, very nice work!!
I have also been speaking very highly of you and your product: http://www.rookhouse.com/blog/?p=189
All My Best,
Kevin Marchese
http://www.rookhouse.com
http://www.rookhouse.com/blog
Toomas Römer said,
May 2, 2008 @ 10:45 pm
Thanks Kevin