DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:pgn4web

This is an old revision of the document!


pgn4web Plugin

Compatible with DokuWiki

Ponder Stibbons, Hrun, Detritus, Elenor Of Tsort

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

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with chess, pgn

pgn4web displays PGN in the nice interactive pgnviewer from http://pgn4web.casaschi.net. As a special feature, i made it mobile friendly.

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: 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.1491051457.txt.gz · Last modified: 2017-04-01 14:57 by arlt

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki