### Eclipse Workspace Patch 1.0
#P service_links
Index: service_links.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/service_links/service_links.module,v
retrieving revision 1.18.2.5
diff -u -r1.18.2.5 service_links.module
--- service_links.module	5 Nov 2007 15:02:40 -0000	1.18.2.5
+++ service_links.module	12 Mar 2008 21:25:51 -0000
@@ -169,6 +169,14 @@
     '#default_value' => variable_get('service_links_style', 1),
     '#options' => array(1 => t('Text links'), 2 => t('Image links'), 3 => t('Image and text links')),
   );
+  if (module_exists('elf')) {
+    $form['how_to_show_the_links']['service_links_external'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('External Service Links'),
+      '#description' => t('Open service links in new window using the External Links module (installed)'),
+      '#default_value' => variable_get('service_links_external', 0),
+    );
+  }
 
   if (module_exists('aggregator2')) {
     $form['aggregator2_settings'] = array(
@@ -404,17 +412,23 @@
         );
         break;
     }
+    if (module_exists('elf') && variable_get('service_links_external', NULL)) {
+      $link['attributes']['class'] = 'external-link';
+    }
   }
   else {
+    if (module_exists('elf') && variable_get('service_links_external', NULL)) {
+      $external_link = 'class="external-link" ';
+    }
     switch (variable_get('service_links_style', 1)) {
       case 1:
-        $link = '<a href="'. check_url($url) .'" title="'. $title .'" rel="nofollow">'. $text .'</a>';
+        $link = '<a href="'. check_url($url) .'" title="'. $title .'" rel="nofollow '. $external_link .'">'. $text .'</a>';
         break;
       case 2:
-        $link = '<a href="'. check_url($url) .'" title="'. $title .'" rel="nofollow"><img src="'. $base_path . drupal_get_path('module', 'service_links') .'/'. $image .'" alt="'. $text .'" /></a>';
+        $link = '<a href="'. check_url($url) .'" title="'. $title .'" rel="nofollow '. $external_link .'"><img src="'. $base_path . drupal_get_path('module', 'service_links') .'/'. $image .'" alt="'. $text .'" /></a>';
         break;
       case 3:
-        $link = '<a href="'. check_url($url) .'" title="'. $title .'" rel="nofollow"><img src="'. $base_path . drupal_get_path('module', 'service_links') .'/'. $image .'" alt="'. $text .'" /> '. $text .'</a>';
+        $link = '<a href="'. check_url($url) .'" title="'. $title .'" rel="nofollow '. $external_link .'"><img src="'. $base_path . drupal_get_path('module', 'service_links') .'/'. $image .'" alt="'. $text .'" /> '. $text .'</a>';
         break;
     }
   }
