You are here

function elf_form_settings in External Links Filter 7.3

Same name and namespace in other branches
  1. 6.3 elf.module \elf_form_settings()

Admin settings form.

See also

elf_form_settings_submit()

1 string reference to 'elf_form_settings'
elf_menu in ./elf.module
Implement hook_menu().

File

./elf.module, line 77
Adds an icon to external and mailto links.

Code

function elf_form_settings(array $form, array &$form_state) {
  $domains = variable_get('elf_domains', array());
  $form['elf_domains'] = array(
    '#type' => 'textarea',
    '#default_value' => implode("\n", $domains),
    '#title' => t('Internal domains'),
    '#description' => t('If your site spans multiple domains, specify each of them on a new line to prevent them from being seen as external sites. Make sure to include the right protocol; !example_right, and not !example_wrong, for instance. Asterisks are wildcards.', array(
      '!example_right' => '<code>http://example.com</code>',
      '!example_wrong' => '<code>example.com</code>',
    )),
  );
  $form['elf_window'] = array(
    '#type' => 'checkbox',
    '#default_value' => variable_get('elf_window', FALSE),
    '#title' => t('Use JavaScript to open external links in a new window'),
  );
  $form['elf_redirect'] = array(
    '#type' => 'checkbox',
    '#default_value' => variable_get('elf_redirect', FALSE),
    '#title' => t('Redirect users to external websites via !url_path.', array(
      '!url_path' => '<code>/elf/go</code>',
    )),
  );
  return system_settings_form($form, FALSE);
}