Index: modules/weblink/weblink.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/weblink/weblink.module,v
retrieving revision 1.83
diff -u -r1.83 weblink.module
--- modules/weblink/weblink.module	1 Sep 2005 13:44:53 -0000	1.83
+++ modules/weblink/weblink.module	13 Nov 2005 01:34:55 -0000
@@ -113,8 +113,8 @@
 /**
  * Node Hooks
  */
-function weblink_node_name($node) {
-  return t("weblink");
+function weblink_node_info() {
+  return array('weblink' => array('name' => t('weblink'), 'base' => 'weblink'));
 }
 
 function weblink_access($op, $node) {
@@ -128,15 +128,35 @@
 }
 
 function weblink_form(&$node, &$param) {
-  $output .= form_textfield(t("Link"), "url", $node->url, 60, 65535, t("Links should be submitted in a form similar to http://www.example.com") . ($error['url'] ? $error['url'] : ''), NULL, TRUE);
+  $form = array();
+  
+  $form['title'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Title'),
+    '#size' => 60,
+    '#maxlength' => 128,
+    '#required' => TRUE,
+    '#default_value' => $node->title,
+  );
+  
+  $form['body'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Body'),
+    '#default_value' => $node->body,
+    '#required' => FALSE,
+  );
+  
+  $form['url'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Link'),
+    '#size' => 60,
+    '#maxlength' => 512,
+    '#required' => TRUE,
+    '#default_value' => $node->url,
+    '#description' => t("Links should be submitted in a form similar to http://www.example.com"),
+  );
 
-  if (function_exists('taxonomy_node_form')) {
-     $output .= implode('', taxonomy_node_form('weblink', $node));
-  }
-
-  $output .= form_textarea(t("Body"), "body", $node->body, 60, 20, t("Textual description of the weblink") . ($error['body'] ? $error['body'] : ''));
-  $output .= filter_form('format', $node->format);
-  return $output;
+  return array_merge($form, filter_form($node->format));
 }
 
 function weblink_insert($node) {
@@ -249,4 +269,4 @@
       break;
   }
 } 
-?>
+
