? .at_hide_links.patch.swp
? at_hide_links.patch
Index: active_translation.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/active_translation/active_translation.admin.inc,v
retrieving revision 1.3
diff -u -p -r1.3 active_translation.admin.inc
--- active_translation.admin.inc	13 Jun 2008 19:48:52 -0000	1.3
+++ active_translation.admin.inc	17 Nov 2008 08:39:35 -0000
@@ -8,10 +8,23 @@ function active_translation_settings_for
   $form['active_translation_show_status'] = array(
     '#type' => 'radios',
     '#title' => t('Show Translation Status Message'),
-    '#options' => array(1 => t('Yes'), 0 => t('No')),
+    '#options' => array(
+      1 => t('Yes, inform visitors when they are viewing the node in another language because it has not been translated into their language.'),
+      0 => t("No, don't bother them."),
+    ),
     '#default_value' => variable_get('active_translation_show_status', 1),
-    '#description' => t('Setting this to yes will provide status information to visitors. The messages will indicate when the original node is being shown because a translation is not available '),
   );
+  $form['active_translation_hide_node_links'] = array(
+    '#type' => 'radios',
+    '#title' => t("Hide Node Translation Links"),
+    '#options' => array(
+      1 => t("Yes, hide the local module's links to other translations."),
+      0 => t('No, leave the links alone.'),
+    ),
+    '#default_value' => variable_get('active_translation_hide_node_links', 0),
+    '#description' => t("This can be useful the locale module's language switcher block is being used to select the language making the node links redundant."),
+  );
+
   return system_settings_form($form);
 }
 
Index: active_translation.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/active_translation/active_translation.install,v
retrieving revision 1.7
diff -u -p -r1.7 active_translation.install
--- active_translation.install	19 Jun 2008 18:31:02 -0000	1.7
+++ active_translation.install	17 Nov 2008 08:40:00 -0000
@@ -13,6 +13,7 @@ function active_translation_install() {
  */
 function active_translation_uninstall() {
   variable_del('active_translation_show_status');
+  variable_del('active_translation_hide_node_links');
 }
 
 /**
Index: active_translation.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/active_translation/active_translation.module,v
retrieving revision 1.10
diff -u -p -r1.10 active_translation.module
--- active_translation.module	11 Sep 2008 23:05:59 -0000	1.10
+++ active_translation.module	17 Nov 2008 08:40:20 -0000
@@ -43,6 +43,21 @@ function active_translation_menu() {
 }
 
 /**
+ * Implementation of hook_link_alter().
+ *
+ * Remove language links from the node.
+ */
+function active_translation_link_alter(&$links, $node) {
+  if (variable_get('active_translation_hide_node_links', 0)) {
+    foreach ($links AS $module => $link) {
+      if (preg_match('<^node\_translation\_>',$module)) {
+        unset($links[$module]);
+      }
+    }
+  }
+}
+
+/**
  * Implementation of hook_nodeapi().
  */
 function active_translation_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
