# # pgn4web javascript chessboard # copyright (C) 2009, 2010 Paolo Casaschi # see README file and http://pgn4web.casaschi.net # for credits, license and more details # PGN4WEB display chess games on web pages using javascript ABOUT PGN4WEB is a javascript tool showing chess PGN games as a graphical chessboard in websites and blogs. It comes as software package you can to your website or blogsite, but also provides a very simple board generator web tool helping you adding chess games to your website or blog without any html/javascript coding from your side. It has been designed to make it easier adding chess games to your web pages and blogs, without the need of much knowledge of HTML or any other technicality. It also has been integrated with many popular web software platforms and services. *** *** THIS README FILE IS A SUMMARY OF THE PGN4WEB DOCUMENTATION *** MORE EXTENSIVE AND UPDATED DOCUMENTATION IS AVAILABLE *** FROM THE PGN4WEB SUPPORT WIKI REACHABLE FROM http://pgn4web.casaschi.net *** PLEASE RELY ON THE SUPPORT WIKI RATHER THAN THIS README ONLY *** Project homepage: http://pgn4web.casaschi.net (including downloads and wiki) Contact email: pgn4web@casaschi.net Features: - display chess games form a PGN file on a dynamic chessboard on your webpage or blog - shortcut keys for navigating through the game, for selecting the game from the file and much more; also uses chessboard squares as input buttons (hit escape for help) - fully customizable display. Each item (board, button bar, game selection menu, PGN header info, game text, game comment and more) can be displayed (or hidden) at pleasure in your html file - support different chess bitmaps (even custom bitmaps) and different chessboard sizes - provides a very simple board generator web tool helping you adding chess games to your website or blog without any html/javascript coding (see http://pgn4web-board-generator.casaschi.net - integrated with popular blog platforms (such as blogger and wordpress), portal platforms (such as joomla, drupal and wikimedia), forum platforms (such as phpBB, simplemachines and vbulletin) and hosting services (such as google sites) - allows for live broadcast of games Limitations: - variations are displayed as comment, it's not possible to display in the chessboard positions from variations - only one chessboard for html file (use frames if you need to display more in the same view) Bugs: - if square brackets are present in the comments (or the game text) in a pattern similar to the PGN header pattern '[tag "value"]' then the game parsing might break. If your PGN file is not displayed properly, please check for characters "[" and "]" in the comments and try removing them. Please email me for review at pgn4web@casaschi.net any PGN file that pgn4web fails parsing correctly. Enjoy! HOW TO USE pgn4we.js add a SCRIPT instance at the top of your HTML file: The PGN input can be specified either as URL within another SCRIPT instance with at least the call to SetPgnUrl("http://yoursite/yourpath/yourfile.pgn") and optionally any of the other calls listed below. Or the PGN file can be pasted in the body of the HTML file within a hidden FORM/TEXTAREA statement with the ID pgnText:
Example: