array( 'name' => t('Information'), 'description' => t('Set site information settings for your virtual site, like the name and frontpage.'), ), ); } function virtual_site_information_feature_form($context) { global $conf; // Temporarily relace the current settings by the ones of the virtual site. $orig = $conf; $conf = array_merge($conf, (array) $context); // Retrieve theme settings form include_once('modules/system/system.admin.inc'); $form['settings'] = system_site_information_settings(); $form['settings']['#tree'] = TRUE; // Restore current settings $conf = $orig; // Unset unwanted form parts unset($form['settings']['buttons'], $form['settings']['#submit'], $form['settings']['#theme']); return $form; } function virtual_site_information_feature_submit($form, &$form_state) { return $form_state['values']['settings']; } function virtual_site_information_feature($context) { global $conf; if (is_array($context) && count($context)) { $old_front_path = drupal_get_normal_path(variable_get('site_frontpage', 'node')); // Overwrite front page if ($context['site_frontpage'] && $old_front_path == $_GET['q'] && $old_front_path != $context['site_frontpage']) { $_GET['q'] = drupal_get_normal_path($context['site_frontpage']); } // Others except site object are all just variables unset($context['site']); $conf = array_merge($conf, $context); } } ?>