function referral_settings in User Referral 7
Same name and namespace in other branches
- 5 referral.module \referral_settings()
- 6 referral.module \referral_settings()
Forum builder for admin/config/people/referral
1 string reference to 'referral_settings'
- referral_menu in ./
referral.module - Implements hook_menu().
File
- ./
referral.module, line 139 - The referral module.
Code
function referral_settings() {
$options = array(
0 => t('User page'),
1 => t('Referrals page'),
);
$form['referral_show_on_user_profile'] = array(
'#type' => 'checkbox',
'#title' => t('Show referral link on user profile'),
'#default_value' => variable_get('referral_show_on_user_profile', TRUE),
);
$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.'),
'#required' => TRUE,
);
$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.'),
'#required' => TRUE,
);
$form['referral_advanced_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced settings'),
'#collapsed' => TRUE,
'#collapsible' => TRUE,
'#description' => t('These settings are for advanced users only. Change only if you know what you are doing.'),
);
$form['referral_advanced_settings']['referral_cookie_name'] = array(
'#type' => 'textfield',
'#title' => t('Cookie name'),
'#default_value' => variable_get('referral_cookie_name', REFERRAL_COOKIE_DEFAULT),
'#description' => t('Advanced: Machine name for the referral tracking cookie. WARNING: Changing it will void all referral cookies that are currently present in user browsers.'),
'#required' => TRUE,
);
return system_settings_form($form);
}