You are here

function referral_settings in User Referral 6

Same name and namespace in other branches
  1. 5 referral.module \referral_settings()
  2. 7 referral.module \referral_settings()
1 string reference to 'referral_settings'
referral_menu in ./referral.module

File

./referral.module, line 112

Code

function referral_settings() {
  $options = array(
    0 => t('User page'),
    1 => t('Referrals page'),
  );
  $form[REFERRAL_DISPLAY_MODE] = array(
    '#type' => 'radios',
    '#title' => t('Referral link type'),
    '#default_value' => variable_get(REFERRAL_DISPLAY_MODE, 0),
    '#options' => $options,
    '#description' => t('Select the way you want the referral link to be shown.'),
  );
  $form[REFERRAL_GOTO_PATH] = array(
    '#type' => 'textfield',
    '#title' => t('Referral goto path'),
    '#default_value' => variable_get(REFERRAL_GOTO_PATH, 'user/register'),
    '#description' => t('The path to redirect to after visiting the referral link.'),
  );
  $form['referral_cookie_lifetime'] = array(
    '#type' => 'textfield',
    '#title' => t('Cookie lifetime in days.'),
    '#default_value' => variable_get('referral_cookie_lifetime', '1'),
    '#description' => t('How many days should the referral tracking cookie last.'),
  );
  return system_settings_form($form);
}