Index: chessboard.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/chessboard/chessboard.module,v
retrieving revision 1.79
diff -u -p -r1.79 chessboard.module
--- chessboard.module	26 Dec 2010 11:09:27 -0000	1.79
+++ chessboard.module	1 Jan 2011 15:00:18 -0000
@@ -141,56 +141,6 @@ function chessboard_theme() {
 }
 
 /**
- * Add structures attached to an element, forcing media 'all', preprocess FALSE.
- *
- * A CSS structure is attached
- * to elements using the #attached property. The #attached property contains an
- * associative array, where the keys are the the types of the structure, and
- * the value the attached data. For example:
- * @code
- * $build['#attached'] = array(
- *   'css' => array(drupal_get_path('module', 'chessboard') . '/chessboard.css'),
- * );
- * @endcode
- *
- * @param $elements
- *   The structured array describing the data being rendered.
- *
- * @see drupal_add_css()
- */
-function chessboard_process_attached($elements) {
-  $options = array('media' => 'all', 'preprocess' => FALSE);
-  $elements['#attached'] += array('css' => array());
-  $elements['#attached']['css'] = array_filter($elements['#attached']['css'], 'is_string');
-  foreach ($elements['#attached']['css'] as $index => $data) {
-    $elements['#attached']['css'][$data] = $options;
-    $elements['#attached']['css'][$index] = FALSE;
-  }
-  $elements['#attached']['css'] = array_filter($elements['#attached']['css']);
-  return drupal_process_attached($elements);
-}
-
-/**
- * Renders HTML given a render array, forcing css media 'all', preprocess FALSE.
- *
- * @see drupal_render()
- *
- * @param $elements
- *   The structured array describing the data to be rendered.
- * @return
- *   The rendered HTML.
- */
-function chessboard_render_elements(&$elements) {
-  $output = drupal_render($elements);
-
-  // Add additional CSS associated with this element.
-  if (!empty($elements['#attached'])) {
-    chessboard_process_attached($elements);
-  }
-  return $output;
-}
-
-/**
  * Chessboard filter. Provides filtering of input into chessboard diagrams.
  *
  * @param $filter
@@ -356,21 +306,3 @@ function _chessboard_formatter_view($ite
   }
   return $element;
 }
-
-function chessboard_formatter_view($items) {
-  $element = array(
-    '#attached' => array(
-      'css' => array(drupal_get_path('module', 'chessboard') . '/chessboard.css'),
-    ),
-  );
-  foreach ($items as $delta => $item) {
-    $element[$delta] = array(
-      '#theme' => 'chessboard',
-      '#item' => $item,
-      '#prefix' => '<div class="chessboard">',
-      '#suffix' => '</div>',
-      '#weight' => $delta,
-    );
-  }
-  return $element;
-}
Index: chessboard_render.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/chessboard/chessboard_render.php,v
retrieving revision 1.32
diff -u -p -r1.32 chessboard_render.php
--- chessboard_render.php	27 Dec 2010 21:03:26 -0000	1.32
+++ chessboard_render.php	1 Jan 2011 15:00:18 -0000
@@ -7,24 +7,11 @@
  */
 
 /*================================*/
-/* Configuration                  */
-/*================================*/
-
-function chessboard_image_path($path) {
-  global $chessboard_image_path;
-  $chessboard_image_path = $path;
-}
-
-
-/*================================*/
 /* Routines                       */
 /*================================*/
 
-function chessboard_border_filename($border, $chessboard_image_path = NULL) {
+function chessboard_border_filename($border, $chessboard_image_path) {
   // $border: T, B, L, R, TL, TR, BL, BR
-  if (!isset($chessboard_image_path)) {
-    $chessboard_image_path = $GLOBALS['chessboard_image_path'];
-  }
   switch ($border) {
     case 'T':
     case 'B':
@@ -37,13 +24,9 @@ function chessboard_border_filename($bor
   }
 }
 
-
-function chessboard_piece_filename($piece, $square_color, $chessboard_image_path = NULL) {
+function chessboard_piece_filename($piece, $square_color, $chessboard_image_path) {
   // $piece        : KQBNRPkqbnrp-
   // $square_color : 0 1
-  if (!isset($chessboard_image_path)) {
-    $chessboard_image_path = $GLOBALS['chessboard_image_path'];
-  }
   switch ($piece) {
     case 'x':
       $name = 'xx';
@@ -59,54 +42,6 @@ function chessboard_piece_filename($piec
   return $chessboard_image_path . $name . ($square_color ? 'd' : 'l') . '.png';
 }
 
-function chessboard_render($content) {
-  global $chessboard_image_path;
-
-  if (!isset($chessboard_image_path)) {
-    $image_directory_path = NULL;
-  }
-  elseif (strpos($chessboard_image_path, base_path()) === 0) {
-    $image_directory_path = trim(substr($chessboard_image_path, strlen(base_path())), '\\/');
-  }
-  else {
-    $image_directory_path = trim($chessboard_image_path, '\\/');
-  }
-  $item = array(
-    'value' => $content,
-  );
-  $node = NULL;
-  $field = array();
-  $items = array($item);
-  chessboard_field('sanitize', $node, $field, $items, FALSE, FALSE);
-  $element = array(
-    '#theme' => 'chessboard',
-    '#item' => $items[0],
-    '#weight' => 0,
-    '#image_directory_path' => $image_directory_path,
-  );
-  $output = drupal_render($element);
-  return $output;
-}
-
-/**
- * Formats Chessboard Renderer notation syntax in HTML.
- *
- * @param $element
- *    An associative array containing items (chessboards) as children keyed by delta.
- *
- * @ingroup themable
- */
-function theme_chessboard_formatter_chessboard_default($variables) {
-  $element = $variables['element'];
-  $items = array();
-  foreach (element_children($element) as $key) {
-    $items[$key] = $element[$key]['#item'];
-  }
-  $element = _chessboard_formatter_view($items);
-  $output = drupal_render($element);
-  return $output;
-}
-
 function template_preprocess_chessboard(&$variables) {
   static $tables_xhtml = array();
 
