You are here

public function facebook_pull_box::options_form in Facebook Pull 6

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

Implementation of boxes_content::options_form().

Overrides boxes_box::options_form

File

plugins/facebook_pull_box.inc, line 24

Class

facebook_pull_box
Boxes plugin for the Facebook Pull module.

Code

public function options_form() {
  $form = array();
  $application_id = l(t('Application ID'), 'https://developers.facebook.com/apps');
  $form['app_id'] = array(
    '#type' => 'textfield',
    '#title' => t('App ID'),
    '#default_value' => $this->options['app_id'],
    '#description' => t('Unique !application_id for your facebook app.', array(
      '!application_id' => $application_id,
    )),
  );
  $form['app_secret'] = array(
    '#type' => 'textfield',
    '#title' => t('App Secret'),
    '#default_value' => $this->options['app_secret'],
    '#description' => t('Your sites app secret.'),
  );
  $graph_link = l(t('Graph ID'), 'http://developers.facebook.com/docs/reference/api/');
  $form['graph_id'] = array(
    '#type' => 'textfield',
    '#title' => t('Graph ID'),
    '#default_value' => $this->options['graph_id'],
    '#description' => t('The !graph_id of the page, user, or group.', array(
      '!graph_id' => $graph_link,
    )),
  );
  $form['object_type'] = array(
    '#type' => 'textfield',
    '#title' => t('Object type'),
    '#default_value' => $this->options['object_type'],
    '#description' => t('The object type to pull, e.g. friends, feed, photos.'),
  );
  $form['limit'] = array(
    '#type' => 'textfield',
    '#title' => t('Limit'),
    '#size' => 5,
    '#default_value' => $this->options['limit'],
    '#description' => t('How many posts to show in the box by default. If you have not entered a default limit here then it will default to 10.'),
  );
  return $form;
}