You are here

public function twitter_pull_box::options_form in Twitter Pull 6.2

Same name and namespace in other branches
  1. 7.2 plugins/twitter_pull_box.inc \twitter_pull_box::options_form()
  2. 7 plugins/twitter_pull_box.inc \twitter_pull_box::options_form()

Implementation of boxes_box::options_form().

Overrides boxes_box::options_form

File

plugins/twitter_pull_box.inc, line 24

Class

twitter_pull_box
Simple custom text box.

Code

public function options_form() {
  $form = array();
  $form['search'] = array(
    '#type' => 'textfield',
    '#title' => t('Twitter search'),
    '#required' => TRUE,
    '#default_value' => $this->options['search'],
    '#description' => t("The twitter user, hashtag, or search for the tweet to show in this box. Use a '@' for a user or a list, eg '@user', '@user/list'; a '#' for a hashtag, 'eg '#hashtag'; and no prefix for a search."),
  );
  $form['max_results'] = array(
    '#type' => 'textfield',
    '#title' => t('Max tweets'),
    '#default_value' => $this->options['max_results'],
    '#description' => t('How many tweets you want the box to display at any one time.'),
  );
  $form['rts'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable retweets'),
    '#default_value' => $this->options['rts'],
    '#description' => t('If selected, retweets are included in the twitter feed. See the Twitter API for more details.'),
  );
  $form['exclude_replies'] = array(
    '#type' => 'checkbox',
    '#title' => t('Exclude replies'),
    '#default_value' => $this->options['exclude_replies'],
    '#description' => t('If selected, replies are not included in the twitter feed. See the Twitter API for more details.'),
  );
  return $form;
}