這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

pgn-viewer-for-lichess

外掛說明

Integration of lichess-pgn-viewer into WordPress.

Using Shortcodes

To use a shortcode, do the following steps:

  1. Enter on a new element /shortcode.
  2. Enter inside the element then the shortcode including the content of the following sections.

Basic View

 [lpgnv]1. e4 e5 2. ...[/lpgnv]

This is the lichess-pgn-viewer: allows to play through a game (including variations), printing the comments, NAGs, …

Using Block Level Element

NOT IMLEMENTED YET

You can use instead the following:

  1. Enter as block element /PGN Viewer for Lichess.
  2. You will then have a form with all options that are possible with the shortcode as well.

螢幕擷圖

適用於區塊編輯器

這個外掛提供 1 個可供區塊編輯器使用的區塊。

  • Lichess Pgn Viewer Block Editor

安裝方式

  1. Upload the plugin files to the /wp-content/plugins/plugin-name directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.

常見問題集

What parameters are available?

The parameters the viewer understands are:

  • The content of the shortcode is the PGN itself. The viewer reads a lot from tags included there.
  • Additional attributes for the shortcode are:
    • fen: , default undefined.
    • boardstyle: , default ‘green’, available ‘blue’, ‘wood’.
    • orientation: , no default, then taken from tag Orientation. Possible values ‘white’ or ‘black’.
    • showclocks: , default true.
    • showmoves: <string|boolean>, default ‘auto’, others ‘right’, ‘bottom’, false. bottom is the same as false, and does not show the moves.
    • showcontrols: , default true.
    • scrolltomove: , default true.
    • keyboardToMove: , default true.
    • theme: , default dark, others are ‘light’, ‘solarizeddark’ and ‘solarizedlight’.
    • initialply: , default 0, shows the position after the initialPly move. Only main lines allowed.

The following code shows how to use some of the parameters in a page:

[lpgnv orientation=black theme=light]1. e4 e5 2. Nf3 Nc6[/lpgnv]

Where can I find more information about the implementation?

Have a look at the GitHub repository https://github.com/mliebelt/pgn-viewer-for-lichess and look there at the file package.json to get hints how to develop the plugin then.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈pgn-viewer-for-lichess〉的開發相關工作。

參與者

將〈pgn-viewer-for-lichess〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

= 1.1.0

  • Added block editor with all possible attributes as widgets.

= 1.0.5

  • Added themes solarizeddark and solarizedlight.

= 1.0.4

  • Renamed the plugin to meet the requirements of WordPress.

= 1.0.3

  • Added (light) theme to the configuration, to allow users to have a more light visual representation.

= 1.0.2

  • Added some more attributes for ocnfiguration: fen, showclocks, showmoves, showcontrols, scrolltomove, keyboardtomove
  • Some documentation, more boardstyles: green, blue, wood, metal, newspaper.

= 1.0.1

  • Fixed problem with influences to PgnViewerJS-WP (my other chessground-based plugin)
  • Try to get PGN as good as possible.

= 1.0.0

  • First working version, with some flaws. Not published.