diff -up /Users/rich/Desktop/external/external.info /Users/rich/htdocs/drupal5/sites/all/modules/external/external.info
--- /Users/rich/Desktop/external/external.info	2009-05-07 23:01:43.000000000 +0100
+++ /Users/rich/htdocs/drupal5/sites/all/modules/external/external.info	2009-04-08 17:40:27.000000000 +0100
@@ -1,3 +1,10 @@
 ; $Id: external.info,v 1.1 2009/04/08 03:56:02 mcrittenden Exp $
 name = External Links
 description = Opens links to external sites in new tabs
+core = 6.x
diff -up /Users/rich/Desktop/external/external.module /Users/rich/htdocs/drupal5/sites/all/modules/external/external.module
--- external.module.orig	2009-05-07 23:02:23.000000000 +0100
+++ external.module	2009-05-08 23:14:24.000000000 +0100
@@ -11,16 +11,72 @@ function external_help($section) {
   $output = ''; 
   switch ($section) {
     case "admin/help#external":
-      $output = '<p>'.  t("Automatically open all external links in new tabs with jQuery") .'</p>';
+      $output = '<p>'.  t("Automatically opens all external links in new tabs using jQuery.") .'</p>';
       break;
   }
   return $output;
-} // function external_help
+}
 /**
- * Implementation of hook_init()
+ * Implementation of hook_menu().
  */
-function external_init() {
-	drupal_add_js(drupal_get_path('module', 'external') .'/external.js');
-} // function external_init
- 
+function external_menu($may_cache) {
+  $items = array();
+
+  if ($may_cache) {
+    $items[] = array(
+      'path' => 'admin/settings/external',
+      'title' => t('External'),
+      'description' => t('Configure the settings for External module.'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => array('external_admin_settings'),
+      'access' => user_access('administer external'),
+    );
+  }
+  elseif (external_active() && variable_get('external_enabled', TRUE)) {
+    external_add_files();
+  }
+
+  return $items;
+}
+
+function external_admin_settings() {
+  $form = array();
+
+  $form['external_enabled'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable External module'),
+    '#default_value' => variable_get('external_enabled', TRUE),
+  );
+  $form['external_disabled_patterns'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Pages'),
+    '#default_value' => variable_get('external_disabled_patterns', "admin*\nimg_assist*\nnode/add/*\nnode/*/edit"),
+    '#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
+  );
+
+  return system_settings_form($form);
+}
+
+function external_add_files() {
+  drupal_add_js(drupal_get_path('module', 'external') .'/external.js');
+}
+
+function external_active() {
+  $path = drupal_get_path_alias($_GET['q']);
+  $patterns = variable_get('external_disabled_patterns', "admin*\nimg_assist*\nnode/add/*\nnode/*/edit");
+  $front_page = variable_get('site_frontpage', 'node');
+
+  $regexp = '/^('. preg_replace(
+    array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'),
+    array('|', '.*', '\1'. preg_quote($front_page, '/') .'\2'),
+    preg_quote($patterns, '/')) .')$/';
+
+  // Compare with the internal and path alias (if any).
+  $page_match = preg_match($regexp, $path);
+  if ($path != $_GET['q']) {
+    $page_match = $page_match || preg_match($regexp, $_GET['q']);
+  }
+
+  return !$page_match;
+}
