Index: chessboard.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/chessboard/chessboard.module,v retrieving revision 1.5 diff -u -r1.5 chessboard.module --- chessboard.module 6 Sep 2006 09:51:10 -0000 1.5 +++ chessboard.module 21 Jan 2010 00:30:05 -0000 @@ -6,14 +6,10 @@ /** * Implementation of hook_help(). */ -function chessboard_help($section='') { +function chessboard_help($path, $arg) { - switch ($section) { - case 'admin/modules#name': - $output = t('chessboard'); - break; - - case 'admin/modules#description': + switch ($path) { + case 'admin/help#chessboard': $output = t('Renders chessboard diagrams specified with the FEN syntax or a simple piece placement format.'); break; @@ -27,14 +23,10 @@ /** - * Implementation of hook_menu(). + * Implementation of hook_init(). */ -function chessboard_menu($may_cache) { - if (!$may_cache) { - theme('add_style', drupal_get_path('module', 'chessboard') .'/chessboard.css'); - } - - return array(); +function chessboard_init() { + drupal_add_css(drupal_get_path('module', 'chessboard') .'/chessboard.css'); } Index: chessboard.css =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/chessboard/chessboard.css,v retrieving revision 1.3 diff -u -r1.3 chessboard.css --- chessboard.css 6 Sep 2006 09:51:10 -0000 1.3 +++ chessboard.css 21 Jan 2010 00:30:05 -0000 @@ -3,17 +3,11 @@ * $Id: chessboard.css,v 1.3 2006/09/06 09:51:10 vyvee Exp $ */ -div.chessboard { - /* 'font-size: 0;' is required is fight against the descender - characters for page to be rendered in strict mode. - Omitting this causes an old bottom margin, actually reserved for - possible descender characters (such as g, j, q, or y), below each - image. - Is there a better solution? - */ - font-size: 0; - white-space: nowrap; +.chessboard .row { + height: 40px; } .chessboard img { + width: 40px; + height: 40px; } Index: chessboard_render.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/chessboard/chessboard_render.php,v retrieving revision 1.3 diff -u -r1.3 chessboard_render.php --- chessboard_render.php 6 Sep 2006 09:51:10 -0000 1.3 +++ chessboard_render.php 21 Jan 2010 00:30:06 -0000 @@ -29,7 +29,7 @@ */ /* * Revision of CVS for Drupal contribution CVS: -$Id: chessboard_render.php,v 1.3 2006/09/06 09:51:10 vyvee Exp $ +$Id: chessboard_render.php,v 1.3.2.2 2008/06/29 07:31:26 mariuss Exp $ */ $chessboard_image_path = '/images/'; @@ -164,7 +164,7 @@ $table_constructed = true; } - + preg_match('@^\s*(?:\((.*?)\))?(.*)$@s', $content, $matches); // Parameter Parsing @@ -190,6 +190,7 @@ // Top border if ($border['T']) { + $xhtml .= '
'; if ($border['L']) $xhtml .= $table_xhtml['TL']; $xhtml .= str_repeat($table_xhtml['T'], $file_max); @@ -203,6 +204,8 @@ $square_color_first = 1 - $square_color_first; } + $xhtml .= '
'; + // Left border, board, right border for ($i=0; isset($board[$i]); $i++) { @@ -212,7 +215,7 @@ } if ($file >= $file_max) { - $xhtml .= '
'; + $xhtml .= '
'; $file = 0; $square_color = $square_color_first; $square_color_first = 1 - $square_color_first; @@ -242,14 +245,17 @@ } } + $xhtml .= '
'; + // Bottom border if ($border['B']) { - $xhtml .= '
'; + $xhtml .= '
'; if ($border['L']) $xhtml .= $table_xhtml['BL']; $xhtml .= str_repeat($table_xhtml['B'], $file_max); if ($border['R']) $xhtml .= $table_xhtml['BR']; + $xhtml .= '
'; } return $xhtml; Index: README.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/chessboard/README.txt,v retrieving revision 1.6 diff -u -r1.6 README.txt --- README.txt 6 Sep 2006 09:51:10 -0000 1.6 +++ README.txt 21 Jan 2010 00:30:05 -0000 @@ -1,8 +1,8 @@ -Chessboard Module -README.txt - $Id: README.txt,v 1.6 2006/09/06 09:51:10 vyvee Exp $ +Chessboard Module +================= + This module renders chessboard diagrams specified with the FEN syntax or a simple piece placement format. Index: chessboard.info =================================================================== RCS file: chessboard.info diff -N chessboard.info --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ chessboard.info 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,5 @@ +; $ Id: $ + +name = Chessboard Renderer +description = This module renders chessboard diagrams. +core = 6.x