You are here

public function SocialContentFacebook::instanceSettingsForm in Social Content 7.2

Instance settings form.

Return value

array Any instance settings that will be included on all instance forms for the current global.

Overrides SocialContent::instanceSettingsForm

File

modules/facebook/social_content_facebook.class.inc, line 105
Social Content Facebook class.

Class

SocialContentFacebook
@file Social Content Facebook class.

Code

public function instanceSettingsForm() {
  $settings = $this->settings['instance'];
  $form = parent::instanceSettingsForm($settings);
  $form['account'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook Page User ID'),
    '#description' => t('You can use !link to get this. Or leave empty and it will be generated using the Page Name.', array(
      '!link' => l('findmyfacebookid.com', 'http://findmyfacebookid.com/'),
    )),
    '#default_value' => isset($settings['account']) ? $settings['account'] : NULL,
  );
  $form['page_name'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook Page Name'),
    '#description' => t("E.g. 'cocacola' for http://facebook.com/cocacola page."),
    '#default_value' => isset($settings['page_name']) ? $settings['page_name'] : NULL,
    '#required' => TRUE,
  );
  $form['min_resolution'] = array(
    '#type' => 'textfield',
    '#title' => t('Minimum image resolution'),
    '#description' => t('Only posts that have images that meet the minimum image resolution (in {width}x{height} format) will be imported.'),
    '#default_value' => isset($settings['min_resolution']) ? $settings['min_resolution'] : NULL,
    '#required' => FALSE,
  );
  return $form;
}