--- attachment.module +++ attachment.module @@ -74,6 +74,12 @@ function attachment_form_alter($form_id, '#default_value'=>variable_get('attachment_node_'. $oldtype, 0), '#options'=>array(0=>t('Disabled'), 1=>t('Enabled')), ); + $form['workflow']['attachment_weight'] = array( + '#type' => 'weight', + '#title' => t('Attachment weight'), + '#default_value' => variable_get('attachment_weight_'. $form['#node_type']->type, 0), + '#description' => t("This value determines the order of the attachment table when displayed in the body."), + ); break; } } @@ -108,7 +114,7 @@ function attachment_nodeapi(&$node, $op, if (!$arg) { $node->content['attachment'] = array( '#value' => '
'. theme('attachments', $node), - '#weight' => 10, + '#weight' => variable_get("attachment_weight_{$node->type}", 0) ); } if (variable_get('attachment_display_teaser', 0)) {