--- print.module.orig	2006-01-01 14:04:12.000000000 +1300
+++ print.module	2006-02-26 03:34:03.000000000 +1300
@@ -27,7 +27,7 @@
   $items = array();
 
   if (!$may_cache) {
-    $items[] = array('path' => 'node/'. arg(1) .'/print', 'title' => t('printer friendly'),
+    $items[] = array('path' => 'print/node/' . arg(2), 'title' => t('printer friendly'),
       'callback' => 'print_node_controller', 'access' => user_access('access content'),
       'type' => MENU_CALLBACK);
 
@@ -150,7 +150,7 @@
  ********************************************************************/
 
 function print_node_controller() {
-  $nid = arg(1);
+  $nid = arg(2);
   if (is_numeric($nid)) {
     print_generate_node($nid);
   }
@@ -378,7 +378,13 @@
 
 function theme_print_link($node) {
   $attributes = array("title" => "Display a printer friendly version of this page.");
-  $links = l(t('printer friendly version'), "node/$node->nid/print", $attributes);
+
+  $print_robot_settings = variable_get('print_robot_settings', NULL);
+  if(!empty($print_robot_settings['noindex'])) {
+    $attributes[rel] = 'nofollow';
+  }
+
+  $links = l(t('printer friendly version'), "print/node/$node->nid", $attributes);
   return $links;
 }
 ?>
