====== Chessdiagram ====== ---- plugin ---- description: Format a chess board using FEN notation or an alternative 8x8-layout author : Michael Arlt email : michael.arlt@sk-schwanstetten.de type : syntax lastupdate : 2008-02-24 compatible : 2006-11-06, 2007-06-26b depends : conflicts : similar : tags : game, chess, fen, diagram ---- ===== Description ===== Chessdiagram converts FEN notation or an alternative 8x8-layout to a chessdiagram using HTML with 8x8 images. The syntax can be localized - completely. English and german is available. ===== Thanks to ... ===== To achieve this i embedded php code from vyvy at [[http://www.vyvy.org/]] which completely renders the chessdiagram. The rest was simply a plugin template extended with the localization features and optimizing the chess images. Many thanks to this really great plugin. Further information is available on the [[http://www.vyvy.org/blogs/index.php/2006/06/15/chessboard_plugin_for_b2evolution|original website]]. It was primarily developed for b2evolution. ===== Syntax ===== Copy the FEN syntax between or simply add an 8x8 ascii board with the english abbreviations (kqrbnp). You can add advanced options with "(flags)" before the chessdiagram (in both variants). Flags can be: * Borders: T B L R for top, bottom, left and right borders * Number of fields (width): positive integer * Colour of upper left corner: l d for light(white) or dark(black) Fields can be marked with the character "x". In the german translation TBLR can be achived with OULR (oben, unten, links, rechts) and "w" or "s" is used instead of l or d (weiss, schwarz). It is up to the administrator of your site. ==== English version (default installation) ==== # FEN 7k/6p1/3r1pPp/pp2pP2/2p1P1R1/2P1q3/PQ4RK/3r4 # Alternative 8x8 version r---k--r -q---ppp p---p--- --b-P--- p--N-Q-- P------- -PP---PP ---R-R-K # options: light(white) corner in the upper left, 4 columns, borders top, bottom=unten, right (l4TRB)3k/4/4/4/4/4/2R1/3R ==== German version (default installation) ==== # FEN - only the start- and endpattern is localized 7k/6p1/3r1pPp/pp2pP2/2p1P1R1/2P1q3/PQ4RK/3r4 # Alternative 8x8 version - even the figures are localized (you decide) t---k--t -d---bbb b---b--- --l-B--- b--S-D-- B------- -BB---BB ---T-T-K # options: white corner in the upper left, 4 columns, borders top=oben, bottom=unten, right=rechts (w4ORU)3k/4/4/4/4/4/2R1/3R ===== Localisation ===== $lang['kwpattern'] = 'schachdiagramm'; // Your Wikisyntax for chessdiagram (german example) $lang['kwpieces'] = 'kdtlsbKDTLSBT'; // Your Wikisyntax for king, queen, rock, bishop, knight, pawn // Lower case is black upper is white $lang['kwoptions'] = 'OULRws'; // Your Wikisyntax for top bottom left right white black - concerns options in () ===== Screenshot ===== {{http://it-arlt.de/plugins/chessdiagram.png|This is a screenshot of the first FEN diagram above.}} {{http://it-arlt.de/plugins/chessdiagram2.png|This is a screenshot of the second FEN diagram above.}} ===== Download / Installation ===== Install the [[http://it-arlt.de/plugins/chessdiagram.zip|current release]] with the plugin manager. ===== Adding a button to the toolbar ===== I included a folder "toolbar" with an image and a localized diff for the toolbar.php. * mv chessdiagram.png to lib/images/toolbar * inc/toolbar: * make a backup of this file * add one of the diffs to this file * cleanup cache ===== Change History ===== ==== 2008-02-24 ==== * Added security (thanks to Andy Webber) ==== 2007-10-18 ==== * Removed FEN diagnostic output ==== 2006-11-16 ==== * Second public release - Mea culpa! :-) * Path-through of code to the forgotten features of the original php implementation -> additional features: * Mark fieds * Draw only parts of a diagram ==== 2006-11-15 ==== * First public release * All desired features of the author are implemented * Embedded version 1.0 of chessboard from vyvy ===== License ===== This product is released under the [[http://www.gnu.org/licenses/gpl.html|GPL 2]] ===== Discussion ===== Is there an easy way to suppress the FEN notation? In the standard installation, the string describing the boardis always displayed before the board! --> download the new release