

Index: includes/theme.inc
===================================================================
--- includes/theme.inc  (revision 5)
+++ includes/theme.inc  (working copy)
@@ -710,19 +710,24 @@
 }
 
 /**
- * Return a themed box.
+ * Return a string wrapped in HTML, often referred to as a box.
  *
  * @param $title
- *   The subject of the box.
+ *   The subject of the wrapper, optional.
  * @param $content
- *   The content of the box.
- * @param $region
- *   The region in which the box is displayed.
+ *   The content of wrapper, mandatory.
+ * @param $id
+ *   The ID of the wrapper. This must be defined in the following way:
+ *     modulename-uniquenumber or filename-uniquenumber
  * @return
- *   A string containing the box output.
+ *   A string containing the wrapped output.
  */
-function theme_box($title, $content, $region = 'main') {
-  $output = '<h2 class="title">'. $title .'</h2><div>'. $content .'</div>';
+function theme_wrapper($title = NULL, $content, $id, $class = NULL) {
+  $class ? $class = " $class": NULL; //add a space
+  $output  = "<div class=\"wrapper$class\" id=\"$id\">\n";
+  $title ? $output .= " <h2 class=\"title\">$title</h2>\n" : NULL;
+  $output .= $content;
+  $output .= "\n</div>\n";
   return $output;
 }
Index: modules/comment.module
===================================================================
--- modules/comment.module      (revision 16)
+++ modules/comment.module      (working copy)
@@ -413,17 +413,17 @@

     // should we show the reply box?
     if (node_comment_mode($nid) != 2) {
-      $output .= theme('box', t('Reply'), t("This discussion is closed: you can't post new comments.
"));
+      $output .= drupal_set_message(t("This discussion is closed: you can't post new comments."));
     }
     else if (user_access('post comments')) {
       $output .= theme('comment_form', array('pid' => $pid, 'nid' => $nid), t('Reply'));
     }
     else {
-      $output .= theme('box', t('Reply'), t('You are not authorized to post comments.'));
+      $output .= drupal_set_message(t('You are not authorized to post comments.'));
     }
   }
   else {
-    $output .= theme('box', t('Reply'), t('You are not authorized to view comments.'));
+    $output .= drupal_set_message(t('You are not authorized to view comments.'));
   }

   drupal_set_title(t('Add new comment'));
@@ -1428,7 +1428,7 @@
     $form .= form_submit(t('Post comment'));
   }

-  return theme('box', $title, form($form, 'post', url('comment/reply/'. $edit['nid'])));
+  return theme('wrapper', $title, form($form, 'post', url('comment/reply/'. $edit['nid'])), 'comment
-reply', 'comment');
 }

 function theme_comment_view($comment, $links = '', $visible = 1) {
@@ -1508,8 +1508,7 @@

     $output = form_item(NULL, $output, t('Select your preferred way to display the comments and clic
k "Save settings" to activate your changes.'));
   }
-
-  return theme('box', t('Comment viewing options'), $output);
+  return theme('wrapper', t('Comment viewing options'), $output, 'comment-options', 'comment');
 }

 function comment_moderation_form($comment) {
Index: modules/search.module
===================================================================
--- modules/search.module       (revision 16)
+++ modules/search.module       (working copy)
@@ -582,10 +582,10 @@
       $results = search_data($keys, $type);

       if ($results) {
-        $results = theme('box', t('Search results'), $results);
+        $results = theme('wrapper', t('Search results'), $results, 'search-results', 'search-results
');
       }
       else {
-        $results = theme('box', t('Your search yielded no results'), search_help('search#noresults')                                                      );
+        $results = theme('wrapper', t('Your search yielded no results'), search_help('search#noresul                                                      ts'), 'search-results', 'message');
       }
     }
     else if (isset($_POST['edit'])) {
Index: modules/menu.module
===================================================================
--- modules/menu.module (revision 16)
+++ modules/menu.module (working copy)
@@ -380,7 +380,7 @@
     }
     $table = theme('item_list', $operations);
     $table .= theme('table', $header, menu_overview_tree_rows($mid));
-    $output .= theme('box', $menu['items'][$mid]['title'], $table);
+    $output .= theme('wrapper', $menu['items'][$mid]['title'], $table, 'menu-table', 'admin-table');
   }
   return $output;
 }
Index: user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user.module,v
retrieving revision 1.477
diff -u -F^f -r1.477 user.module
--- user.module 26 May 2005 19:03:05 -0000      1.477
+++ user.module 27 May 2005 15:18:49 -0000
@@ -605,7 +605,7 @@ function theme_user_profile($account, $f
   $output = "<div class=\"profile\">\n";
   $output .= theme('user_picture', $account);
   foreach ($fields as $category => $value) {
-    $output .= theme('box', $category, $value);
+    $output .= theme('wrapper', $category, $value, "user-profile-".$id++,"user-profile");
   }
   $output .= "</div>\n";
