You are here

function hosting_alias_settings in Hostmaster (Aegir) 6

Configuration form for site aliases.

See also

hosting_alias_menu()

1 string reference to 'hosting_alias_settings'
hosting_alias_menu in modules/hosting/alias/hosting_alias.module
Implementation of hook_menu().

File

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

Code

function hosting_alias_settings() {
  $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 www.domain.com 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 domain.com alias automatically'),
    '#description' => t('If a domain name starts with www., automatically create an alias for domain.com?'),
    '#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),
  );
  return system_settings_form($form);
}