Table of Contents
pgn4web Plugin
Compatible with DokuWiki
Ponder Stibbons, Hrun, Detritus, Elenor Of Tsort, Frusterick Manner, Greebo
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
pgn4web displays PGN in the nice interactive pgnviewer from http://pgn4web.casaschi.net. As a special feature, i made it mobile friendly.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Examples/Usage
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
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:
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
- 2018-05-12
- CSS Bugfix in line 54
- 2016-07-24
- Initial release
ToDo/Wish List
I am happy that it works, so it is finished in my opinion. Contributions are welcome.