Closed yo35 closed 7 years ago
Hi,
The plugin is mostly based on JavaScript code, that is possible to re-use out of the WordPress environment. However, this JavaScript code is not as documented as a true standalone library should be (I have no time for that), but as a programmer you may be able to find out a way to make it work for what you want. Here are some entry points:
To create a chess diagram, you need:
js/uichess-chessboard.js
and the JS libs mentioned in the header of this file,css/uichess-chessboard.css
css/sprite/*.png
Then you can insert a diagram in your page as follows:
$('#someDiv').chessboard({
position: 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1',
squareSize: 40
});
To create a full chess game, you need in addition:
js/uichess-chessgame.js
and the JS libs mentioned in the header of this file,css/uichess-chessgame.css
Then you can insert a diagram in your page as follows:
$('#someOtherDiv').chessgame({
pgn: 'the PGN text that encodes your game',
navigationBoard: 'frame'
});
These examples do not present in a comprehensive manner what is possible to do. You may find several other display options by looking at the JavaScript code itself.
Cool.
(Yo35 ... Looks like you're a very busy person. This one should be closed as well )
RNunez67 said: