You are here

function radioactivity_admin_general_form in Radioactivity 7

Same name and namespace in other branches
  1. 5 radioactivity.module \radioactivity_admin_general_form()
  2. 6 radioactivity-admin-ui.inc \radioactivity_admin_general_form()
  3. 7.2 radioactivity-admin-ui.inc \radioactivity_admin_general_form()
1 string reference to 'radioactivity_admin_general_form'
radioactivity_menu in ./radioactivity.module
Implementation of hook_menu

File

./radioactivity-admin-ui.inc, line 5

Code

function radioactivity_admin_general_form() {
  $form = array();
  $form['radioactivity_ajax_callback_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Radioactivity ajax callback path'),
    '#description' => t('This is the path/file that is used by the Radioactivity ajax emitter. ' . 'If you are using Varnish or a similiar HTTP accelerator you should set it not to cache this path. ' . 'Make sure no other modules use the path before changing this. ' . 'The default path is @default', array(
      "@default" => RADIOACTIVITY_AJAX_PATH,
    )),
    '#size' => 128,
    '#required' => TRUE,
    '#value' => variable_get('radioactivity_ajax_callback_path', RADIOACTIVITY_AJAX_PATH),
  );
  $form['flooding'] = array(
    '#type' => 'fieldset',
    '#disabled' => true,
    '#title' => t('Flood protection'),
    '#description' => "Flood protection is not yet functional",
  );
  $form['flooding']['radioactivity_flood_protection'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable flood protection'),
    '#description' => t('This prevents users from boosting entities by refreshing the page multiple times or by ' . 'calling the callback function directory. With flood protection enabled Radioactivity ' . 'metrics are also more accurate but consume more resources.'),
    '#value' => variable_get('radioactivity_flood_protection', false),
  );
  $form['flooding']['radioactivity_flood_timeout'] = array(
    '#type' => 'textfield',
    '#title' => t('Flood protection timeout'),
    '#description' => t('How many minutes are required to pass between calls to emit energy for a single field. ' . 'One incident per field per given amount of minutes.'),
    '#size' => 5,
    '#value' => variable_get('radioactivity_flood_timeout', 15),
  );
  $form['save'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}