DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:pgn4web

pgn4web Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" yes

plugin Chess games viewer, displays chess games notated in PGN in a nice interactive way

Last updated on
2016-07-24
Provides
Syntax
Repository
Source

Tagged with chess, pgn

pgn4web displays PGN in the nice interactive pgnviewer from http://pgn4web.casaschi.net

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

See the plugin in action here (demo page). The sample page shows the plugin with all default settings but in german. English is the default language.

The PGN notation is embedded in <pgn>…</pgn>. The default example (available through a button in the editor toolbar):

<pgn>
[Event "IBM Kasparov vs. Deep Blue Rematch"]
[Site "New York, NY USA"]
[Date "1997.05.11"]
[Round "6"]
[White "Deep Blue"]
[Black "Kasparov, Garry"]
[Opening "Caro-Kann: 4...Nd7"]
[ECO "B17"]
[Result "1-0"]

1.e4 c6 2.d4 d5 3.Nc3 dxe4 4.Nxe4 Nd7 5.Ng5 Ngf6 6.Bd3 e6 7.N1f3 h6
8.Nxe6 Qe7 9.O-O fxe6 10.Bg6+ Kd8 {Kasparov schüttelt kurz den Kopf} 
11.Bf4 b5 12.a4 Bb7 13.Re1 Nd5 14.Bg3 Kc8 15.axb5 cxb5 16.Qd3 Bc6 
17.Bf5 exf5 18.Rxe7 Bxe7 19.c4 1-0
</pgn>

Result

This is a screenshot of pgn4web

Syntax

Be sure to use correct PGN notation (Portable Game Notation Specification and Implementation Guide. Normal chess software should fulfill this requirement.

If you have multiple games in the PGN section, you can select the games:

This is a screenshot of pgn4web showing the game selection feature

Configuration and Settings

All settings are only configurable in the configuration manager.

Setting Description
set Chess piece set
setsizeportrait Chess piece size in pixel for vertical layout (20-48, 52, 56, 60, 64, 72, 80, 88, 96, 112, 128, 144 or 300 e.g. 52) - in case of scalable chess piece sets (svg) you can use other values, too, but you should deactivate the chess set selection then
setsizelandscape Size in pixel for horizontal layout (e.g. 72)
pluginwidthportrait HTML-width of plugin for vertical layout (e.g. 100%)
pluginwidthlandscape HTML-width of plugin for horizontal layout (e.g. 100%)
font Chess font
textheight HTML-height for game text (e.g. 20em) for vertical layout (e.g. 8em)
infowidth HTML-width for title of game information (e.g. 14ex)
layout Several layout variants for chess board and game text
showsetselect Show chess set selection?
showfontselect Show font selection?
err_instance Only one instance of pgn4web is supported per Wiki-page. If this is a blog, you can open just this artice (maybe by clicking on the heading). If you are the author, you can consider joining all pgn-sections together or using separate Wiki-pages. This is the hint which is displayed to the user.
err_instance_author Additional informations which is displayed to authors for the problem above.

Change Log

  • 2016-07-24
    • Initial release

ToDo/Wish List

I am happy that it works, so it is finished in my opinion. Contributions are welcome.

plugin/pgn4web.txt · Last modified: 2016-07-31 15:28 by ach