--- longer_titles.info	Sat Jan 26 10:16:56 2008
+++ longer_titles.info	Sat Jan 26 10:29:51 2008
@@ -1,5 +1,6 @@
 name = Longer Node Titles
-description = Extends maxlength value of title field of the nodes from 128 characters set by default to 255 characters.
+description = Extends maxlength value of title field of the nodes from 128 characters set by default to 255 characters. Notice : do not uninstall if have titles with more than 128 characters length
+dependencies = content
 
 ; Information added by drupal.org packaging script on 2007-12-19
 version = "5.x-1.1"
--- longer_titles.install	Wed Dec 19 16:46:14 2007
+++ longer_titles.install	Sat Jan 26 10:16:12 2008
@@ -1,5 +1,13 @@
 <?php
-function longer_titles_install() {       
-  $result = db_query("ALTER TABLE {node} CHANGE title title VARCHAR(255) NOT NULL;");
-  $result = db_query("ALTER TABLE {node_revisions} CHANGE title title VARCHAR(255) NOT NULL;");
+function longer_titles_install() {
+	$result = db_query("ALTER TABLE {node} MODIFY `title` varchar(255);");
+	$result = db_query("ALTER TABLE {node_revisions} MODIFY `title` varchar(255);");
 }
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function longer_titles_uninstall() {
+  $result = db_query("ALTER TABLE {node} MODIFY `title` varchar(128);");
+  $result = db_query("ALTER TABLE {node_revisions} MODIFY `title` varchar(128);");
+}
\ No newline at end of file
--- longer_titles.module	Fri Dec 14 17:19:50 2007
+++ longer_titles.module	Sat Jan 26 10:30:45 2008
@@ -3,6 +3,11 @@
 function longer_titles_form_alter($form_id, &$form){
 // Override the title field in all forms     
   if (isset($form['title'])) {
+	// Override the publication node reference in all forms
+    $form['field_reference_publication'][0]['node_name']['#maxlength'] = 255;
+	// Override the event node reference in all forms
+    $form['field_event_reference'][0]['node_name']['#maxlength'] = 255;
+	// Override the title field in all forms
     $form['title']['#maxlength'] = 255;
   }
 }
\ No newline at end of file
