function twitter_admin_form in Twitter 6.3
Same name and namespace in other branches
- 6.5 twitter.pages.inc \twitter_admin_form()
- 6.2 twitter.pages.inc \twitter_admin_form()
- 6.4 twitter.pages.inc \twitter_admin_form()
- 7.6 twitter.pages.inc \twitter_admin_form()
- 7.3 twitter.pages.inc \twitter_admin_form()
- 7.4 twitter.pages.inc \twitter_admin_form()
- 7.5 twitter.pages.inc \twitter_admin_form()
1 string reference to 'twitter_admin_form'
- twitter_menu in ./
twitter.module - Implementation of hook_meu()
File
- ./
twitter.pages.inc, line 6
Code
function twitter_admin_form() {
$form = array();
$form['oauth'] = array(
'#type' => 'fieldset',
'#title' => t('OAuth Settings'),
'#description' => t(''),
'#access' => module_exists('oauth_common'),
'#description' => t('To enable OAuth based access for twitter, you must <a href="@url">register your application</a> with twitter and add the provided keys here.', array(
'@url' => 'https://dev.twitter.com/apps/new',
)),
);
$form['oauth']['callback_url'] = array(
'#type' => 'item',
'#title' => t('Callback URL'),
'#value' => url('twitter/oauth', array(
'absolute' => TRUE,
)),
);
$form['oauth']['twitter_consumer_key'] = array(
'#type' => 'textfield',
'#title' => t('OAuth Consumer key'),
'#default_value' => variable_get('twitter_consumer_key', NULL),
);
$form['oauth']['twitter_consumer_secret'] = array(
'#type' => 'textfield',
'#title' => t('OAuth Consumer secret'),
'#default_value' => variable_get('twitter_consumer_secret', NULL),
);
$form['import'] = array(
'#type' => 'fieldset',
'#title' => t('Twitter import'),
'#description' => t('Import and display the Twitter statuses of site users who have entered their Twitter account information.'),
);
$form['import']['twitter_import'] = array(
'#type' => 'checkbox',
'#title' => t('Import Twitter statuses'),
'#default_value' => variable_get('twitter_import', TRUE),
);
$periods = array(
0 => t('Never'),
);
$periods += drupal_map_assoc(array(
604800,
2419200,
7257600,
31449600,
), 'format_interval');
$form['import']['twitter_expire'] = array(
'#type' => 'select',
'#title' => t('Delete old statuses'),
'#default_value' => variable_get('twitter_expire', 0),
'#options' => $periods,
);
return system_settings_form($form);
}