? nodeblock-teaser.patch
Index: nodeblock.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodeblock/nodeblock.module,v
retrieving revision 1.11
diff -u -p -r1.11 nodeblock.module
--- nodeblock.module	1 Apr 2009 03:12:10 -0000	1.11
+++ nodeblock.module	10 Nov 2009 23:03:47 -0000
@@ -99,8 +99,26 @@ function nodeblock_block($op = 'list', $
     }
     return $blocks;
   }
+  elseif ($op == 'configure') {
+    $defaults = variable_get('nodeblock_block_' . $delta, array('teaser' => 0, 'links' => 1));
+    $form['teaser'] = array(
+      '#title' => t('Show only node teaser'),
+      '#type' => 'checkbox',
+      '#default_value' => $defaults['teaser'],
+    );
+    $form['links'] = array(
+      '#type' => 'checkbox',
+      '#default_value' => $defaults['links'],
+      '#title' => t('Include node links for "add comment", "read more" etc.'),
+    );
+    return $form;
+  }
+  else if ($op == 'save') {
+    variable_set('nodeblock_block_' . $delta, array('teaser' => $edit['teaser'], 'links' => $edit['links']));
+  }
   elseif ($op == 'view') {
     $node = node_load($delta);
+    $nodeblock_display = variable_get('nodeblock_block_' . $delta, array('teaser' => 0, 'links' => 1));
 
     // if the node type is translatable, try to load the node with the appropriate
     // language from the translation set.
@@ -122,7 +140,7 @@ function nodeblock_block($op = 'list', $
     $node->nodeblock = TRUE;
     
     $block['subject'] = $node->title;
-    $block['content'] = node_view($node, FALSE, FALSE, TRUE);
+    $block['content'] = node_view($node, $nodeblock_display['teaser'], TRUE, $nodeblock_display['links']);
 
     return $block;
   }
