You are here

function facebook_album_admin_form in Facebook Album 7.2

Same name and namespace in other branches
  1. 7.3 facebook_album.admin.inc \facebook_album_admin_form()
  2. 7 facebook_album.admin.inc \facebook_album_admin_form()

Implements hook_admin().

1 string reference to 'facebook_album_admin_form'
facebook_album_menu in ./facebook_album.module
Implements menu_hook()

File

./facebook_album.admin.inc, line 13
facebook_album.admin.inc Facebook Album administration pages.

Code

function facebook_album_admin_form() {
  $form = array();
  $form = system_settings_form($form);
  $form['facebook_album_pageID'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook Page ID'),
    '#default_value' => variable_get('facebook_album_pageID', ''),
    '#description' => t('The page ID of the page you want to pull the albums from. For example, if your page is https://facebook.com/acromediainc, you would enter acromediainc.'),
  );
  $form['facebook_album_api_version'] = array(
    '#type' => 'select',
    '#options' => array(
      'v2.3' => '2.3',
      'v2.4' => '2.4',
      'v2.5' => '2.5',
      'v2.6' => '2.6',
    ),
    '#title' => t('Facebook API Version'),
    '#default_value' => variable_get('facebook_album_api_version', 'v2.3'),
    '#description' => t("The application API version, currently only 2.3 and 2.4 are supported."),
  );
  $form['facebook_album_appID'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook Application ID'),
    '#default_value' => variable_get('facebook_album_appID', ''),
    '#description' => t("The application ID specified in your Facebook App's dashboard page."),
  );
  $form['facebook_album_appSecret'] = array(
    '#type' => 'password',
    '#title' => t('Facebook Application Secret'),
    '#default_value' => '',
    '#description' => t("The application secret specified in your Facebook App's dashboard page. This field remains blank for security purposes. If you have already saved your application secret, leave this field blank, unless you wish to update it."),
  );
  $form['facebook_album_visibility'] = array(
    '#type' => 'radios',
    '#title' => t('Album Visibility'),
    '#options' => array(
      0 => t('Exclude the listed albums'),
      1 => t('Only show the specified albums'),
    ),
    '#default_value' => variable_get('facebook_album_visibility', 0),
  );
  $form['facebook_album_albums'] = array(
    '#type' => 'textarea',
    '#description' => t('Leave blank to show all albums. Specify albums by using their album IDs. Enter one ID per line.'),
    '#default_value' => implode("\n", variable_get('facebook_album_albums', array())),
  );
  $form['display_settings'] = array(
    '#title' => t('Album Display Settings'),
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['display_settings']['facebook_album_albumLimit'] = array(
    '#title' => t('Album Limit'),
    '#type' => 'textfield',
    '#default_value' => variable_get('facebook_album_albumLimit', 3),
    '#description' => t('Leave blank or set to 0 if you want to load all albums'),
  );
  $form['display_settings']['facebook_album_showDescription'] = array(
    '#title' => t('Show Album Description'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('facebook_album_showDescription', 1),
  );
  $form['display_settings']['facebook_album_showLocation'] = array(
    '#title' => t('Show Album Location'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('facebook_album_showLocation', 1),
  );
  $form['display_settings']['facebook_album_albumThumbWidth'] = array(
    '#title' => t('Album Thumbnail Width'),
    '#type' => 'textfield',
    '#default_value' => variable_get('facebook_album_albumThumbWidth', 365),
  );
  $form['display_settings']['facebook_album_albumThumbHeight'] = array(
    '#title' => t('Album Thumbnail Height'),
    '#type' => 'textfield',
    '#default_value' => variable_get('facebook_album_albumThumbHeight', 250),
  );
  $form['display_settings']['facebook_album_photoThumbWidth'] = array(
    '#title' => t('Photo Thumbnail Width'),
    '#type' => 'textfield',
    '#default_value' => variable_get('facebook_album_photoThumbWidth', 160),
  );
  $form['display_settings']['facebook_album_photoThumbHeight'] = array(
    '#title' => t('Photo Thumbnail Height'),
    '#type' => 'textfield',
    '#default_value' => variable_get('facebook_album_photoThumbHeight', 120),
  );
  $form['display_settings']['colorbox'] = array(
    '#title' => t('Colorbox Settings'),
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#description' => t('Facebook Albums support displaying images in Colorbox if it is enabled.'),
  );
  $form['display_settings']['colorbox']['facebook_album_colorboxOptions'] = array(
    '#title' => t('Colorbox Options'),
    '#type' => 'textarea',
    '#default_value' => variable_get('facebook_album_colorboxOptions', ''),
    '#description' => t('Specify any additional Colorbox options here. i.e. "transition:\'elastic\', speed:350"'),
  );
  array_unshift($form['#submit'], 'facebook_album_admin_form_submit');
  return $form;
}