--- cck_fieldgroup_tabs.module	2008-04-26 10:11:12.000000000 -0700
+++ cck_fieldgroup_tabs_new.module	2008-04-26 16:53:08.640625000 -0700
@@ -1,5 +1,5 @@
 <?php
-// $Id: cck_fieldgroup_tabs.module,v 1.1.2.3 2008/04/26 17:11:12 nedjo Exp $
+// $Id: cck_fieldgroup_tabs.module,v 1.1.2.2 2008/04/13 02:43:18 nedjo Exp $
 
 /**
  * @file
@@ -41,6 +41,12 @@ function cck_fieldgroup_tabs_admin_setti
     '#description' => t('Enter a title for the "Basics" tab.'),
     '#default_value' => variable_get('cck_fieldset_tabs_residual_title', t('Basics')),
   );
+    $form['cck_fieldset_tabs_residual_weight'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Tab weight'),
+    '#description' => t('Enter the weight of the tab.'),
+    '#default_value' => variable_get('cck_fieldset_tabs_residual_weight', '-20'),
+  );
   $form = system_settings_form($form);
   return $form;
 }
@@ -82,11 +88,12 @@ function cck_fieldgroup_tabs_form_alter(
     if (isset($form['fieldgroup_tabs']) && variable_get('cck_fieldset_tabs_residual', FALSE)) {
       // Add residual content to a tab if desired.
       $title = t(variable_get('cck_fieldset_tabs_residual_title', t('Basics')));
+      $weight = t(variable_get('cck_fieldset_tabs_residual_weight', '-20'));
       $residual = array(
         '#type' => 'tabpage',
         // Pass the value through t() if needed.
         '#title' =>  t($title != t('Basics') ? $title : 'Basics'),
-        '#weight' => -20,
+        '#weight' => $weight,
       );
       foreach (element_children($form) as $key) {
         if ($key != 'fieldgroup_tabs' && (!isset($form[$key]['#type']) || !in_array($form[$key]['#type'], array('button', 'submit')))) {
@@ -146,7 +153,7 @@ function cck_fieldgroup_tabs_nodeapi(&$n
           $residual = array(
             '#type' => 'tabpage',
             '#title' =>  t($title != t('Basics') ? $title : 'Basics'),
-            '#weight' => -20,
+            '#weight' => 20,
           );
           foreach (element_children($node->content) as $key) {
             if ($key != 'fieldgroup_tabs') {
