Index: omniture_php/omniture_php.info =================================================================== --- omniture_php/omniture_php.info (revision 0) +++ omniture_php/omniture_php.info (revision 0) @@ -0,0 +1,5 @@ +; $Id$ +name = Omniture PHP +description = Adds the ability for appropriately permissioned administrators to write PHP for creating dynamic Omniture variables. +core = 6.x +dependencies[] = omniture Index: omniture_php/omniture_php.install =================================================================== --- omniture_php/omniture_php.install (revision 0) +++ omniture_php/omniture_php.install (revision 0) @@ -0,0 +1,16 @@ + 'textarea', + '#title' => t('Omniture PHP code'), + '#default_value' => variable_get('omniture_php_variables', ''), + '#rows' => 15, + '#description' => t('Allows you to return complex PHP-driven Omniture variables from the Drupal administration section. Use with extreme caution! Your PHP must return a variables array as expected by hook_omniture_variables(). Do not include <?php ?> tags. !link', array('!link' => l(t('For more information and an example follow this link.'), 'http://drupal.org/node/182201#comment-1046683') )), + ); + // Add in our additional submit function. + $form['#submit'][] = 'omniture_php_admin_settings_submit'; +} + +/** + * Submit function for saving any entered PHP in a Drupal variable. + */ +function omniture_php_admin_settings_submit($form, &$form_state) { + variable_set('omniture_php_variables', $form_state['values']['omniture_php']); +}