atrsimilar_form_atr_form_profile_alter

Versions
6.1
atrsimilar_form_atr_form_profile_alter(&$form, &$form_state)

Implementation of hook_form_FORM_ID_alter().

Code

atr/modules/atrsimilar/atrsimilar.module, line 62

<?php
function atrsimilar_form_atr_form_profile_alter(&$form, &$form_state) {
  $profile = $form['profile']['#value'];

  $form['#submit'][] = 'atrsimilar_atr_form_profile_submit';
  $percentages = range(0, 100);
  foreach ($percentages as &$percentage) {
    $percentage .= '%';
  }
  $form['similar']['settings']['similar_threshold'] = array(
    '#type' => 'select',
    '#title' => t('Threshold'),
    '#options' => $percentages,
    '#description' => t('How similar two texts should be to be considered entirely similar.'),
    '#default_value' => variable_get('atrsimilar_profile_' . $profile->pid . '_threshold', 90),
  );
  $form['similar']['settings']['similar_ignore'] = array(
    '#type' => 'textarea',
    '#title' => t('Ignore list'),
    '#description' => t('Any words or phrases that should be ignored during the similarity check. Put every word or phrase on a new line.'),
    '#default_value' => implode("\n", variable_get('atrsimilar_profile_' . $profile->pid . '_ignore', array())),
  );
}
?>