Your admin chess editor
In this article, I’m going to show you the main details of the online game editor.
In wp admin, select DHTML Chess->Game editor to open the editor
You will then enter this page:
To the left you will find three tabs, Drafts, Databases and Games. This is the navigation area. The navigation area can be collapsed by clicking on the active tab. You can navigate between tabs by clicking on them. If the navigation panel is collapsed, it can be expanded by clicking on a tab.
You can also resize the navigation panel by dragging the handle to the right.
The Drafts tab
The Drafts tab shows a list of your unpublished games, ie your work in progress. When you open the editor, you enter draft mode. At the bottom right corner of the screen you will find two buttons:
The Save Draft button is used to save changes to your draft. Once a draft is saved, you will find a new Discard button at the bottom right corner. If you decide to delete a draft, click the discard button.
When you’re ready to publish a game, you click the Publish Button. This will open a dialog asking you to select which database to save the game in:
Select a database and click OK.
The database tab
The database tab shows you a list of your databases. A database is a collection of games, like a pgn. A database can be created manually from the editor as seen below or by importing a PGN. When a PGN is imported a new database is created containing all the games of that PGN.
Each database in the list contains some basic information about the database. The most important is the ID inside the blue bubble to the right. This is the id you’ll use in your short tags, example: [chess db="7"] to show a game viewer where your users can select from all the games in the 100 Fantastic Games database.
At the top of the page, you'll have a New Database button. If you want to create a new database manually, click this button. This will present you with this dialog:
Here, enter a name of your new database and click OK. The new database should then be displayed in the list.
If the list of databases get's too large for you, you can decide to archive the database you don't use much.. Archived databases are still visible to your users, but they are hidden from the editor. To archive a database swipe right on the database entry in the list. An archived database can be made active again from the Archived Database menu in wp admin.
When you click on a database in the list, you will open the third tab, the Games tab.
The Games Tab
Here, you'll find a list of all the games in the selected Database. You can filter the list by using the Search text box.
From here, you can also rename a database by clicking the pencil button at the top right corner.
To show/edit a game, click on the game in the list.
The Game Editor
This is the game editor. At the top you will see some details about the game. In the top right corner, you can see the game id inside a blue bubble. This is also an id you'll use in your short tags, example:
[chess game="2" tpl="5"]
To display this games using the fifth game view template.
The board is implemented with drag and drop features so that you can editor your games online. Below the board you'll find some navigation buttons. You can also navigate by clicking on the moves in the notation panel at the bottom.
At the bottom, you'll have 4 tabs
- Notations - The moves in the game
- Annotate - Annotation of current move
- Computer Eval - Stockfish JS analysis
- Metadata - Panel for editing metadata like white, black, result, site, date etc.
The Notation Tab
From the notation panel, you can navigate to the different moves of the game. By right clicking(context menu) on a move, you can also do some basic operations like deleting moves, annotate or grade moves(!,?,!!, ?? etc).
The Annotate Tab
From the Annotate Tab, you can annotate the move currently displayed on the board:
The Computer Eval panel
The computer eval below gives you the opportunity to analyse the position on the board using the StockfishJS chess engine. The chess engine runs in your browser, so no installation is required for this to work.
At the top of the computer eval panel, you will find a bar visualising the computer eval. Below, you will find computer eval.
At the bottom, you will find three buttons. The first one is used to stop and start the engine.
The Append line button is used to append current computer eval to the game as a variation.
The third button adds the evaluated score as a comment.
The Metadata tab
The last tab is for Game metadata. Here you enter basic game information like who's playing white, black. What the score was and when and where the game was played.
One important note here is that if you want to display a tournament view on your web site, ie. a view where the plugin shows a calculated tournament standing, you'll have to be careful to spell the player names the same way for all the games. The plugin uses the name as a key when calculating the tournament standings.