--- bookreview.module.orig	2006-03-10 12:12:20.000000000 +0100
+++ bookreview.module	2006-03-10 12:18:30.000000000 +0100
@@ -3,7 +3,7 @@
 
 // Written by Jeremy Andrews <jeremy@kerneltrap.org>
 
-function bookreview_help($section = '') {  
+function bookreview_help($section = '') {
   switch ($section) {
     case 'admin/modules#description':
       $output .= t('Write and publish book reviews.');
@@ -32,8 +32,8 @@
   }
 }
 
-function bookreview_node_name() {
-  return t('book review');
+function bookreview_node_info() {
+  return array('bookreview' => array('name' => t('book review'), 'base' => 'bookreview'));
 }
 
 function bookreview_block($op = 'list', $delta = 0, $edit = array()) {
@@ -42,9 +42,22 @@
     return $blocks;
   }
   else if ($op == 'configure') {
-    $output = form_textfield(t('Block title'), 'bookreview_store_blocktitle', variable_get('bookreview_store_blocktitle', ''), 70, 255, t('Enter the title to use when displaying this block, if any.'));
-    $output .= form_textarea(t('HTML snippet'), 'bookreview_store_snippet', variable_get('bookreview_store_snippet', ''), 55, 4, t('Enter the html snippet provided to you by the bookstore you\'d like to link to.  The text "%ISBN" (without the quotes) will be replaced with the book\'s actual ISBN.'));
-    return ($output);
+    $form['bookreview_store_blocktitle'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Block title'),
+      '#default_value' => variable_get('bookreview_store_blocktitle', ''),
+      '#size' => 70,
+      '#maxlength' => 255,
+      '#description' => t('Enter the title to use when displaying this block, if any.'),
+    );
+
+    $form['bookreview_store_snippet'] = array(
+      '#type' => 'textfield',
+      '#title' => t('HTML snippet'),
+      '#default_value' => variable_get('bookreview_store_snippet', ''),
+      '#description' => t('Enter the html snippet provided to you by the bookstore you\'d like to link to.  The text "%ISBN" (without the quotes) will be replaced with the book\'s actual ISBN.'),
+    );
+    return ($form);
   }
   else if ($op == 'save') {
     variable_set('bookreview_store_blocktitle', $edit['bookreview_store_blocktitle']);
@@ -69,16 +82,19 @@
 }
 
 function bookreview_insert($node) {
-  db_query("INSERT INTO {bookreview} (nid, booktitle, cover, publisher, copyright, isbn, synopsis, contents, review, pages, price, rating) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", $node->nid, $node->booktitle, $node->cover, $node->publisher, $node->copyright, $node->isbn, $node->synopsis, $node->contents, $node->review, $node->pages, $node->price, $node->rating);
-  foreach ($node->authors as $weight => $author) {
-    if ($author) {
-      db_query("INSERT INTO {bookreview_authors} (nid, author, weight) VALUES (%d, '%s', %d)", $node->nid, $author, $weight);
+  db_query("INSERT INTO {bookreview} (nid, booktitle, cover, publisher, copyright, isbn, synopsis, contents, review, pages, price, rating) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)", $node->nid, $node->title, $node->cover, $node->publisher, $node->copyright, $node->isbn, $node->synopsis, $node->contents, $node->review, $node->pages, $node->price, $node->rating);
+  for ($i = 0; $i < $node->numauthors; $i++) {
+    $author = "author-$i";
+    if ($node->$author) {
+      db_query("INSERT INTO {bookreview_authors} (nid, author, weight) VALUES (%d, '%s', %d)", $node->nid, $node->$author, $i);
     }
   }
-  $numlinks = count($node->booklinks);
-  for ($i = 0; $i < $numlinks; $i++) {
-    if ($node->booklinks[$i]) {
-      db_query("INSERT INTO {bookreview_links} (nid, booklink, description, weight) VALUES (%d, '%s', '%s', %d)", $node->nid, $node->booklinks[$i], $node->linkdescriptions[$i], $i);
+
+  for ($i = 0; $i < $node->numlinks; $i++) {
+    $booklink = "booklink-$i";
+    $linkdescription = "linkdescription-$i";
+    if ($node->$booklink) {
+      db_query("INSERT INTO {bookreview_links} (nid, booklink, description, weight) VALUES (%d, '%s', '%s', %d)", $node->nid, $node->$booklink, $node->$linkdescription, $i);
     }
   }
 }
@@ -89,29 +105,34 @@
   while ($author = db_fetch_object($authors)) {
     $bookreview->authors[$author->weight] = $author->author;
   }
+  $bookreview->numauthors = count($bookreview->authors);
+
   $booklinks = db_query("SELECT booklink, description, weight FROM {bookreview_links} WHERE nid = '$node->nid' ORDER BY weight");
   while ($booklink = db_fetch_object($booklinks)) {
     $bookreview->booklinks[$booklink->weight] = $booklink->booklink;
     $bookreview->linkdescriptions[$booklink->weight] = $booklink->description;
   }
+  $bookreview->numlinks = count($bookreview->booklinks);
+  
   return $bookreview;
 }
 
 function bookreview_update($node) {
-  db_query("UPDATE {bookreview} SET booktitle = '%s', cover = '%s', publisher = '%s', copyright = '%s', isbn = '%s', pages = '%s', price = '%s', rating = %d, synopsis = '%s', contents = '%s', review = '%s' WHERE nid = %d", $node->booktitle, $node->cover, $node->publisher, $node->copyright, $node->isbn, $node->pages, $node->price, $node->rating, $node->synopsis, $node->contents, $node->review, $node->nid);
+  db_query("UPDATE {bookreview} SET booktitle = '%s', cover = '%s', publisher = '%s', copyright = '%s', isbn = '%s', pages = '%s', price = '%s', rating = %d, synopsis = '%s', contents = '%s', review = '%s' WHERE nid = %d", $node->title, $node->cover, $node->publisher, $node->copyright, $node->isbn, $node->pages, $node->price, $node->rating, $node->synopsis, $node->contents, $node->review, $node->nid);
   db_query("DELETE FROM {bookreview_authors} WHERE nid = %d", $node->nid);
-  $i = 0;
-  foreach ($node->authors as $author) {
-    if ($author) {
-      db_query("INSERT INTO {bookreview_authors} (nid, author, weight) VALUES (%d, '%s', %d)", $node->nid, $author, $i);
-      $i++;
+  
+  for ($i = 0; $i < $node->numauthors; $i++) {
+    $author = "author-$i";
+    if ($node->$author) {
+      db_query("INSERT INTO {bookreview_authors} (nid, author, weight) VALUES (%d, '%s', %d)", $node->nid, $node->$author, $i);
     }
   }
   db_query("DELETE FROM {bookreview_links} WHERE nid = %d", $node->nid);
-  $numlinks = count($node->booklinks);
-  for ($i = 0; $i < $numlinks; $i++) {
-    if ($node->booklinks[$i]) {
-      db_query("INSERT INTO {bookreview_links} (nid, booklink, description, weight) VALUES (%d, '%s', '%s', %d)", $node->nid, $node->booklinks[$i], $node->linkdescriptions[$i], $i);
+
+  for ($i = 0; $i < $node->numlinks; $i++) {
+    $booklink = "booklink-$i";
+    if ($node->$booklinks) {
+      db_query("INSERT INTO {bookreview_links} (nid, booklink, description, weight) VALUES (%d, '%s', '%s', %d)", $node->nid, $node->$booklink, $node->$linkdescription, $i);
     }
   }
 }
@@ -148,73 +169,250 @@
   return $error;
 }
 
-function bookreview_form(&$node, &$error) {
-  $op = arg(1);
+function bookreview_form(&$node) {
   $edit = $_POST['edit'];
-
-  if (function_exists('taxonomy_node_form')) {
-    $output .= implode('', module_invoke('taxonomy', 'node_form', 'bookreview', $node));
-  }
-
-  if ($edit['bookreview_more_authors'] == 1) {
-    $node->numauthors = $node->numauthors + 2;
-  }
-  elseif ($node->authors) {
-    $node->numauthors = count($node->authors);
+  
+  if ($edit['numauthors']) {
+    // It's a preview ...
+    if ($edit['bookreview_more_authors'] == 1) { 
+      // ... and we need more authors
+      if ($edit['numauthors'] % 2) {
+        $node->numauthors = $edit['numauthors'] + 1;
+      }
+      else {
+        $node->numauthors = $edit['numauthors'] + 2;
+      }
+    }
+    else {  
+      // we don't want more authors, just see the preview
+      // (numauthors may have change with a previous preview)
+      $node->numauthors = $edit['numauthors'];
+    }
   }
-  else {
+  elseif(!$node->numauthors) {
+    // Just created review, start with one author.
     $node->numauthors = 1;
   }
-  if ($edit['bookreview_more_links'] == 1) {
-    $node->numlinks = $node->numlinks + 5;
-  }
-  elseif ($node->booklinks) {
-    $node->numlinks = count($node->booklinks);
+  // else we are editing an old review, we'll use the defaults
+
+  if ($edit['numlinks']) {
+    // It's a preview ...
+    if ($edit['bookreview_more_links'] == 1) {
+      // ... and we need more links
+      $node->numlinks = $edit['numlinks'] + 1;
+    }
+    else {  
+      // we don't want more links, just see the preview
+      // (numlinks may have change with a previous preview)
+      $node->numlinks = $edit['numlinks'];
+    }
   }
-  else {
-    $node->numlinks = 3;
+  elseif(!$node->numlinks) {
+    // Just created review, start with one link.
+    $node->numlinks = 1;
   }
-
-  $output .= form_hidden('numauthors', $node->numauthors);
-  $output .= form_hidden('numlinks', $node->numlinks);
-  $output .= form_textfield(t('Book title'), 'booktitle', $node->booktitle, 60, 255, t('The title of the book being reviewed, if different than the title of this book review.'));
-
-  $output .= form_item(t('Author(s)'), '');
+  // else we are editing an old review, we'll use the defaults
+  
+  $form['numauthors'] = array(
+    '#type' => 'hidden',
+    '#value' => $node->numauthors,
+  );
+
+  $form['numlinks'] = array(
+    '#type' => 'hidden',
+    '#value' => $node->numlinks,
+  );  
+
+  $form['book_infos'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('General informations.'),
+    '#collapsible' => TRUE,
+    '#collapsed' => FALSE,
+  );
+  
+  $form['book_infos']['title'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Title'),
+    '#default_value' => $node->title,
+    '#size' => 60,
+    '#maxlength' => 255,
+    '#description' => t('The title of the book being reviewed, if different than the title of this book review.'),
+  );
+
+  $form['book_infos']['authors'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Author(s)'),
+    '#collapsible' => TRUE,
+    '#collapsed' => FALSE,
+  );  
+  $form['book_infos']['authors']['authors_begin'] = array(
+      '#type' => 'markup',
+      '#value' => '<table>',
+  );
   for ($i = 0; $i < $node->numauthors; $i++) {
-    $output .= form_textfield('', "authors][$i", $node->authors[$i], 60, 255, '');
-  }
-  $output .= form_checkbox(t('add more authors'), 'bookreview_more_authors', 1, 0, t('If the book has more authors, you can create space to list them by checking this box and clicking '). '<b>'. t('Preview'). '</b>.'); 
-
-  $output .= form_textfield(t('Cover picture'), 'cover', $node->cover, 60, 255, t('URL of book cover image.'));
-  $output .= form_textfield(t('Publisher'), 'publisher', $node->publisher, 60, 255, t('The publisher of the book being reviewed.'));
-  $output .= form_textfield(t('Copyright'), 'copyright', $node->copyright, 4, 255, t('The year the book was published.  (Format:  YYYY).'));
-  $output .= form_textfield(t('ISBN'), 'isbn', $node->isbn, 60, 255, t('The ISBN of the book being reviewed.'));
-  $output .= form_textfield(t('Pages'), 'pages', $node->pages, 60, 255, t('The total number of pages in the book being reviewed.'));
-  $output .= form_textfield(t('Price'), 'price', $node->price, 60, 255, t('The cost of the book being reviewed.'));
-  $output .= form_select(t('Rating'), 'rating', $node->rating, (array("<" . t('none') . ">") + drupal_map_assoc(range(1, 10))), t('Score of the book on a 1 to 10 scale.'));
-  $output .= form_item(t('Offsite links'), '');
-  // TODO:  Replace table formatting with css
-  $output .= "<table>\n";
+    $form['book_infos']['authors']["author-$i"] = array(
+      '#type' => 'textfield',
+      '#default_value' => $node->authors[$i],
+      '#size' => 60,
+      '#maxlength' => 255,
+      '#description' => '',
+      '#prefix' => ($i%2) ? '<td>' : '<tr><td>',
+      '#suffix' => ($i%2) ? '</td></tr>' : '</td>',
+    );
+  }
+  $form['book_infos']['authors']['authors_end'] = array(
+      '#type' => 'markup',
+      '#value' => ($node->numauthors+1%2) ? '</table>' : '<td></td></tr></table>',
+  );
+
+  $form['book_infos']['authors']['bookreview_more_authors'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('add more authors'),
+    '#value' => 0,
+    '#description' => t('If the book has more authors, you can create space to list them by checking this box and clicking '). '<b>'. t('Preview'). '</b>.',
+  );
+
+  $form['book_infos']['rating'] = array(
+    '#type' => 'select',
+    '#title' => t('Rating'), 
+    '#default_value' => $node->rating,
+    '#options' => (array("<" . t('none') . ">") + drupal_map_assoc(range(1, 10))),
+    '#description' => t('Score of the book on a 1 to 10 scale.'),   
+  );
+  
+  $form['book_detailled_infos'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Detailled informations.'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+  
+  $form['book_detailled_infos']['cover'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Cover picture'),
+    '#default_value' => $node->cover,
+    '#size' => 60,
+    '#maxlength' => 255,
+    '#description' => t('URL of book cover image.'),
+  ); 
+  
+  $form['book_detailled_infos']['publisher'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Publisher'),
+    '#default_value' => $node->publisher,
+    '#size' => 60,
+    '#maxlength' => 255,
+    '#description' => t('The publisher of the book being reviewed.'),
+  );
+  
+  $form['book_detailled_infos']['copyright'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Copyright'),
+    '#default_value' => $node->copyright,
+    '#maxlength' => 255,
+    '#description' => t('The year the book was published.  (Format:  YYYY).'),
+  );
+  
+  $form['book_detailled_infos']['isbn'] = array(
+    '#type' => 'textfield',
+    '#title' => t('ISBN'),
+    '#default_value' => $node->copyright,
+    '#size' => 60,
+    '#maxlength' => 255,
+    '#description' => t('The ISBN of the book being reviewed.'),
+  );
+  
+  $form['book_detailled_infos']['pages'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Pages'),
+    '#default_value' => $node->pages,
+    '#size' => 60,
+    '#maxlength' => 255,
+    '#description' => t('The total number of pages in the book being reviewed.'),
+  );
+  
+  $form['book_detailled_infos']['price'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Price'),
+    '#default_value' => $node->price,
+    '#size' => 60,
+    '#maxlength' => 255,
+    '#description' => t('The cost of the book being reviewed.'),
+  );
+  
+  $form['offsite_links'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Offsite links'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+  
+  $form['offsite_links']['booklinks_begin'] = array(
+      '#type' => 'markup',
+      '#value' => '<table>',
+  );
   for ($i = 0; $i < $node->numlinks; $i++) {
-    $output .= "  <tr><td>\n";
-    $output .= form_textfield(t('URL'), "booklinks][$i", $node->booklinks[$i], 45, 255, '');
-    $output .= "  </td><td>\n";
-    $output .= form_textfield(t('Description'), "linkdescriptions][$i", $node->linkdescriptions[$i], 45, 255, '');
-    $output .= "  </td></tr>\n";
-  }
-  $output .= "</table>\n";
-  $output .= form_checkbox(t('add more links'), 'bookreview_more_links', 1, 0, t('If you need to add more links, check this box and click '). '<b>'. t('Preview'). '</b>.'); 
+    $form['offsite_links']["booklink-$i"] = array(
+      '#type' => 'textfield',
+      '#title' => 'URL',
+      '#default_value' => $node->booklinks[$i],
+      '#size' => 45,
+      '#maxlength' => 255,
+      '#description' => '',
+      '#prefix' => '<tr><td>',
+      '#suffix' => '</td>',
+    );
+    $form['offsite_links']["linkdescription-$i"] = array(
+      '#type' => 'textfield',
+      '#title' => 'Description',
+      '#default_value' => $node->linkdescriptions[$i],
+      '#size' => 45,
+      '#maxlength' => 255,
+      '#description' => '',
+      '#prefix' => '<td>',
+      '#suffix' => '</td></tr>',
+    );
+  }
+  $form['offsite_links']['booklinks_end'] = array(
+      '#type' => 'markup',
+      '#value' => '</table>',
+  );
+
+
+  $form['offsite_links']['bookreview_more_links'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('add more links'),
+    '#value' => 0,
+    '#description' => t('If you need to add more links, check this box and click '). '<b>'. t('Preview'). '</b>.',
+  );
   
   // Only display these two fields if longer input format was choosen
   if (variable_get('bookreview_detail', 0) == 0) {
-    $output .= form_textarea(t('Synopsis'), 'synopsis', $node->synopsis, 60, 18, t('A synopsis of the book being reviewed.  (For example, the text on the back cover, or inside front cover of most books.)'));
-    $output .= form_textarea(t('Contents'), 'contents', $node->contents, 60, 18, t('The table of contents from the book being reviewed.'));
-  }
-  $output .= form_textarea(t('Review'), 'review', $node->review, 60, 18, t('This is the actual book review.'));
-
-  $output .= filter_form('format', $node->format);
+    $form['synopsis'] = array(
+      '#type' => 'textarea', 
+      '#title' => t('Synopsis'),
+      '#default_value' => $node->synopsis,
+      '#description' => t('A synopsis of the book being reviewed.  (For example, the text on the back cover, or inside front cover of most books.)'),
+    );
+    
+    $form['content'] = array(
+      '#type' => 'textarea', 
+      '#title' => t('Contents'),
+      '#default_value' => $node->contents,
+      '#description' => t('The table of contents from the book being reviewed.'),
+    );
+    
+  }
+  $form['review'] = array(
+    '#type' => 'textarea', 
+    '#title' => t('Review'),
+    '#default_value' => $node->review,
+    '#description' => t('This is the actual book review.'),
+  );
   
-  return $output;
+  $form['format'] = filter_form($node->format);
+  
+  return $form;
 }
 
 function bookreview_menu($may_cache) {
@@ -243,11 +441,47 @@
   if (!file_check_location(variable_get('bookreview_css', 'modules/bookreview/bookreview.css'))) {
     $error['bookreview_css'] = theme('error', t('File does not exist, or is not readable.'));
   }
-  $output = form_textfield(t('Style sheet'), "bookreview_css", variable_get('bookreview_css', 'modules/bookreview/bookreview.css'), 70, 255, t("Specify the relative path to your bookreview style sheet.  The style sheet specified here will be used to style your bookreview pages.  If you prefer to style your bookreview pages in your theme, you can leave this field blank. ". $error['bookreview_css']));
-  $output .= form_radios(t('Details to collect'), 'bookreview_detail', variable_get('bookreview_detail', 0), array(t('Synopsis, Contents and Review'), t('Review only')), t('Details you would like to collect about the books as freeform text.'));
-  $output .= form_textarea(t('Explanation or submission guidelines'), 'bookreview_help', variable_get('bookreview_help', ''), 55, 4, t('This text will be displayed at the top of the book review submission form.  Useful for helping or instructing your users.'));
-  $output .= form_select(t('Minimum number of words'), 'minimum_bookreview_size', variable_get('minimum_bookreview_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200, 500, 1000)), t('The minimum number of words a book review must have to be considered valid.  This can be useful to prevent submissions that do not meet the site\'s standards, such as short test posts.'));
-  return $output;
+  
+  $form['bookreview_settings'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Bookreview settings'),
+  );
+
+  $form['bookreview_settings']['stylesheet'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Style sheet'),
+    '#default_value' => variable_get('bookreview_css', 'modules/bookreview/bookreview.css'),
+    '#size' => 70,
+    '#maxlength' => 255,
+    '#description' => t("Specify the relative path to your bookreview style sheet.  The style sheet specified here will be used to style your bookreview pages.  If you prefer to style your bookreview pages in your theme, you can leave this field blank. ". $error['bookreview_css'])
+  ); 
+
+  $form['bookreview_settings']['bookreview_detail'] = array(
+    '#type' => 'radios',
+    '#title' => t('Details to collect'),
+    '#default_value' => variable_get('bookreview_detail', 0),
+    '#options' => array(
+       t('Synopsis, Contents and Review'), 
+       t('Review only')),
+    '#description' => t('Details you would like to collect about the books as freeform text.'),
+  );
+
+  $form['bookreview_settings']['bookreview_help'] = array(
+    '#type' => 'textarea', 
+    '#title' => t('Explanation or submission guidelines'),
+    '#default_value' => variable_get('bookreview_help', ''),
+    '#description' => t('This text will be displayed at the top of the book review submission form.  Useful for helping or instructing your users.'),
+  );
+
+  $form['bookreview_settings']['minimum_bookreview_size'] = array(
+    '#type' => 'select',
+    '#title' => t('Minimum number of words'), 
+    '#default_value' => variable_get('minimum_bookreview_size', 0),
+    '#options' => drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200, 500, 1000)),
+    '#description' => t('The minimum number of words a book review must have to be considered valid.  This can be useful to prevent submissions that do not meet the site\'s standards, such as short test posts.'),   
+  );
+  
+   return $form;
 }
 
 function bookreview_page() {
@@ -283,8 +517,8 @@
     if ($authors) {
       $output = t('<b>%tag:</b> %authors', array('%tag' => format_plural($count, 'Author', 'Authors'), '%authors' => $authors)) .'<br />';
     }
-    if ($node->booktitle) {
-      $output .= t('<b>Title:</b> %title', array('%title' => $node->booktitle)) .'<br />';
+    if ($node->title) {
+      $output .= t('<b>Title:</b> %title', array('%title' => $node->title)) .'<br />';
     }
     if ($node->copyright) {
       $output .= t('<b>Copyright:</b> %copyright', array('%copyright' => $node->copyright)) .'<br />';
@@ -338,8 +572,8 @@
 function theme_bookreview_content(&$node, $main = 0, $page = 0) {
   $output = "<div class=\"bookreview\">\n";
   $output .= "  <div class=\"header\">\n";
-  if($node->booktitle) {
-    $output .= "    <div class=\"title\"><span class=\"label1\">". t('Title') .": ". check_output($node->booktitle, $node->format) ."</span></div>\n";
+  if($node->title) {
+    $output .= "    <div class=\"title\"><span class=\"label1\">". t('Title') .": ". check_markup($node->title, $node->format) ."</span></div>\n";
   }
   if($node->cover) {
     $output .= "    <div class=\"cover\"><img src=\"$node->cover\"></div>\n";
@@ -351,43 +585,43 @@
       else
         $authors = "$author";
     }
-    $output .= "    <div class=\"author\"><span class=\"label2\">". format_plural(count($node->authors), 'Author', 'Authors') .":</span><span class=\"content2\">". check_output($authors, $node->format) ."</span></div>\n";
+    $output .= "    <div class=\"author\"><span class=\"label2\">". format_plural(count($node->authors), 'Author', 'Authors') .":</span><span class=\"content2\">". check_markup($authors, $node->format) ."</span></div>\n";
   }
   if($node->publisher) {
-    $output .= "    <div class=\"publisher\"><span class=\"label3\">". t('Publisher') .":</span><span class=\"content3\">". check_output($node->publisher, $node->format) ."</span></div>\n";
+    $output .= "    <div class=\"publisher\"><span class=\"label3\">". t('Publisher') .":</span><span class=\"content3\">". check_markup($node->publisher, $node->format) ."</span></div>\n";
   }
   if($node->copyright) {
-    $output .= "    <div class=\"copyright\"><span class=\"label3\">". t('Copyright') .":</span><span class=\"content3\">". check_output($node->copyright, $node->format) ."</span></div>\n";
+    $output .= "    <div class=\"copyright\"><span class=\"label3\">". t('Copyright') .":</span><span class=\"content3\">". check_markup($node->copyright, $node->format) ."</span></div>\n";
   }
   if($node->isbn) {
-    $output .= "    <div class=\"isbn\"><span class=\"label3\">". t('ISBN') .":</span><span class=\"content3\">". check_output($node->isbn, $node->format) ."</span></div>\n";
+    $output .= "    <div class=\"isbn\"><span class=\"label3\">". t('ISBN') .":</span><span class=\"content3\">". check_markup($node->isbn, $node->format) ."</span></div>\n";
   }
   if($node->pages) {
-    $output .= "    <div class=\"pages\"><span class=\"label3\">". t('Pages') .":</span><span class=\"content3\">". check_output($node->pages, $node->format) ."</span></div>\n";
+    $output .= "    <div class=\"pages\"><span class=\"label3\">". t('Pages') .":</span><span class=\"content3\">". check_markup($node->pages, $node->format) ."</span></div>\n";
   }
   if($node->price) {
-    $output .= "    <div class=\"price\"><span class=\"label3\">". t('Price') .":</span><span class=\"content3\">". check_output($node->price, $node->format) ."</span></div>\n";
+    $output .= "    <div class=\"price\"><span class=\"label3\">". t('Price') .":</span><span class=\"content3\">". check_markup($node->price, $node->format) ."</span></div>\n";
   }
   if($node->rating) {
-    $output .= "    <div class=\"rating\"><span class=\"label3\">". t('Rating') .":</span><span class=\"content3\">". check_output($node->rating, $node->format) ."</span></div>\n";
+    $output .= "    <div class=\"rating\"><span class=\"label3\">". t('Rating') .":</span><span class=\"content3\">". check_markup($node->rating, $node->format) ."</span></div>\n";
   }
   $output .= "  </div>\n"; // end of header
   if($node->synopsis) {
     $output .= "  <div class=\"synopsis\">\n";
     $output .= "    <span class=\"label1\">". t('Synopsis') .":</span>\n";
-    $output .= "    <span class=\"content2\">". check_output($node->synopsis, $node->format) ."</span>\n";
+    $output .= "    <span class=\"content2\">". check_markup($node->synopsis, $node->format) ."</span>\n";
     $output .= "  </div>\n";
   }
   if($node->contents) {
     $output .= "  <div class=\"contents\">\n";
     $output .= "    <span class=\"label1\">". t('Table of contents') .":</span>\n";
-    $output .= "    <span class=\"content2\">". check_output($node->contents, $node->format) ."</span>\n";
+    $output .= "    <span class=\"content2\">". check_markup($node->contents, $node->format) ."</span>\n";
     $output .= "  </div>\n";
   }
   if($node->review) {
     $output .= "  <div class=\"review\">\n";
     $output .= "    <span class=\"label1\">". t('Review') .":</span>\n";
-    $output .= "    <span class=\"content2\">". check_output($node->review, $node->format) ."</span>\n";
+    $output .= "    <span class=\"content2\">". check_markup($node->review, $node->format) ."</span>\n";
     $output .= "  </div>\n";
   }
   if($node->booklinks[0]) {
@@ -399,13 +633,13 @@
       $linkdescription = $node->linkdescriptions[$i] ? $node->linkdescriptions[$i] : $node->booklinks[$i];
       if(ereg('^http://|^https://|ftp://',"$booklink")) {
         // off site link
-        $booklink = "<a href=\"$booklink\">". check_output($linkdescription, $node->format) .'</a>';
+        $booklink = "<a href=\"$booklink\">". check_markup($linkdescription, $node->format) .'</a>';
       }
       elseif($booklink) {
         // on site link
         $booklink = l("$linkdescription", "$booklink");
       }
-      $output .= "    <span class=\"content2\">". check_output($booklink, $node->format) ."</span>\n";
+      $output .= "    <span class=\"content2\">". check_markup($booklink, $node->format) ."</span>\n";
     }
     $output .= "  </div>\n";
   }
