diff -urp --strip-trailing-cr ../category/category.install ./category.install
--- ../category/category.install	2009-08-05 06:58:56.000000000 +0200
+++ ./category.install	2009-09-20 21:14:39.000000000 +0200
@@ -332,6 +332,13 @@ function category_schema() {
         'size' => 'tiny',
         'description' => 'Whether or not free tagging is enabled for the container. (0 = disabled, 1 = enabled)',
       ),
+      'default_category_type' => array(
+        'type' => 'varchar',
+        'length' => 32,
+        'not null' => TRUE,
+        'default' => 'category',
+        'description' => 'Node type to be used for newly created categories within this container, if no user input given (such as freetagging and legacy Taxonomy operations).',
+      ),
       'hidden_cont' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -559,3 +566,21 @@ function category_update_6003() {
   db_create_table($ret, 'cache_category', $schema);
   return $ret;
 }
+
+/**
+ * Add a new column to {category_cont} table, to store newly added per-container setting
+ * of default node type for various shortcut category creations.
+ */
+function category_update_6004() {
+  $ret = array();
+
+  $new_field = array(
+    'type' => 'varchar',
+    'length' => 32,
+    'not null' => TRUE,
+    'default' => 'category',
+  );
+  db_add_field($ret, 'category_cont', 'default_category_type', $new_field);
+
+  return $ret;
+}
diff -urp --strip-trailing-cr ../category/category.module ./category.module
--- ../category/category.module	2009-08-05 06:52:53.000000000 +0200
+++ ./category.module	2009-09-21 00:25:45.000000000 +0200
@@ -61,71 +61,34 @@ function category_link($type, $node = NU
   // 'Add child' links, a la book.module.
   if ($type == 'node' && isset($node->category) && !$teaser) {
     if ($node->status == 1 && $node->category['depth'] < MENU_MAX_DEPTH) {
-      foreach (node_get_types() as $node_type) {
-        $behavior = variable_get('category_behavior_'. $node_type->type, 0);
-        if (!empty($behavior) && node_access('create', $node_type->type)) {
-          $allowed_containers = variable_get(
-          'category_allowed_containers_'. $node_type->type, array());
-          $print_link = FALSE;
-          if ($node->category['behavior'] == 'container') {
-            // If the current node is a container, and if the node type of the
-            // link is a container, then always print a link.
-            if ($behavior == 'container') {
-              $print_link = TRUE;
-            }
-            else {
-              // If the current node is a container, but the node type of the
-              // link is a category, then print a link only if the current node
-              // is an allowed container for the node type in question.
-              if (empty($allowed_containers) || in_array($node->nid, $allowed_containers)) {
-                $print_link = TRUE;
-              }
-            }
-          }
-          else {
-            // If the current node is a category, and if the node type of the
-            // link is a container, then always print a link.
-            if ($behavior == 'container') {
-              $print_link = TRUE;
-            }
-            else {
-              $container = category_get_container($node->category['cnid']);
-              if (!$container->tags) {
-                // If the current node is a category, and the node type of the
-                // link is also a category, then print a link only if the
-                // container of the current node is an allowed container for
-                // the node type in question.
-                if ($container->hierarchy && (empty($allowed_containers) || in_array($node->category['cnid'], $allowed_containers))) {
-                  $print_link = TRUE;
-                }
-                // If the current node and the node type of the link are both
-                // categories, but the container of the current node is NOT an
-                // allowed container for the node type, then print a link only
-                // if one of the allowed containers for the node type in
-                // question has the container of the current node as an allowed
-                // parent.
-
-                // Now say that backwards. ;-)
-                else {
-                  foreach ($allowed_containers as $allowed_cnid) {
-                    $allowed_container = category_get_container($allowed_cnid);
-                    if (!empty($allowed_container->allowed_parent) && $allowed_container->allowed_parent == $container->cid) {
-                      $print_link = TRUE;
-                      break;
-                    }
-                  }
-                }
-              }
-            }
-          }
 
-          if ($print_link) {
-            $links['category_add_'. $node_type->type] = array(
-              'title' => t('Add child @type', array('@type' => drupal_strtolower($node_type->name))),
-              'href' => 'node/add/'. str_replace('_', '-', check_plain($node_type->type)),
-              'query' => 'parent='. $node->nid,
-            );
-          }
+      // Always show 'Add child [container node types]' links
+      $types = _category_category_type_options();
+
+      if ($node->category['behavior'] == 'category') {
+        // Show 'Add child [category node types]' links on a category node only when we're
+        // not inside a free-tagging container (show locally allowed types only if hierarchy
+        // is not 0 on the container, and show also types allowed through distant parenting).
+        $container = category_get_container($node->category['cnid']);
+        if (!$container->tags) {
+          $local = !empty($container->hierarchy);
+          $types += _category_category_type_options($node->category['cnid'], $local, TRUE);
+        }
+      }
+      else {
+        // Always show the link on a container node (allowance through distant parenting
+        // makes no sense there).
+        $types += _category_category_type_options($node->nid, TRUE, FALSE);
+      }
+
+      // Render links for the collected node types, if accessible to current user.
+      foreach ($types as $type => $name) {
+        if (node_access('create', $type)) {
+          $links['category_add_'. $type] = array(
+            'title' => t('Add child @type', array('@type' => drupal_strtolower($name))),
+            'href' => 'node/add/'. str_replace('_', '-', check_plain($type)),
+            'query' => 'parent='. $node->nid,
+          );
         }
       }
     }
@@ -186,6 +149,71 @@ function category_link($type, $node = NU
 }
 
 /**
+ * Retrieve a list of applicable node types for various links and selections
+ * leading to creation of new categories and containers, based on behavior
+ * and allowed container settings for the existing types. If no usable node
+ * types for a container exists, a warning is printed (except that we didn't
+ * really look with that container in mind).
+ *
+ * @param $cnid
+ *   Container to create the new categories in, or NULL if a container is
+ *   going to be created.
+ * @param $local
+ *   For categories creation: Whether to retrieve node types allowed as
+ *   categories in the specified container locally.
+ * @param $distant
+ *   For categories creation: Whether to retrieve node types allowed as
+ *   categories through the allowed distant parent setting (via another
+ *   allowed containers for given node type).
+ * @return
+ *   Array of human-readable node type names, keyed by machine-readable names.
+ */
+function _category_category_type_options($cnid = NULL, $local = TRUE, $distant = FALSE) {
+  $options = array();
+  $mode = is_null($cnid) ? 'container' : 'category';
+
+  foreach (node_get_types() as $type) {
+    $behavior = variable_get('category_behavior_'. $type->type, 0);
+    if (!empty($behavior) && $behavior == $mode) {
+      $allowed_containers = variable_get('category_allowed_containers_'. $type->type, array());
+
+      if ($mode == 'container') {
+        // Looking for node types with container behavior: Include them all.
+        $options[$type->type] = $type->name;
+      }
+      elseif ($local && (empty($allowed_containers) || in_array($cnid, $allowed_containers))) {
+        // Looking for node types with category behavior, allowed in local container:
+        // Include the ones permitted by $allowed_containers
+        $options[$type->type] = $type->name;
+      }
+      elseif ($distant) {
+        // This node type didn't match any of the above conditions. If looking also for
+        // node types (category behavior) allowed through potential distant parenting,
+        // check that against all containers allowed for this node type.
+        foreach ($allowed_containers as $allowed_cnid) {
+          $allowed_container = category_get_container($allowed_cnid);
+          if (!empty($allowed_container->allowed_parent) && $allowed_container->allowed_parent == $cnid) {
+            $options[$type->type] = $type->name;
+            break;
+          }
+        }
+      }
+    }
+  }
+
+  // Show a warning about misconfiguration, if we have zero applicable node types,
+  // although the search included locally allowed types. This means that there are
+  // either no types with container behavior, or no types with category behavior
+  // and given container allowed. Only print the message for users being able to
+  // fix the configuration of node types.
+  if (empty($options) && $local && user_access('administer content types')) {
+    drupal_set_message(t('There are no content types with @behavior behavior available'. ($mode == 'category' ? ' for use with this container' : '') .'. To allow for creation of @behavior items, you need to go to the !content-types page, and assign @behavior behavior to one or more of your content types.', array('!content-types' => l(t('administer content types'), 'admin/content/types'), '@behavior' => $mode)), 'warning');
+  }
+
+  return $options;
+}
+
+/**
  * For containers not maintained by category.module, give the maintaining
  * module a chance to provide a path for categories in that container.
  *
@@ -771,9 +799,10 @@ function category_node_save($node, $cate
         }
 
         if (!$typed_cat_cid) {
+          $container = category_get_container($cnid);       
           $tag_node = new stdClass();
           $tag_node->title = $typed_cat;
-          $tag_node->type = 'category';
+          $tag_node->type = $container->default_category_type;
           $tag_node->category['cnid'] = $cnid;
           $tag_node->category['parents'][0] = $cnid;
           $node_options = variable_get('node_options_'. $tag_node->type, array('status', 'promote'));
@@ -840,7 +869,7 @@ function category_node_delete_revision($
 function category_node_type($op, $info) {
   if ($op == 'update' && !empty($info->old_type) && $info->type != $info->old_type) {
     db_query("UPDATE {category_cont_node_types} SET type = '%s' WHERE type = '%s'", $info->type, $info->old_type);
-
+    db_query("UPDATE {category_cont} SET default_category_type = '%s' WHERE default_category_type = '%s'", $info->type, $info->old_type);
     $allowed_containers = variable_get('category_allowed_containers_'. $info->old_type, array());
     variable_del('category_allowed_containers_'. $info->old_type);
     if (!empty($allowed_containers)) {
@@ -854,6 +883,7 @@ function category_node_type($op, $info) 
     }
   }
   elseif ($op == 'delete') {
+    db_query("UPDATE {category_cont} SET default_category_type = '%s' WHERE default_category_type = '%s'", 'category', $info->type);
     db_query("DELETE FROM {category_cont_node_types} WHERE type = '%s'", $info->type);
     variable_del('category_allowed_containers_'. $info->type);
     variable_del('category_behavior_'. $info->type);
@@ -1554,6 +1584,14 @@ function _category_add_form_elements(&$f
       '#options' => array_map('check_plain', node_get_types('names')),
       '#description' => t('Select content types to categorize using this container.'),
     );
+    $form['category']['content_types']['default_category_type'] = array(
+      '#type' => 'select',
+      '#title' => t('Default content type for new categories'),
+      '#default_value' => isset($node->category['default_category_type']) ? $node->category['default_category_type'] : 'category',
+      '#options' => _category_category_type_options(empty($node->nid) ? 0 : $node->nid),
+      '#description' => t('Choose the content type to use when creating a new category without full user input, such as freetagging categories, or legacy Taxonomy operations.'),
+      '#required' => TRUE,
+    );
 
     $form['category']['tagging'] = array(
       '#type' => 'fieldset',
@@ -1565,7 +1603,7 @@ function _category_add_form_elements(&$f
       '#type' => 'checkbox',
       '#title' => t('Tags'),
       '#default_value' => $node->category['tags'],
-      '#description' => t('Categories in this container are created by users when submitting posts by typing a comma separated list.'),
+      '#description' => t('Categories in this container are created by users when submitting posts by typing a comma separated list. Default content type selected for this container will be used for these newly created categories.'),
     );
     $form['category']['tagging']['multiple'] = array(
       '#type' => 'checkbox',
diff -urp --strip-trailing-cr ../category/wrappers/taxonomy/taxonomy.module.php ./wrappers/taxonomy/taxonomy.module.php
--- ../category/wrappers/taxonomy/taxonomy.module.php	2009-08-05 06:52:54.000000000 +0200
+++ ./wrappers/taxonomy/taxonomy.module.php	2009-09-20 21:27:29.000000000 +0200
@@ -959,8 +959,9 @@ function _taxonomy_term_into_category($t
     $node = node_load($term['tid']);
   }
 
+  $container = category_get_container($term['vid']);       
   $node->nid = $term['tid'];
-  $node->type = 'category';
+  $node->type = $container->default_category_type;
   $node->title = $term['name'];
   $node->body = $term['description'];
   $node->category['cnid'] = $term['vid'];
