function hosting_alias_settings

7.x-3.x hosting_alias.module hosting_alias_settings($form, &$form_state)

Configuration form for site aliases.

See also


1 string reference to 'hosting_alias_settings'
hosting_alias_menu in alias/hosting_alias.module
Implements hook_menu().


alias/hosting_alias.module, line 457
Allow sites to have domain aliases that they can be accessed with.


function hosting_alias_settings($form, &$form_state) {
  $form['hosting_alias_subdomain'] = array(
    '#type' => 'textfield',
    '#title' => t('Domain used for automatic subdomain hosting'),
    '#description' => t('To be able to provide a temporary url for your sites, you need to have configured a wild card dns entry<br /> resolving all calls to subdomains of your chosen domain, to point at your web server.'),
    '#default_value' => variable_get('hosting_alias_subdomain', ''),
  $form['hosting_alias_automatic_www'] = array(
    '#type' => 'checkbox',
    '#title' => t('Generate alias automatically'),
    '#description' => t('If a domain name does not start with www., automatically create an alias for www.domain?'),
    '#default_value' => variable_get('hosting_alias_automatic_www', FALSE),
  $form['hosting_alias_automatic_no_www'] = array(
    '#type' => 'checkbox',
    '#title' => t('Generate alias automatically'),
    '#description' => t('If a domain name starts with www., automatically create an alias for'),
    '#default_value' => variable_get('hosting_alias_automatic_no_www', FALSE),

  $form['hosting_alias_redirection'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use redirects instead of aliases by default'),
    '#description' => t('Instead of serving the primary domain under a symlinked site alias, this module can also redirect the user to the primary domain from an alias. This setting can be controlled per site. Setting this option here will make redirection the default behavior for site aliases.'),
    '#default_value' => variable_get('hosting_alias_redirection', FALSE),
  $form['#submit'][] = 'hosting_alias_settings_validate';
  return system_settings_form($form);