? 51758_form_weight.patch
Index: usernodes.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/usernodes/usernodes.module,v
retrieving revision 1.3
diff -u -F^f -r1.3 usernodes.module
--- usernodes.module	27 Feb 2006 06:53:42 -0000	1.3
+++ usernodes.module	19 Mar 2006 10:07:12 -0000
@@ -109,78 +109,80 @@ function usernodes_form_alter($form_id, 
 
   switch ($form_id) {
     case $type .'_node_settings':
-      $form['usernodes'] = array('#type' => 'fieldset', '#title' => t('User Node Settings'));
-	  $form['usernodes']['usernodes_limit_'. $type] = array(
-		'#type' => 'textfield',
-		'#title' => t('User Node Max'),
-		'#default_value' => variable_get('usernodes_limit_'. $type, 0),
-		'#size' => 4,
-		'#maxlength' => 4,
-		'#description' => t('Max number of this type of node, per user. Enter 0 for no limit.'),
-		'#required' => FALSE,
-		'#validate' => array('is_integer_between' => array(0)),
-	  );
-
-	  $form['usernodes']['usernodes_proflink_'. $type] = array(
-		'#type' => 'checkbox',
-		'#title' => t('Display Profile Link in nodes?'),
-		'#default_value' => variable_get('usernodes_proflink_'. $type, 0),
-		'#return_value' => 1,
-		'#description' => t("Display link to user's profile on nodes of this type?"),
-	  );
-
-	  $form['usernodes']['usernodes_proflinkt_'. $type] = array(
-		'#type' => 'checkbox',
-		'#title' => t('Display Profile Link in teasers?'),
-		'#default_value' => variable_get('usernodes_proflinkt_'. $type, 0),
-		'#return_value' => 1,
-		'#description' => t("Display link to user's profile on teasers for nodes of this type?"),
-	  );
-
-	  $form['usernodes']['usernodes_proflist_'. $type] = array(
-		'#type' => 'textfield',
-		'#title' => t('# of Nodes to show in Profile'),
-		'#default_value' => variable_get('usernodes_proflist_'. $type, 0),
-		'#size' => 4,
-		'#maxlength' => 4,
-		'#description' => t("Number of nodes of this type to list in the user's profile. Enter 0 to show none in profile."),
-		'#required' => FALSE,
-		'#validate' => array('is_integer_between' => array(0)),
-	  );
-
-	  $form['usernodes']['usernodes_profilecat_'. $type] = array(
-		'#type' => 'textfield',
-		'#title' => t('Profile Category'),
-		'#default_value' => variable_get('usernodes_profilecat_'. $type, "User Content"),
-		'#size' => 32,
-		'#maxlength' => 32,
-		'#description' => t('Category on user profile that these nodes will be listed under, if "Nodes to Show" above, is more than zero.'),
-		'#required' => FALSE,
-	  );
-
-	  $form['usernodes']['usernodes_profeditlink_'. $type] = array(
-		'#type' => 'checkbox',
-		'#title' => t('Display Edit/Delete Link in profile?'),
-		'#default_value' => variable_get('usernodes_profeditlink_'. $type, 0),
-		'#return_value' => 1,
-		'#description' => t("In user's profile, display links to allow editing/deleting of content? (Links will not be displayed when user lacks node access permissions to edit/delete.)"),
-	  );
-
-	  $form['usernodes']['usernodes_profaddlink_'. $type] = array(
-		'#type' => 'checkbox',
-		'#title' => t('Display Add Content Link in profile?'),
-		'#default_value' => variable_get('usernodes_profaddlink_'. $type, 0),
-		'#return_value' => 1,
-		'#description' => t("In user's profile, display links to allow adding new content of this type? (Link will not be displayed if user has created maximum amount of that content type.)"),
-	  );
+      $form['usernodes'] = array(
+        '#type' => 'fieldset',
+        '#title' => t('User Node Settings'),
+        '#weight' => -1);
+      $form['usernodes']['usernodes_limit_'. $type] = array(
+        '#type' => 'textfield',
+        '#title' => t('User Node Max'),
+        '#default_value' => variable_get('usernodes_limit_'. $type, 0),
+        '#size' => 4,
+        '#maxlength' => 4,
+        '#description' => t('Max number of this type of node, per user. Enter 0 for no limit.'),
+        '#required' => FALSE,
+        '#validate' => array('is_integer_between' => array(0)),
+      );
+
+      $form['usernodes']['usernodes_proflink_'. $type] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Display Profile Link in nodes?'),
+        '#default_value' => variable_get('usernodes_proflink_'. $type, 0),
+        '#return_value' => 1,
+        '#description' => t("Display link to user's profile on nodes of this type?"),
+      );
+
+      $form['usernodes']['usernodes_proflinkt_'. $type] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Display Profile Link in teasers?'),
+        '#default_value' => variable_get('usernodes_proflinkt_'. $type, 0),
+        '#return_value' => 1,
+        '#description' => t("Display link to user's profile on teasers for nodes of this type?"),
+      );
+
+      $form['usernodes']['usernodes_proflist_'. $type] = array(
+        '#type' => 'textfield',
+        '#title' => t('# of Nodes to show in Profile'),
+        '#default_value' => variable_get('usernodes_proflist_'. $type, 0),
+        '#size' => 4,
+        '#maxlength' => 4,
+        '#description' => t("Number of nodes of this type to list in the user's profile. Enter 0 to show none in profile."),
+        '#required' => FALSE,
+        '#validate' => array('is_integer_between' => array(0)),
+      );
+
+      $form['usernodes']['usernodes_profilecat_'. $type] = array(
+        '#type' => 'textfield',
+        '#title' => t('Profile Category'),
+        '#default_value' => variable_get('usernodes_profilecat_'. $type, "User Content"),
+        '#size' => 32,
+        '#maxlength' => 32,
+        '#description' => t('Category on user profile that these nodes will be listed under, if "Nodes to Show" above, is more than zero.'),
+        '#required' => FALSE,
+      );
+
+      $form['usernodes']['usernodes_profeditlink_'. $type] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Display Edit/Delete Link in profile?'),
+        '#default_value' => variable_get('usernodes_profeditlink_'. $type, 0),
+        '#return_value' => 1,
+        '#description' => t("In user's profile, display links to allow editing/deleting of content? (Links will not be displayed when user lacks node access permissions to edit/delete.)"),
+      );
+
+      $form['usernodes']['usernodes_profaddlink_'. $type] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Display Add Content Link in profile?'),
+        '#default_value' => variable_get('usernodes_profaddlink_'. $type, 0),
+        '#return_value' => 1,
+        '#description' => t("In user's profile, display links to allow adding new content of this type? (Link will not be displayed if user has created maximum amount of that content type.)"),
+      );
 
       break;
     case $type .'_node_form':
       if (!$node->nid && _usernodes_at_max($node->type, $node->uid)) {
-	   drupal_set_message("You cannot create any more nodes of this type.");
-	   $form = NULL;
-	  }
-      
+        drupal_set_message("You cannot create any more nodes of this type.");
+        $form = NULL;
+      }
       break;
     default:
       // break;
