? 444182.patch
Index: nodesinblock.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodesinblock/nodesinblock.admin.inc,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 nodesinblock.admin.inc
--- nodesinblock.admin.inc	4 May 2009 21:29:16 -0000	1.1.2.5
+++ nodesinblock.admin.inc	5 May 2009 17:54:12 -0000
@@ -14,7 +14,7 @@ function nodesinblock_settings() {
   $form['nodesinblock'] = array(
     '#type' => 'fieldset',
     '#title' => t('General settings'),
-    '#description' => t('Select number of blocks to create and associate content types which nodes can be used to insert as content in a block. When you change the number, be sure to goto the <a href="@url">block configuration</a> page so the block settings are updated in the database. When at least one content type is selected, another fieldset will become available after clicking the submit button.', array('@url' => url('admin/build/block'))),
+    '#description' => t('Select number of blocks to create and associate content types which nodes can be used to insert as content in a block. When you change the number, be sure to goto the <a href="@url">block configuration</a> page so the block settings are updated in the database. When at least one content type is selected, two fieldsets will become available after clicking the submit button where you can change the names of the block and associate content types per block.', array('@url' => url('admin/build/block'))),
   );
   $form['nodesinblock']['nodesinblock_nrofblocks'] = array(
     '#type' => 'select',
@@ -29,9 +29,25 @@ function nodesinblock_settings() {
     '#default_value' => $saved_types,
   );
 
-  // Associate content type with block(s).
+  // Associate content type with block(s) and generate nice names for the blocks.
   if (!empty($saved_types)) {
 
+    $form['userfriendly_names'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('User friendly names for the blocks'),
+      '#description' => t('Only use alphanumeric characters.'),
+    );
+
+    $a = 1;
+    for ($i = 0; $i < variable_get('nodesinblock_nrofblocks', 1); $i++) {
+      $form['userfriendly_names']['nodesinblock_friendlyname_'. $a] = array(
+        '#type' => 'textfield',
+        '#title' => t('Number ') . $a,
+        '#default_value' => check_plain(variable_get('nodesinblock_friendlyname_'. $a, t('Nodes in block '. $a))),
+      );
+      $a++;
+    }
+
     $blocks = module_invoke('nodesinblock', 'block', 'list');
     $block_options = array();
     $a = 1;
@@ -43,7 +59,7 @@ function nodesinblock_settings() {
     $form['contenttypes_block'] = array(
       '#type' => 'fieldset',
       '#title' => t('Settings per content type'),
-      '#description' => t('Define per content type which blocks are available. On the content node form, a select box will be available to select the appropriate block where the node content must be displayed. If you want more meaningfull titles for your block titles, consider using <a href="http://drupal.org/project/stringoverrides">String Overrides</a> to alter the title.'),
+      '#description' => t('Define per content type which blocks are available. On the content node form, a select box will be available to select the appropriate block where the node content must be displayed.'),
     );
 
     // Iterate over selected types
Index: nodesinblock.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodesinblock/nodesinblock.module,v
retrieving revision 1.3.2.13
diff -u -p -r1.3.2.13 nodesinblock.module
--- nodesinblock.module	4 May 2009 21:04:09 -0000	1.3.2.13
+++ nodesinblock.module	5 May 2009 17:54:12 -0000
@@ -46,7 +46,7 @@ function nodesinblock_form_alter(&$form,
     $i = 0;
     foreach ($deltas as $key => $value) {
       if ($deltas[$a] != 0)
-      $block_options[$i] = t('Nodes in block '. $a);
+      $block_options[$i] = check_plain(variable_get('nodesinblock_friendlyname_'. $a, t('Nodes in block '. $a)));
       $a++;
       $i++;
     }
@@ -136,7 +136,7 @@ function nodesinblock_block($op = 'list'
       $number_of_blocks = variable_get('nodesinblock_nrofblocks', 1);
       for ($i = 0, $a = 1; $i < $number_of_blocks; $i++, $a++) {
         $blocks[$i] = array(
-          'info' => t('Nodes in block '. $a),
+          'info' => check_plain(variable_get('nodesinblock_friendlyname_'. $a, t('Nodes in block '. $a))),
           'weight' => 0,
           'enabled' => 0,
           'region' => 'left',
@@ -149,7 +149,7 @@ function nodesinblock_block($op = 'list'
       $a = $delta;
       $a++;
       $block = array(
-        'subject' => variable_get('nodesinblock_title_'. $delta, t('Nodes in block '. $a)),
+        'subject' => check_plain(variable_get('nodesinblock_friendlyname_'. $a, t('Nodes in block '. $a))),
         'content' => _nodesinblock_show($delta)
       );
       return $block;
