function fbconnect_appearance_settings in Facebook Connect 6.2
Same name and namespace in other branches
- 8.2 fbconnect.admin.inc \fbconnect_appearance_settings()
- 6 fbconnect.admin.inc \fbconnect_appearance_settings()
- 7.2 fbconnect.admin.inc \fbconnect_appearance_settings()
@todo.
1 string reference to 'fbconnect_appearance_settings'
- fbconnect_menu in ./
fbconnect.module - Implements hook_menu().
File
- ./
fbconnect.admin.inc, line 73 - Administration page callbacks for the fbconnect module.
Code
function fbconnect_appearance_settings(&$form_state) {
$form['site'] = array(
'#type' => 'fieldset',
'#title' => t('Settings for !site', array(
'!site' => variable_get('site_name', t('Your Site')),
)),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['site']['fbconnect_fast_reg'] = array(
'#type' => 'checkbox',
'#title' => t('Fast registration mode'),
'#default_value' => variable_get('fbconnect_fast_reg', NULL),
'#description' => t("Enable this mode will bypass drupal's standard registration form."),
);
$form['site']['fbconnect_fast_reg_autoname'] = array(
'#type' => 'checkbox',
'#title' => t('Assign new random name on name conflict during Fast Registration'),
'#default_value' => variable_get('fbconnect_fast_reg_autoname', NULL),
'#description' => t("Creates a new random name for the user if the user's Facebook is already taken by another user on this site. The random name will look something like fbuser123."),
);
$form['site']['fbconnect_loginout_mode'] = array(
'#type' => 'select',
'#title' => t('Login/logout mode'),
'#options' => array(
'manual' => t('Manual'),
'ask' => t('Ask user to logout from FB'),
'auto' => t('Auto login/logout'),
),
'#default_value' => variable_get('fbconnect_loginout_mode', FALSE),
'#description' => t("Login to drupal/logout from facebook. Enable this if you don't want to logout automatically from facebook."),
);
// TODO: rename to more clear name.
$form['site']['fbconnect_reg_options'] = array(
'#type' => 'checkbox',
'#title' => t('Disable linking accounts during registration'),
'#default_value' => variable_get('fbconnect_reg_options', 0),
'#description' => t('Disables the option to link local account to a FB account on registration'),
);
$form['display'] = array(
'#title' => t('Display Settings'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
if (fbconnect_get_config()) {
$button = array(
'small_short' => fbconnect_render_button(array(
'size' => 'small',
'onclick' => 'return false;',
)),
'medium_short' => fbconnect_render_button(array(
'size' => 'medium',
'onclick' => 'return false;',
)),
'large_short' => fbconnect_render_button(array(
'size' => 'large',
'onclick' => 'return false;',
)),
);
$form['display']['fbconnect_button'] = array(
'#type' => 'radios',
'#default_value' => variable_get('fbconnect_button', 'medium_short'),
'#options' => $button,
);
$form['display']['fbconnect_button_text'] = array(
'#title' => t('Button text'),
'#type' => 'textfield',
'#description' => t('Enter the text you want to display on the Facebook Connect Button.'),
'#default_value' => variable_get('fbconnect_button_text', 'Connect'),
);
}
$form['display']['fbconnect_pic_allow'] = array(
'#type' => 'select',
'#title' => t('Facebook picture settings'),
'#description' => t('Here you can deside whether you want to allow the use of the facebook picture - or not.'),
'#default_value' => variable_get('fbconnect_pic_allow', 'allow'),
'#options' => array(
'allow' => t('Let the user choose'),
'disallow' => t('Do not allow the use of facebook user picture at your site'),
),
);
$options_pic_size = array(
'thumb' => t('Thumb (50px wide)'),
'small' => t('Small (100px wide)'),
'normal' => t('Normal (200px wide)'),
'square' => t('Square (50px by 50px)'),
);
$form['display']['fbconnect_pic_size'] = array(
'#type' => 'select',
'#title' => t('Default Facebook picture size'),
'#description' => t('This will set the default user picture size throughout the site. If your user decides to use his facebook picture, choose its size here.'),
'#default_value' => variable_get('fbconnect_pic_size', 'square'),
'#options' => $options_pic_size,
);
$form['display']['fbconnect_pic_size_nodes'] = array(
'#type' => 'select',
'#title' => t('Node Facebook picture size'),
'#description' => t('This will set the picture size when viewing a node post. If your user decides to use his facebook picture, choose its size here.'),
'#default_value' => variable_get('fbconnect_pic_size_nodes', 'square'),
'#options' => $options_pic_size,
);
$form['display']['fbconnect_pic_size_comments'] = array(
'#type' => 'select',
'#title' => t('Comments Facebook picture size'),
'#description' => t('This will set the picture size when viewing a comment post. If your user decides to use his facebook picture, choose its size here.'),
'#default_value' => variable_get('fbconnect_pic_size_comments', 'square'),
'#options' => $options_pic_size,
);
$form['display']['fbconnect_pic_size_profile'] = array(
'#type' => 'select',
'#title' => t('Profile Facebook picture size'),
'#description' => t("This will set the picture size when viewing a user's profile page. If your user decides to use his facebook picture, choose its size here."),
'#default_value' => variable_get('fbconnect_pic_size_profile', 'small'),
'#options' => $options_pic_size,
);
$form['display']['fbconnect_pic_logo'] = array(
'#type' => 'checkbox',
'#title' => t('Show Facebook Logo'),
'#description' => t("Uncheck this if you don't want to display the facebook logo on the user picture."),
'#default_value' => variable_get('fbconnect_pic_logo', TRUE),
);
$form['additional'] = array(
'#type' => 'fieldset',
'#title' => t('Additional'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['additional']['fbconnect_exclude_patterns'] = array(
'#type' => 'textarea',
'#title' => t('Disable FBConnect on specified pages'),
'#description' => t('Enter here path patterns accepted by !drupal_match_path function. One per line.', array(
'!drupal_match_path' => l('drupal_match_path', 'http://api.drupal.org/api/drupal/includes--path.inc/function/drupal_match_path/6', array(
'attributes' => array(
'target' => '_blank',
),
)),
)),
'#default_value' => variable_get('fbconnect_exclude_patterns', ''),
);
return system_settings_form($form);
}