Index: flexinode.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexinode/flexinode.module,v
retrieving revision 1.54
diff -u -r1.54 flexinode.module
--- flexinode.module	29 Sep 2005 02:44:08 -0000	1.54
+++ flexinode.module	29 Sep 2005 04:13:22 -0000
@@ -479,7 +479,7 @@
     $ctype = flexinode_load_content_type($ctype->ctype_id);
     $rows[] = array(t($ctype->name), $ctype->description, l(t('edit content type'), 'admin/node/types/edit_type/' . $ctype->ctype_id));
 
-    $data = t('Title') . '<br />';
+    $data = $ctype->title_label . '<br />';
     foreach ($ctype->fields as $field) {
       $data .= t($field->label) . ' (' . l(t('edit field'), 'admin/node/types/edit_field/' . $field->field_id) . ')<br />';
     }
@@ -624,6 +624,7 @@
   }
 
   $ctype = flexinode_load_content_type($node->ctype_id);
+  $output = form_textfield($ctype->title_label, 'title', $node->title, 60, 128, NULL, NULL, TRUE);
 
   if (function_exists('taxonomy_node_form')) {
     $output .= implode('', taxonomy_node_form($node->type, $node));
@@ -884,6 +885,7 @@
 
   $form .= form_textfield(t('Content type name'), 'name', $edit['name'], 60, 128, '', NULL, TRUE);
   $form .= form_textfield(t('Description'), 'description', $edit['description'], 60, 128, t('A one-line description of the content type.'));
+  $form .= form_textfield(t('Title label'), 'title_label', $edit['ctype_id'] ? $edit['title_label'] : 'Title', 60, 128, 'You can provide a descriptive title label appropriate for the kind of content your flexinode content will store.<br />Examples: "Book title," "Song name," "Headline," etc.', NULL, TRUE);
   $form .= form_textarea(t('Help text'), 'help', $edit['help'], 60, 5, t('Instructions to present to the user when adding new content of this type.'));
 
   $form .= form_submit(t('Submit'));
@@ -903,6 +905,9 @@
   if (isset($edit['name']) && !$edit['name']) {
     $errors['name'] = t('You must give this content type a name.');
   }
+  if (isset($edit['title_label']) && !$edit['title_label']) {
+    $errors['title_label'] = t('You must give titles a label.');
+  }
   foreach ($errors as $name => $message) {
     form_set_error($name, $message);
   }
@@ -918,14 +923,14 @@
 
     $former_ctype = flexinode_load_content_type($ctype_id);
 
-    db_query("UPDATE {flexinode_type} SET name = '%s', description = '%s', help = '%s' WHERE ctype_id = %d", $edit['name'], $edit['description'], $edit['help'], $ctype_id);
+    db_query("UPDATE {flexinode_type} SET name = '%s', description = '%s', title_label = '%s', help = '%s' WHERE ctype_id = %d", $edit['name'], $edit['description'], $edit['title_label'], $edit['help'], $ctype_id);
 
     drupal_set_message(t('updated content type "%name".', array('%name' => $edit['name'])));
   }
   else {
     $ctype_id = db_next_id('{flexinode_ctype}');
 
-    db_query("INSERT INTO {flexinode_type} (name, description, help, ctype_id) VALUES ('%s', '%s', '%s', %d)", $edit['name'], $edit['description'], $edit['help'], $ctype_id);
+    db_query("INSERT INTO {flexinode_type{ (name, description, help, ctype_id, title_label) VALUES ('%s', '%s', '%s', %d, '%s')", $edit['name'], $edit['description'], $edit['help'], $ctype_id, $edit['title_label']);
 
     drupal_set_message(t('created new content type "%name".', array('%name' => $edit['name'])));
   }
