function fb_social_like_settings_form in Facebook social plugins integration 6
Settings form
1 string reference to 'fb_social_like_settings_form'
- fb_social_like_menu in modules/
fb_social_like/ fb_social_like.module - Implementation of hook_menu
File
- modules/
fb_social_like/ fb_social_like.admin.inc, line 7
Code
function fb_social_like_settings_form() {
$form = array();
$form['node_types'] = array(
'#type' => 'fieldset',
'#title' => t('Content types'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['node_types']['fb_social_like_node_types'] = array(
'#type' => 'checkboxes',
'#description' => t('Select types that will use the facebook like plugin'),
'#default_value' => variable_get('fb_social_like_node_types', array()),
'#options' => node_get_types('names'),
);
$form['fb_social_like_opengraph_tags'] = array(
'#type' => 'checkbox',
'#title' => t('Output the facebook opengraph tags for the above content types'),
'#description' => t('This module has limited support for fb opengraph tags. Uncheck if you are using some other modules that better support opengraph protocol'),
'#default_value' => variable_get('fb_social_like_opengraph_tags', 1),
);
$form['widget_location'] = array(
'#type' => 'fieldset',
'#title' => t('Widget location and display'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['widget_location']['fb_social_like_location'] = array(
'#type' => 'radios',
'#title' => t('widget location'),
'#default_value' => variable_get('fb_social_like_location', 0),
'#options' => array(
t('Node links'),
t('Node content'),
),
'#description' => t('The widget can be printed in the "links" are of the node or as part of the node content'),
);
$form['widget_location']['fb_social_like_display_teasers'] = array(
'#type' => 'checkbox',
'#title' => t('Show on teasers'),
'#default_value' => variable_get('fb_social_like_display_teasers', 1),
'#description' => t('Should the widget be displayed on teasers?'),
);
$form['widget_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Widget settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$widget_elements = fb_social_like_widget_settings_form();
foreach ($widget_elements as $key => $value) {
$form['widget_settings'][$key] = $value;
}
$form = system_settings_form($form);
return $form;
}