You are here

function fb_admin_settings_form in Drupal for Facebook 7.4

Drupal form callback for general settings.

1 string reference to 'fb_admin_settings_form'
fb_menu in ./fb.module
Implements hook_menu().

File

./fb.admin.inc, line 1143

Code

function fb_admin_settings_form($form, &$form_state) {
  $form[FB_VAR_PREFER_LONG_TOKEN] = array(
    '#type' => 'checkbox',
    '#title' => t('Use Long-lived Tokens'),
    '#description' => t('When storing access tokens, get longer-lived tokens when possible.  Normal tokens expire in a few hours, or when users log out of facebook.  Longer-lived tokens may last months or in some cases never expire.'),
    '#default_value' => variable_get(FB_VAR_PREFER_LONG_TOKEN, TRUE),
  );

  // Javascript settings
  $form[FB_VAR_ADD_JS] = array(
    '#type' => 'checkbox',
    '#title' => t('Javascript SDK'),
    '#description' => t('Initialize <a href=!fb_js_url target=_blank>facebook\'s javascript</a>.  This enables <a href=!fb_sp_url target=_blank>social plugins</a>, for example a <a href=!fb_lb_url target=_blank>like button</a> by simply adding <em>&lt;fb:like&gt;&lt/fb:like&gt;</em> markup.', array(
      '!fb_js_url' => 'http://developers.facebook.com/docs/reference/javascript/',
      '!fb_sp_url' => 'http://developers.facebook.com/docs/plugins/',
      '!fb_lb_url' => 'http://developers.facebook.com/docs/reference/plugins/like/',
    )),
    '#default_value' => variable_get(FB_VAR_ADD_JS, FALSE),
  );
  $form[FB_VAR_USE_JSON_BIGINT] = array(
    '#type' => 'checkbox',
    '#title' => t('Use native JSON bigint decoding'),
    '#description' => t('Use the JSON_BIGINT_AS_STRING flag when calling json_decode().  If the native bigint handling is not implemented on your system, uncheck this.'),
    '#default_value' => variable_get(FB_VAR_USE_JSON_BIGINT, defined('JSON_BIGINT_AS_STRING')),
    '#access' => defined('JSON_BIGINT_AS_STRING'),
  );
  return system_settings_form($form);
}