內容簡介
將 PgnViewerJS 整合到 WordPress 中的外掛。這是圍繞原始的 PgnViewerJS 而建立的一個小層,但為了在 WordPress 中使用它而需要它。最終,它應該提供以下的應用程式介面:
[pgnv]1. e4 e5 2. ...[/pgnv]
這是 PgnViewer(通常需求):允許播放一場遊戲(包括變化),打印評論,NAGs,等等。
[pgne]1. e4 ...[/pgne]
允許編輯和查看一場遊戲。最後,您可以使用 PGN 按鈕來顯示記譜,然後再次將它複製到 WordPress 文章中。
[pgnb fen=<a FEN string>][/pgnb]
僅用於顯示棋盤。
[pgnp]1. e4 e5D 2. Nf3 Nc6D ...[/pgnp]
允許以類似雜誌和書籍的格式打印一場遊戲。為此,PGN 的記譜被擴展了,移動後面帶有 “D”,代表圖表。
有關可用參數的列表,請查看常見問題解答。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Integration of @mliebelt/pgn-viewer into WordPress (formarly named PGNViewerJS).
Using Shortcodes
To use a shortcode, do the following steps:
Enter on a new element /shortcode.
Enterinside the element then the shortcode including the content of the following sections.
Basic View
[pgnv]1. e4 e5 2. ...[/pgnv]
This is the PgnViewer (mostly needed): allows to play through a game (including variations), printing the comments, NAGs, …
Edit Mode
[pgne]1. e4 ...[/pgne]
Allows to edit and view a game. At the end, you may use the PGN button to display the notation, that then may be copied again in the WordPress post entry.
Single Position (or Board)
[pgnb fen=][/pgnb]
Just to display a board (only), no moves. Leave out the pgn, if possible. If pgn is included, it will be checked and has to be correct (but not shown at the end).
Print View
[pgnp]1. e4 e5D 2. Nf3 Nc6D ...[/pgnp]
Allows to print a game in a format similar to magazines and books. For that purpose, the notation of PGN was expanded by the “D” at the end of a move, that stands for the diagram. (Caveat: “D” is currently not working, and leading to an error. See issue #580 about that.)
For a list of available parameters, look into the Frequently Asked Questions.
Using Block Level Element
You can use instead the following:
Enter as block element /PGN Viewer Block Editor, in the variants View, Edit, Board or Print.
You will then have a form with all options that are possible with the shortcode as well.
Depending on the kind of element you want to have, different values are needed:
View: all possible
Edit: same as view
Board: only FEN and layout elements of the board
Print: most not needed.
