I am trying to add some more text boxes to Site Information and wondering what's the best way.

I've created a custom module and added this:

/*
 * adding another box for home page text box
 */	
$form['site_home_page_text_box'] = array(
   '#type' => 'textarea',
   '#title' => t('Home page text box'),
   '#default_value' => variable_get('site_home_page_text_box', ''),
   '#description' => t('Your site\'s mission statement or focus.')
 );

However, i cannot see where this stuff is stored. I don't see it in table "variable" of the site's database. I did some searching too but haven't found a write-up on how to do it.

If someone can post a way to achieve this correctly, I'd appreciate it.

Thanks,
Vlad

Comments

bluepal’s picture

Me too, I would like to know how to add more variables to the "Site Information" configuration section. Has anyone figured out how to do it ??

mtset’s picture

We're also curious about this. It would appear there are no solutions as of yet, so we may build a new module to do this. We'll keep you informed.

lukio’s picture

check out this links!

http://stackoverflow.com/questions/983853/add-fields-to-the-site-informa...
http://drupal.org/node/609234

In a custom module, you can use hook_for_alter() to add extra fields to that form. For example:

<?php
function my_module_hook_form_alter(&$form, $form_state, $form_id) {i
  if ($form_id == 'system_site_information_settings') {
    $form['my_module_extra_setting'] = array(
      '#type' => 'checkbox',
      '#title' => t('Use my setting'),
      '#default_value' => variable_get('my_module_extra_setting', TRUE),
    );
  }
}
?>

Luciano Rossi - lukio@gcoop.coop
http://gcoop.coop - Cooperativa de Software Libre
La Pampa 4395 CABA C1430BXU +54 11 5254-7755