/[drupal]/contributions/modules/omniture/omniture.module
ViewVC logotype

Diff of /contributions/modules/omniture/omniture.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8, Wed Aug 19 09:16:21 2009 UTC revision 1.9, Wed Aug 19 09:39:17 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: omniture.module,v 1.7 2009/08/19 09:07:52 cytefx Exp $  // $Id: omniture.module,v 1.6 2008/10/07 03:03:36 ultimateboy Exp $
3  /*  /*
4   * @file   * @file
5   * Drupal Module: Omniture SiteCatalyst Stats   * Drupal Module: Omniture SiteCatalyst Stats
# Line 62  function omniture_footer($main = 0) { Line 62  function omniture_footer($main = 0) {
62      $codesnippet = variable_get('omniture_codesnippet', '');      $codesnippet = variable_get('omniture_codesnippet', '');
63    
64      // Taxonomy specific stuff - only for nodes      // Taxonomy specific stuff - only for nodes
65      if (module_exists('taxonomy') && $node = menu_get_object()) {      if ($node = menu_get_object()) {
66        $tax = $node->taxonomy;        $tax = $node->taxonomy;
67    
68        $vocabularies = taxonomy_get_vocabularies();        $vocabularies = taxonomy_get_vocabularies();
# Line 99  function omniture_footer($main = 0) { Line 99  function omniture_footer($main = 0) {
99        }        }
100      }      }
101    
102      $header = "<!-- SiteCatalyst code version: ";      $header = "<!-- SiteCatalyst code version: H.13. Copyright 1997-2007 Omniture, Inc. More info available at http://www.omniture.com -->\n";
     $header .=  check_plain(variable_get("omniture_version", 'H.13.'));  
     $header .= " Copyright 1997-2009 Omniture, Inc. More info available at http://www.omniture.com -->\n";  
103      $header .= "<script type=\"text/javascript\" language=\"JavaScript\" src=\"";      $header .= "<script type=\"text/javascript\" language=\"JavaScript\" src=\"";
104      $header .=  check_plain(variable_get("omniture_js_file_location", 'http://www.example.com/js/s_code_remote_h.js'));      $header .=  check_plain(variable_get("omniture_js_file_location", 'http://www.example.com/js/s_code_remote_h.js'));
105      $header .= "\"></script>\n";      $header .= "\"></script>\n";
# Line 114  function omniture_footer($main = 0) { Line 112  function omniture_footer($main = 0) {
112      $footer .= '//--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="';      $footer .= '//--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="';
113      $footer .= check_plain(variable_get("omniture_image_file_location", 'http://examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0')) .'"'."\n";      $footer .= check_plain(variable_get("omniture_image_file_location", 'http://examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0')) .'"'."\n";
114      $footer .= 'height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->'."\n";      $footer .= 'height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->'."\n";
115      $footer .= '<!-- End SiteCatalyst code version: ';      $footer .= '<!-- End SiteCatalyst code version: H.13. -->'."\n";
     $footer .=  check_plain(variable_get("omniture_version", 'H.13.'));  
     $footer .= ' -->'."\n";  
   
116    
117      if ($omniture_hooked_vars = module_invoke_all('omniture_variables', $main)) {      if ($omniture_hooked_vars = module_invoke_all('omniture_variables', $main)) {
118        if (isset($omniture_hooked_vars['header'])) {        if (isset($omniture_hooked_vars['header'])) {
# Line 164  function omniture_admin_settings() { Line 159  function omniture_admin_settings() {
159        '#default_value' => check_plain(variable_get("omniture_image_file_location", 'http://examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0')),        '#default_value' => check_plain(variable_get("omniture_image_file_location", 'http://examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0')),
160    );    );
161    
   $form['general']['omniture_version'] = array(  
       '#type' => 'textfield',  
       '#title' => t("SiteCatalyst version (used by omniture for debugging)"),  
       '#default_value' => check_plain(variable_get("omniture_version", 'H.13')),  
   );  
   
162    // Render the role overview.    // Render the role overview.
163    $result = db_query('SELECT * FROM {role} ORDER BY name');    $result = db_query('SELECT * FROM {role} ORDER BY name');
164    
# Line 198  function omniture_admin_settings() { Line 187  function omniture_admin_settings() {
187    );    );
188    
189    // Allow setting a vocabulary into a variable    // Allow setting a vocabulary into a variable
190    if (module_exists('taxonomy')) {    $vocabularies = taxonomy_get_vocabularies();
191      $vocabularies = taxonomy_get_vocabularies();    foreach ($vocabularies as $vid => $vocab) {
192      foreach ($vocabularies as $vid => $vocab) {      if ($vocab->tags == 0) {
193        if ($vocab->tags == 0) {        $form['vocabs']["omniture_vocabvidvar_{$vocab->vid}"] = array(
194          $form['vocabs']["omniture_vocabvidvar_{$vocab->vid}"] = array(          '#type' => 'textfield',
195            '#type' => 'textfield',          '#title' => t('Variable for %vocab', array('%vocab' => $vocab->name)),
196            '#title' => t('Variable for %vocab', array('%vocab' => $vocab->name)),          '#default_value' => variable_get("omniture_vocabvidvar_{$vocab->vid}", FALSE),
197            '#default_value' => variable_get("omniture_vocabvidvar_{$vocab->vid}", FALSE),        );
         );  
       }  
198      }      }
199    }    }
200    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.2