Use Chess.com PGN Viewer in WordPress Blog

Sort:
mliebelt

I would like to use the excellent PGN Viewer of Chess.com inside our chess club WordPress Blog. I have extracted parts of it (HTML, CSS, some JavaScript), but I only get the rendering, not the playing part of it.

So I have 3 questions:

  • Is there (technically) a possible solution to use a PGN file as input, and get as output the same rendering and playing options like the Chess.com PGN viewer?
  • Are there any legal aspects here, so if this would technically work, am I allowed to use it?
  • If not, who should be asked to get the allowance?
I even would implement a WordPress plugin and make it public (with of course a reference to Chess.com), so that should be a win - win situation Smile
kleelof

YOu don't have to hack apart their board. You can use this really good app:

http://chessboardjs.com/

If you look at the examples, it shows you you can use the app at:

https://github.com/jhlywa/chess.js

To allow for playing and displaying PGN files.

If you need any further help, let me know I have worked both of these already.

mliebelt

Well, ChessboardJS is impressive, but it is (only) a library to build your own PGN viewer. I would like to use as much as possible already ready to use, only add a little bit CSS, layout, ... here or there. Will give it a try, and see if I find a simple (Javascript) solution to embed that library.

That sound like a nice holiday project ...

kleelof

What features exactly do you want? The hardest part is covered by the chssboard.js and chess.js apps.

The rest is probably pretty easy to develop.

mliebelt

The features I want are:

  • Add (only) valid PGN game, extracted direct by ChessBase or Scid.
  • Play through the moves by
  • - clicking on a move (jump to that position)
  • - playing through the main line by pressing "Play"
  • - playing move by move by using "Next" and "Prev" buttons
  • Rendering of moves in a nice format, changeable by CSS

But I will give it a try, invest some hours, and will see, if I can implement something usable.

aadchesskid

@ kleelof: please tell more about using chess.js on blogger

thank u

 

This site has no rating
mliebelt

Some months later, I have done my home work (if anyone cares):

I hope I will finish the WordPress part soon, at least that it is usable in our chess club (WordPress) web site. 

If anyone is interested, I would be glad to share what I have learned the last months ...

crystalclear

I just use a standard wordpress plugin to display chess games on my club's blog.

[pgn and options]

(contents of PGN file here)

[/pgn]

kleelof

Hey, your app looks great. I've been looking for an extension to the chess.js and chessboard.js apps that have these features.

Thanks for your work.