function socialfeed_twitter_settings in Social Feed 7
Same name and namespace in other branches
- 7.2 socialfeed.admin.inc \socialfeed_twitter_settings()
Form builder; Configure social feeds settings for this site.
See also
1 string reference to 'socialfeed_twitter_settings'
- socialfeed_menu in ./
socialfeed.module - Implements hook_menu().
File
- ./
socialfeed.admin.inc, line 114 - Social Feed module admin inc file.
Code
function socialfeed_twitter_settings($form, &$form_state) {
$form['socialfeed_twitter_access_token'] = array(
'#type' => 'textfield',
'#title' => t('Twitter Access Token'),
'#default_value' => variable_get('socialfeed_twitter_access_token'),
'#size' => 60,
'#maxlength' => 100,
'#required' => TRUE,
);
$form['socialfeed_twitter_access_token_secret'] = array(
'#type' => 'textfield',
'#title' => t('Twitter Access Token Secret'),
'#default_value' => variable_get('socialfeed_twitter_access_token_secret'),
'#size' => 60,
'#maxlength' => 100,
'#required' => TRUE,
);
$form['socialfeed_twitter_consumer_key'] = array(
'#type' => 'textfield',
'#title' => t('Twitter Consumer Key'),
'#default_value' => variable_get('socialfeed_twitter_consumer_key'),
'#size' => 60,
'#maxlength' => 100,
'#required' => TRUE,
);
$form['socialfeed_twitter_consumer_secret'] = array(
'#type' => 'textfield',
'#title' => t('Twitter Consumer Secret'),
'#default_value' => variable_get('socialfeed_twitter_consumer_secret'),
'#size' => 60,
'#maxlength' => 100,
'#required' => TRUE,
);
$form['socialfeed_twitter_username'] = array(
'#type' => 'textfield',
'#title' => t('Twitter User Name'),
'#default_value' => variable_get('socialfeed_twitter_username'),
'#size' => 60,
'#maxlength' => 100,
'#required' => TRUE,
);
$form['socialfeed_twitter_tweets_count'] = array(
'#type' => 'textfield',
'#title' => t('Tweetes Count'),
'#default_value' => variable_get('socialfeed_twitter_tweets_count', 3),
'#size' => 60,
'#maxlength' => 100,
);
$form['socialfeed_twitter_time_stamp'] = array(
'#type' => 'checkbox',
'#title' => t('Show Date/Time'),
'#default_value' => variable_get('socialfeed_twitter_time_stamp', FALSE),
);
$form['socialfeed_twitter_time_format'] = array(
'#type' => 'textfield',
'#title' => t('Date/Time format'),
'#default_value' => variable_get('socialfeed_twitter_time_format', 'd-M-Y'),
'#description' => t('You can check for PHP Date Formats <a href="@datetime" target="@blank">here</a>', array(
'@datetime' => 'http://php.net/manual/en/datetime.formats.date.php#datetime.formats.date',
'@blank' => '_blank',
)),
'#size' => 60,
'#maxlength' => 100,
'#states' => array(
'visible' => array(
':input[name="socialfeed_twitter_time_stamp"]' => array(
'checked' => TRUE,
),
),
),
);
return system_settings_form($form);
}