copy of which is in chess-by-blog.php).
when you edit or write a new post.
board.
seven required tags of Portable Game Notation.
board.
Static, non playable board
静态非游戏板 p>
A static, non playable board can be created by leaving the
可以通过放置
来创建静态的,不可玩的棋盘
“WordPress ID” blank and by inserting algebraic move notation in
“ WordPress ID”为空白,并在
中插入代数移动符号
the Movelist field.
移动列表字段。
Note that for speed reasons, the input
请注意,出于速度原因,输入
(particularly pawn moves) isn’t fully error checked by the
(尤其是典当行进)没有完全被
检查过错误
client code.
客户代码。 p>
li>
Playable, non-persistent board
可玩的非持久性棋盘 p>
An interactive, non-persistent board can be created by leaving the
可以通过保留
来创建一个交互式的非持久性板
White and Black players at the default (i.e. “*”).
默认为白色和黑色播放器(即“ *”)。
Algebraic move
代数移动
notation can be optionally inserted in the move text to set up the
可以选择在移动文本中插入符号来设置
board.
板。
Note that when the board is played interactively, full
请注意,以互动方式播放棋盘时,完整
validation of each move is performed.
验证每个动作。
This mode is ideal for
此模式非常适合
presenting chess problems that can be worked through by readers.
展示国际象棋问题,读者可以解决。 p>
li>
Playable, persistent board
可玩的持久棋盘 p>
An interactive and persistent board can be created by selecting
通过选择
可以创建一个交互式且持久的面板
blog users for the White and Black players.
白人和黑人玩家的博客用户。
These should
这些应该
correspond to the usernames of users of your blog who have at
对应于您的博客用户的用户名,该用户名位于
least Subscriber Roles.
最少的订户角色。 p>
li>
ul>
Alternately, you can forego the usage of the Quicktags button and
或者,您也可以放弃使用“快速标签”按钮和
insert PGN directly, enclosed in “div class=”CBB-board” tags.
直接插入PGN,并用“ div class =” CBB-board”标签括起来。
The
client code will treat standard PGN as a static, non playable
客户代码会将标准PGN视为静态的,不可播放的
board.
板。
Playable boards can be created by inserting [CBBWhiteId] and
可以通过插入[CBBWhiteId]和
来创建可玩的棋盘
[CBBBlackId] PGN tags with values as described above.
[CBBBlackId]具有如上所述值的PGN标签。 p>
PGN support
PGN支持 h3>
Chess By Blog fully supports the seven standard PGN tags.
Chess By Blog完全支持七个标准PGN标签。
Comments
评论
enclosed with curly braces are preserved, and will be shown at the top
保留了用大括号括起来的内容,并将显示在顶部
of the game log table when the corresponding move is highlighted.
突出显示相应动作时的游戏日志表的位置。
In
在
addition, the FEN and JsCom (only the “startply” command is
此外,FEN和JsCom(只有“ startply”命令是
recognized) tags are both supported, allowing specification of the
公认)标记均受支持,从而允许指定
initial board layout.
初始电路板布局。
As an example of the JsCom tag, specifying
作为JsCom标签的示例,指定
[JsCom “startply 5”]
[JsCom“开始5”]
will preposition the board after White’s 3rd move.
将在White的第3步之后预先放置木板。 p>
Chess variant support
国际象棋变体支持 h3>
Chess By Blog fully supports FEN (Forsythe-Edwards Notation) via the
Chess By Blog通过
完全支持FEN(福赛斯·爱德华兹符号)
“FEN” tag in PGN.
PGN中的“ FEN”标签。
This allows specification of the initial board
这样就可以指定初始板了
layout.
布局。
It also allows for handling of some chess variants.
它还允许处理某些国际象棋变体。 p>
Fischer Random Chess (or Chess960) is directly supported.
直接支持Fischer随机象棋(或Chess960)。
The initial
初始
layout of the pieces must be specified via a FEN tag.
作品的布局必须通过FEN标签指定。
Castling is
卡斯特是
supported correctly for this variant.
此变体已正确支持。 p>
Capablanca chess is directly supported.
直接支持卡帕布兰卡象棋。
The layout of the board must
电路板的布局必须
be specified via a FEN tag, using “A” or “a” for the Archbishop and
通过FEN标签指定,对大主教使用“ A”或“ a”,
“C” or “c” for the Chancellor;
校长为“ C”或“ c”;
a 8×10 piece layout must be specified
必须指定8×10的版式
as well.
也是 p>
There is limited support for arbitrary board sizes.
对任意板尺寸的支持有限。
Castling is
卡斯特是
handled by always moving the King to the ‘c’ file if castling on the a
通过将国王(如果在a
上滚动)始终移动到“ c”文件来处理
side, or the file to the left of the rightmost file if castling on the
侧面,或者如果在
上滚动,则位于最右边文件的左侧
other side;
另一边;
the Rook is always moved to the inner square.
白嘴鸦总是移动到内部正方形。
This
这个
supports Fischer Random Chess and Capablanca Random Chess, but does
支持Fischer随机象棋和Capablanca随机象棋,但是支持
not support other variants.
不支持其他变体。
In addition, en passant always assumes the
另外,passant始终假定
pawns start on the 3rd rank.
兵从三级开始。 p>
Customization
自定义 h3>
The look of the client side code is controlled by themes, which live
客户端代码的外观由实时控制的主题
under chess-by-blog/themes.
在国际象棋/主题下。
A new theme can be created by adding a
可以通过添加
来创建新主题
subdirectory which contains at least a file named “ChessByBlog.css”.
子目录,至少包含一个名为“ ChessByBlog.css”的文件。
This style sheet should contain the same classes as shown in the
该样式表应包含与
所示相同的类。
default theme.
默认主题。
In addition, there is a requirement that the CBB-square
此外,还要求CBB平方
and CBB-button contain width, height, and min-height attributes with
和CBB按钮包含带有
的width,height和min-height属性
explicit pixel sizes.
显式像素大小。
The client side code needs these in order to
客户端代码需要这些以便
correctly infer the sizes of chessboard squares and buttons.
正确推断棋盘正方形和按钮的大小。 p>
Building the client side code
构建客户端代码 h3>
This step is optional, but if you need to make fundamental changes to
此步骤是可选的,但是如果您需要对
进行基本更改,
the code that can’t covered by changes to CSS, you’ll need to edit
CSS更改无法涵盖的代码,您需要进行编辑
the Java source files in src/org/levork/gwt.
src / org / levork / gwt中的Java源文件。 p>
The client side code is Javascript which lives in the chess-by-blog
客户端代码是Javascript,该Javascript位于博客中
subdirectory, compiled from Java using the Google Web Toolkit.
子目录,使用Google Web Toolkit从Java编译。
To
致
build this yourself, you will need to have the Google Web Toolkit
自己构建它,您将需要使用Google Web工具包
installed (at least version 1.7), after which the entire src directory
已安装(至少为1.7版),之后是整个src目录
can be copied into your Google Web Toolkit folder.
可以复制到您的Google Web Toolkit文件夹中。
It is then
然后是
recommended that you run
建议您运行 p>
webAppCreator -ignore org.levork.gwt.client.ChessByBlog
webAppCreator-忽略org.levork.gwt.client.ChessByBlog p>
This will create the build.xml script necessary to compile using
这将创建使用以下代码进行编译所需的build.xml脚本
ant.
蚂蚁。
Running ‘ant build’ will compile the project into the
运行“ ant build”会将项目编译为
subdirectory war/chessbyblog.
子目录war / chessbyblog。
The files with cache in their name are
名称中带有缓存的文件是
the Javascript files;
Javascript文件;
these go in wp-content/plugins/chess-by-blog
这些进入wp-content / plugins / chess-by-blog
(and the old ones should be deleted, most of them will have different
(而且旧的应删除,大多数将具有不同的
names).
名称)。 p>
Known issues
已知问题 h3>
- Switching from the code to visual editor may wreak havoc on the
- 从代码切换到可视化编辑器可能会对
造成严重破坏div tags, despite the tags being protected by pre tags.
div标签,尽管标签受pre标签保护。
This is an
这是
issue with the visual editor.
视觉编辑器出现问题。 li>
- Internet Explorer may have issues with the preview of new themes in
- Internet Explorer可能在预览新主题时出现问题
the management panel.
管理面板。 li>
- There are some broken themes out there that will not work with this
- 有一些破碎的主题不适用于此
plugin.
插入。
In particular, if the theme does not make a call to
特别是如果主题没有调用
wp_footer() in footer.php, the Chess By Blog plugin will not be able
footer.php中的wp_footer(),将无法使用Chess By Blog插件
to emit the necessary lines of HTML that invoke the Javascript
发出调用Javascript的必要HTML行
code.
码。
(That theme may also break other plugins, and is definitely a
(该主题可能还会破坏其他插件,绝对是一个
theme bug.) You may be able to fix this by inserting the necessary
主题错误。)您可以通过插入必要的
来解决此问题
wp_footer() call in the theme directory?s footer.php yourself ?
wp_footer()自己调用主题目录中的footer.php吗?
try
尝试
inserting:
插入: p>
at the beginning of the file.
在文件的开头。 li>
ul>