From 99ff8c105ec632e1ac91f7142d125446d066b532 Mon Sep 17 00:00:00 2001
From: Daniel Wehner <daniel.wehner@erdfisch.de>
Date: Wed, 12 Aug 2009 17:30:23 +0200
Subject: [PATCH] implementation of hook_content_extra_fields

---
diff --git webfm.module webfm/webfm.module
index 178d1bc..9baad05 100755
--- webfm.module
+++ webfm.module
@@ -395,7 +395,8 @@ function webfm_nodeapi(&$node, $op, $teaser) {
         if(isset($show_files) && is_array($show_files)) {
           $node->content['webfm_attachments'] = array(
             '#value' => theme('webfm_attachments', $show_files),
-            '#weight' => 10);
+            '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'webfm_attachments') : 10,
+          );
           drupal_add_css(drupal_get_path('module', 'webfm').'/css/webfm.css');
         }
       }
@@ -444,6 +445,18 @@ function webfm_nodeapi(&$node, $op, $teaser) {
 }
 
 /**
+ * Implementation of hook_content_extra_fields().
+ */
+function webfm_content_extra_fields($type) {
+  $extras['webfm_attachments'] = array(
+    'label' => t('Webfm Attachments'),
+    'description' => t('Displays the attachments as table'),
+    'weight' => 10,
+  );
+  return $extras;
+}
+
+/**
  * Implementation of hook_form_alter().
  */
 function webfm_form_alter(&$form, &$form_state, $form_id) {
-- 
1.6.0.4

