Index: flickr_attach/flickr_attach.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flickr_attach/flickr_attach.module,v
retrieving revision 1.6
diff -u -p -r1.6 flickr_attach.module
--- flickr_attach/flickr_attach.module	22 Feb 2010 21:22:23 -0000	1.6
+++ flickr_attach/flickr_attach.module	4 Mar 2010 17:02:40 -0000
@@ -6,6 +6,8 @@ define('NUM_FLICKR_PICKR_ELEMENTS_PER_PA
 define('CSS_CLASS_FLICKR_PICKR_CLICKR', 'flickr-pickr-clickr');
 define('CSS_CLASS_FLICKR_PICKR_SET', 'flickr-pickr-set');
 define('FLICKR_ATTACH_DEFAULT_UNAVAILABLE', 'Unable to attach flickr album at this time. Please try again later.');
+define('FLICKR_ATTACH_TYPE_FIELDS_WEIGHT', 0);
+
 /**
  * add a flickr-attach field to the node form
  *
@@ -148,6 +150,22 @@ function flickr_attach_form_alter(&$form
 	}
 }
 
+function flickr_attach_content_extra_fields($type_name) {
+	if (variable_get('flickr_attach_allow_'.$type_name, FALSE)) {
+    $fields['flickr_attach'] = array(
+      'label' => t('Flickr Images'),
+      'description' => t('Flickr Attach module form.'),
+      'weight' => FLICKR_ATTACH_TYPE_FIELDS_WEIGHT,
+    );
+    $fields['flickr_sets_attach'] = array(
+      'label' => t('Flickr Albums'),
+      'description' => t('Flickr Attach module form.'),
+      'weight' => FLICKR_ATTACH_TYPE_FIELDS_WEIGHT,
+    );
+    return $fields;
+  }
+}
+
 function flickr_attach_get_photos($page = false, $set_id = null) {
   drupal_add_css(drupal_get_path('module', 'flickr') .'/flickr.css');
 
@@ -368,13 +386,15 @@ function flickr_attach_add_nodeform_fiel
 		'#collapsed' => empty($node->flickr_attach['image']) && empty($node->flickr_attach['album']), 
 		'#description' => t('You can associate a photo with this post.'),
 		'picker' => $picker,
+    '#weight' => (function_exists('content_extra_field_weight') && isset($form['type'])) ? content_extra_field_weight($form['type']['#value'], 'flickr_attach') : FLICKR_ATTACH_TYPE_FIELDS_WEIGHT,
 	);
 	$form['flickr_sets_attach'] = array(
 		'#title' => t('Flickr Albums'),
 		'#type' => 'fieldset', '#collapsible' => true, 
 		'#collapsed' => empty($node->flickr_attach['image']) && empty($node->flickr_attach['album']),
 		'#description' => t('You can associate an album with this post.'),
-		'sets' => $sets
+		'sets' => $sets,
+    '#weight' => (function_exists('content_extra_field_weight') && isset($form['type'])) ? content_extra_field_weight($form['type']['#value'], 'flickr_sets_attach') : FLICKR_ATTACH_TYPE_FIELDS_WEIGHT,		
 		);
 }
 
