You are here

function social_content_tweet_settings_form in Social Content 7

1 string reference to 'social_content_tweet_settings_form'
social_content_twitter_social_content_info in modules/twitter/social_content_twitter.module

File

modules/twitter/social_content_twitter.module, line 50
Social Content: Twitter module.

Code

function social_content_tweet_settings_form(&$form, $social_content_type, $settings) {
  if ($social_content_type['name'] == 'twitter_account') {
    $form['account'] = array(
      '#type' => 'textfield',
      '#title' => t('Twitter account'),
      '#description' => t('The twitter account to pull the statuses from'),
      '#default_value' => $settings['account'],
    );
  }
  elseif ($social_content_type['name'] == 'twitter_hashtag') {
    $form['hashtags'] = array(
      '#type' => 'textfield',
      '#title' => t('Hashtags'),
      '#description' => t('Without the leading #. You can define multiple hashtags separated by space.'),
      '#default_value' => $settings['hashtags'],
    );
  }
  $form['api_url'] = array(
    '#type' => 'textfield',
    '#title' => t('API URL'),
    '#description' => t('Twitter api url do not include trailing /.'),
    '#default_value' => $settings['api_url'],
  );
  $form['oauth_consumer_key'] = array(
    '#type' => 'textfield',
    '#title' => t('Consumer key'),
    '#default_value' => $settings['oauth_consumer_key'],
  );
  $form['oauth_consumer_secret'] = array(
    '#type' => 'textfield',
    '#title' => t('Consumer secret'),
    '#default_value' => $settings['oauth_consumer_secret'],
  );
  $form['oauth_token'] = array(
    '#type' => 'textfield',
    '#title' => t('Oauth token'),
    '#default_value' => $settings['oauth_token'],
  );
  $form['oauth_secret'] = array(
    '#type' => 'textfield',
    '#title' => t('Oauth secret'),
    '#default_value' => $settings['oauth_secret'],
  );
  $form['import_image'] = array(
    '#type' => 'checkbox',
    '#title' => t('Import user profile images'),
    '#description' => t('The user profile image of each tweet will be saved to the node.'),
    '#default_value' => $settings['import_image'],
  );
}