function fb_social_settings_form in Facebook social plugins integration 6
Settings form for global fb_social custimazation
1 string reference to 'fb_social_settings_form'
- fb_social_menu in ./
fb_social.module - Implementation of hook_menu
File
- ./
fb_social.admin.inc, line 8
Code
function fb_social_settings_form() {
$languages = language_list();
$form = array();
$form['fb_social_appid'] = array(
'#title' => t('Facebook application id'),
'#type' => 'textfield',
'#description' => t('<p> Register your application on Facebook to get a Facebook App Id: !url.</p>
<p>Go on your facebook app page (Applications > Developer > My Applications)
click "Edit Settings". Then click "Connect". Make sure that the "Connect
URL" matches your domain exactly.</p>', array(
'!url' => l('register here', 'http://developers.facebook.com/setup/'),
)),
'#default_value' => variable_get('fb_social_appid', ''),
);
/*
$form['fb_social_secret'] = array(
'#title' => t('Facebook application secret ky'),
'#type' => 'textfield',
'#description' => t('Facebook application secret key'),
'#default_value' => variable_get('fb_social_secret', '')
);
*/
$form['fb_social_locale'] = array(
'#title' => t('Default facebook application locale'),
'#type' => 'select',
'#default_value' => variable_get('fb_social_locale', 'en_US'),
'#description' => t('Your facebook application locale'),
'#options' => _get_facebook_locale(),
);
$form['fb_social_urls'] = array(
'#type' => 'fieldset',
'#title' => t('Submitted urls mode'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['fb_social_urls']['fb_social_urls_mode'] = array(
'#type' => 'radios',
'#title' => t('urls mode'),
'#default_value' => variable_get('fb_social_urls_mode', 0),
'#options' => array(
t('aliased'),
t('Unaliased'),
),
'#description' => t('The url version of your post you want to be shown in fb. Aliased - http://example.com/mypage, Unaliased - http://example.com/node/34'),
);
$form['fb_social_languages'] = array(
'#type' => 'fieldset',
'#title' => t('Languages mapping'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['fb_social_languages']['fb_social_locale_auto'] = array(
'#title' => t('Auto translate widget'),
'#type' => 'checkbox',
'#default_value' => variable_get('fb_social_locale_auto', 0),
'#description' => t('Check to automatically detect current node\'s language based on the settings below. Uncheck this if you want to force the node to use the default facebook locale set earlier'),
);
foreach ($languages as $language) {
$form['fb_social_languages']['fb_social_language_' . $language->language] = array(
'#type' => 'select',
'#title' => 'Mapping for ' . $language->name . ' (' . $language->language . ')',
'#description' => t('Select the equivalent language code in the facebook locale'),
'#default_value' => variable_get('fb_social_language_' . $language->language, 'en_US'),
'#options' => _get_facebook_locale(),
);
}
$form = system_settings_form($form);
return $form;
}