| 1 |
<?php |
<?php |
| 2 |
// $Id: omniture.module,v 1.6 2008/10/07 03:03:36 ultimateboy Exp $ |
// $Id: omniture.module,v 1.7 2009/08/19 09:07:52 cytefx Exp $ |
| 3 |
/* |
/* |
| 4 |
* @file |
* @file |
| 5 |
* Drupal Module: Omniture SiteCatalyst Stats |
* Drupal Module: Omniture SiteCatalyst Stats |
| 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 ($node = menu_get_object()) { |
if (module_exists('taxonomy') && $node = menu_get_object()) { |
| 66 |
$tax = $node->taxonomy; |
$tax = $node->taxonomy; |
| 67 |
|
|
| 68 |
$vocabularies = taxonomy_get_vocabularies(); |
$vocabularies = taxonomy_get_vocabularies(); |
| 198 |
); |
); |
| 199 |
|
|
| 200 |
// Allow setting a vocabulary into a variable |
// Allow setting a vocabulary into a variable |
| 201 |
$vocabularies = taxonomy_get_vocabularies(); |
if (module_exists('taxonomy')) { |
| 202 |
foreach ($vocabularies as $vid => $vocab) { |
$vocabularies = taxonomy_get_vocabularies(); |
| 203 |
if ($vocab->tags == 0) { |
foreach ($vocabularies as $vid => $vocab) { |
| 204 |
$form['vocabs']["omniture_vocabvidvar_{$vocab->vid}"] = array( |
if ($vocab->tags == 0) { |
| 205 |
'#type' => 'textfield', |
$form['vocabs']["omniture_vocabvidvar_{$vocab->vid}"] = array( |
| 206 |
'#title' => t('Variable for %vocab', array('%vocab' => $vocab->name)), |
'#type' => 'textfield', |
| 207 |
'#default_value' => variable_get("omniture_vocabvidvar_{$vocab->vid}", FALSE), |
'#title' => t('Variable for %vocab', array('%vocab' => $vocab->name)), |
| 208 |
); |
'#default_value' => variable_get("omniture_vocabvidvar_{$vocab->vid}", FALSE), |
| 209 |
|
); |
| 210 |
|
} |
| 211 |
} |
} |
| 212 |
} |
} |
| 213 |
|
|