? js
? omniture-6--2.patch
Index: omniture.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/omniture/omniture.module,v
retrieving revision 1.6.4.6
diff -u -p -r1.6.4.6 omniture.module
--- omniture.module	18 Feb 2010 16:33:36 -0000	1.6.4.6
+++ omniture.module	10 Jun 2010 21:33:11 -0000
@@ -24,6 +24,20 @@ function omniture_perm() {
 }
 
 /**
+ * Implementation of hook_init().
+ */
+function omniture_init() {
+  /*
+   * If the Clickmap setting was enabled, include the
+   * JavaScript file that will modify all links on the page accordingly.
+   */
+  if (variable_get('omniture_clickmap', FALSE) == TRUE) {
+    $module_basepath = drupal_get_path('module', 'omniture');
+    drupal_add_js($module_basepath . '/js/omniture.clickmap.js', 'module', 'header');
+  }
+}
+
+/**
  * Implementation of hook_menu
  */
 function omniture_menu() {
@@ -182,6 +196,18 @@ function omniture_admin_settings() {
       '#default_value' => check_plain(variable_get("omniture_version", 'H.13')),
   );
 
+  $form['general']['omniture_clickmap'] = array(
+    '#type' => 'radios',
+    '#title' => t('Clickmap'),
+    '#default_value' => variable_get('omniture_clickmap', 0),
+    '#options' => array(
+      t('Disabled'),
+      t('Enabled'),
+    ),
+    '#description' => t('Enabling Clickmap will dynamically add the required
+      JavaScript to every link on your site.'),
+  );
+
   // Render the role overview.
   $result = db_query('SELECT * FROM {role} ORDER BY name');
 
