Index: custom_links.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/custom_links/custom_links.admin.inc,v
retrieving revision 1.2
diff -u -p -r1.2 custom_links.admin.inc
--- custom_links.admin.inc	29 Jan 2008 08:35:49 -0000	1.2
+++ custom_links.admin.inc	5 May 2009 05:17:37 -0000
@@ -12,7 +12,7 @@ function custom_links_page() {
     $row = array();
     $row[] = $link->link_key;
     $row[] =  $link->title;
-    $row[] =  l(t('edit'), 'admin/build/custom_links/edit/'. $link->lid);
+    $row[] =  l(t('edit'), 'admin/build/custom_links/edit/' . $link->lid);
     $rows[] = $row;
   }
   if (count($rows) == 0) {
@@ -69,24 +69,32 @@ function custom_links_form() {
   $form['link']['path'] = array(
     '#type' => 'textfield',
     '#title' => t('Path'),
-    '#description' => t("The Drupal path for the link. (!sample_url)", array('!sample_url' => $base_url .'/<u><b>node/1</b></u>#comment')),
+    '#description' => t("The Drupal path for the link. (!sample_url)", array('!sample_url' => $base_url . '/<u><b>node/1</b></u>#comment')),
     '#default_value' => $lid ? $link->path : NULL
   );
 
   $form['link']['querystring'] = array(
     '#type' => 'textfield',
     '#title' => t('Querystring'),
-    '#description' => t("The optional querystring for the link. (!sample_url)", array('!sample_url' => $base_url .'/article?<u><b>id=1</b></u>')),
+    '#description' => t("The optional querystring for the link. (!sample_url)", array('!sample_url' => $base_url . '/article?<u><b>id=1</b></u>')),
     '#default_value' => $lid ? $link->query : NULL
   );
 
   $form['link']['fragment'] = array(
     '#type' => 'textfield',
     '#title' => t('Anchor'),
-    '#description' => t("The optional HTML anchor for the link. (!sample_url)", array('!sample_url' => $base_url .'/node/1<u><b>#comment</b></u>')),
+    '#description' => t("The optional HTML anchor for the link. (!sample_url)", array('!sample_url' => $base_url . '/node/1<u><b>#comment</b></u>')),
     '#default_value' => $lid ? $link->fragment : NULL
   );
 
+  $form['link']['attribute_title'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Title Attribute'),
+    '#required' => FALSE,
+    '#description' => t("The HTML anchor title attribute."),
+    '#default_value' => $lid ? $link->attribute_title : NULL
+  );
+
   $form['help'] = array(
     '#type' => 'fieldset',
     '#collapsible' => TRUE,
@@ -150,6 +158,20 @@ function custom_links_form() {
     '#default_value' => $lid ? $link->viewer_perm : 'access content'
   );
 
+  $form['filters']['check_remove_add_comment'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Remove the \'Add Comment\' link when this link is present'),
+    '#return_value' => 1,
+    '#default_value' => $lid ? $link->check_remove_add_comment : 0
+  );
+
+  $form['filters']['check_remove_node_read_more'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Remove the node \'Read More\' link when this link is present'),
+    '#return_value' => 1,
+    '#default_value' => $lid ? $link->check_remove_node_read_more : 0
+  );
+
   $form['buttons']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Submit'),
Index: custom_links.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/custom_links/custom_links.info,v
retrieving revision 1.5
diff -u -p -r1.5 custom_links.info
--- custom_links.info	27 Jan 2008 09:16:01 -0000	1.5
+++ custom_links.info	5 May 2009 05:17:37 -0000
@@ -2,3 +2,10 @@
 name = Custom Links
 description = Allows administrators to add custom links to nodes. More By This Author, Visit Bob's Blog, etc.
 core = 6.x
+
+; Information added by drupal.org packaging script on 2008-01-27
+version = "6.x-1.4"
+core = "6.x"
+project = "custom_links"
+datestamp = "1201425603"
+
Index: custom_links.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/custom_links/custom_links.install,v
retrieving revision 1.2
diff -u -p -r1.2 custom_links.install
--- custom_links.install	27 Jan 2008 09:16:01 -0000	1.2
+++ custom_links.install	5 May 2009 05:17:37 -0000
@@ -87,6 +87,27 @@ function custom_links_schema() {
         'default' => 'AND',
         'description' => t("An optional anchor fragment to be appended to the URL path."),
       ),
+      'attribute_title' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => t("The HTML anchor title attribute of the {custom_link}.")
+      ),
+      'check_remove_add_comment' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'size' => 'small',
+        'default' => 1,
+        'description' => t('A boolean flag indicating whether to remove the \'Add Comment\' link when this link is present.'),
+      ),
+      'check_remove_node_read_more' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'size' => 'small',
+        'default' => 1,
+        'description' => t('A boolean flag indicating whether to remove the node \'Read More\' link when this link is present.'),
+      ),
     ),
     'primary key' => array('lid'),
   );
@@ -109,6 +130,27 @@ function custom_links_update_1() {
   return $ret;
 }
 
+/* untested, provided for the maintainer's convenience... */
+/*
+function custom_links_update_2() {
+  $ret = array();
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+      $ret[] = update_sql("ALTER TABLE {custom_link} ADD attribute_title varchar(255)");
+      $ret[] = update_sql("ALTER TABLE {custom_link} ADD check_remove_add_comment smallint(6)");
+      $ret[] = update_sql("ALTER TABLE {custom_link} ADD check_remove_node_read_more smallint(6)");
+      break;
+    case 'pgsql':
+      db_add_column($ret, 'custom_link', 'attribute_title', 'varchar', array('default' => ''));
+      db_add_column($ret, 'custom_link', 'check_remove_add_comment', 'smallint', array('default' => 0));
+      db_add_column($ret, 'custom_link', 'check_remove_node_read_more', 'smallint', array('default' => 0));
+      break;
+  }
+  return $ret;
+}
+*/
+
 function custom_links_uninstall() {
   drupal_uninstall_schema('custom_links');
 }
Index: custom_links.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/custom_links/custom_links.module,v
retrieving revision 1.6
diff -u -p -r1.6 custom_links.module
--- custom_links.module	29 Jan 2008 08:35:49 -0000	1.6
+++ custom_links.module	5 May 2009 05:17:37 -0000
@@ -113,11 +113,22 @@ function _custom_links_build_links($node
       $links[$link->link_key]['fragment'] = $link->fragment;
     }
 
+    if (!empty($link->attribute_title)) {
+      $links[$link->link_key]['attributes'] = array('title' => $link->attribute_title);
+    }
+
     if (module_exists('token')) {
       $links[$link->link_key] = token_replace($links[$link->link_key], 'node', $node);
+
+      if ($links[$link->link_key]['attributes']) {
+        $links[$link->link_key]['attributes'] = token_replace($links[$link->link_key]['attributes'], 'node', $node);
+      }
     }
 
     $links[$link->link_key]['html'] = $link->check_html;
+
+    $links[$link->link_key]['remove_add_comment'] = $link->check_remove_add_comment;
+    $links[$link->link_key]['remove_node_read_more'] = $link->check_remove_node_read_more;
   }
   return $links;
 }
@@ -160,3 +171,24 @@ function _custom_links_delete_link($lid)
 function theme_custom_links_block($links) {
   return theme('links', $links);
 }
+
+function custom_links_link_alter(&$links, $node) {
+  $remove_comment_add = FALSE;
+  $remove_node_read_more = FALSE;
+
+  foreach ($links as $module => $link) {
+    if ($link['remove_add_comment'])
+      $remove_add_comment = TRUE;
+
+    if ($link['remove_node_read_more'])
+      $remove_node_read_more = TRUE;
+  }
+
+  if ($remove_add_comment && $links['add_comment']) {
+    unset($links['add_comment']);
+  }
+
+  if ($remove_node_read_more && $links['node_read_more']) {
+    unset($links['node_read_more']);
+  }
+}
