You are here

function nofollowlist_settings_form in Nofollow List 5

Same name and namespace in other branches
  1. 6 nofollowlist.module \nofollowlist_settings_form()

Builds the form for administrators to add sites to the black/white lists.

1 string reference to 'nofollowlist_settings_form'
nofollowlist_menu in ./nofollowlist.module
Implementation of hook_menu()

File

./nofollowlist.module, line 29

Code

function nofollowlist_settings_form() {
  $form['nofollowlist_option'] = array(
    '#type' => 'radios',
    '#title' => t('Hosts list option'),
    '#description' => t('If you choose the whitelist option, be sure to add your own site to the list!'),
    '#options' => array(
      'black' => t('Blacklist: Add rel="nofollow" to links leading to the listed hosts.'),
      'white' => t('Whitelist: Add rel="nofollow" to all links <b>except</b> the listed hosts.'),
    ),
    '#default_value' => variable_get('nofollowlist_option', 'black'),
  );
  $form['nofollowlist_hosts'] = array(
    '#type' => 'textarea',
    '#title' => t('Nofollowlist hosts'),
    '#description' => t('Add one host per line. Ex: en.wikipedia.org'),
    '#default_value' => variable_get('nofollowlist_hosts', 'en.wikipedia.org'),
  );
  return system_settings_form($form);
}