Hi there --

I was recently trying to get book navigation layout working while I was using the Node Relativity module. Things were odd, since the relativity links (which occur during the 'links' callback) would appear after the book navigation (which happens during the 'view' callback). This was ugly and not that useable.

After a while, I figured out that there was no way to change this via admistration options, so I made up a patch (well, a series of patches unfortunately, of which this is the first) to do this, but now I'm not sure where or how to post it so that others may use it if they want to do the same thing.

I thought this forum might be a good place, but there doesn't seem to be any way to attach a patch file here. Then I was going to try under /projects/issues, but there isn't anything for the book.module and putting it under 'Drupal' seems a bit silly since I'm not suggesting that these patches be incorporated in the core.

Index: modules/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book.module,v
retrieving revision 1.285
diff -u -r1.285 book.module
--- modules/book.module 12 Feb 2005 07:51:14 -0000      1.285
+++ modules/book.module 17 Mar 2005 06:03:36 -0000
@@ -500,9 +500,10 @@
     $output .= ' <div class="titles">'. $titles .'</div>';
     $output .= '</div>';
     $output .= '</div>';
-  }
 
-  $node->body = $node->body.$output;
+    // modified node_show appends this after rest (like links) is added
+    $node->bottom = $output;
+  }
 
   return $node;
 }
Index: modules/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.476
diff -u -r1.476 node.module
--- modules/node.module 7 Mar 2005 21:58:13 -0000       1.476
+++ modules/node.module 17 Mar 2005 06:03:37 -0000
@@ -496,7 +496,7 @@
 /**
  * Generate a display of the given node.
  *
- * @param $node
+ * @param &$node
  *   A node array or node object.
  * @param $teaser
  *   Whether to display only the teaser for the node.
@@ -508,7 +508,7 @@
  * @return
  *   An HTML representation of the themed node.
  */
-function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
+function node_view(&$node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
   $node = array2object($node);
 
   // Remove the delimiter (if any) that separates the teaser from the body.
@@ -529,6 +529,9 @@
     $node->links = module_invoke_all('link', 'node', $node, !$page);
   }
 
+  // Update the history table, stating that this user viewed this node.
+  node_tag_new($node->nid);
+
   return theme('node', $node, $teaser, $page);
 }
 
@@ -556,8 +559,7 @@
     $output .= comment_render($node, $cid);
   }
 
-  // Update the history table, stating that this user viewed this node.
-  node_tag_new($node->nid);
+  $output .= $node->bottom;
 
   return $output;
 }

Suggestions for better ways to post the subsequent patches (or better ways to do this) would be appreciated.