You are here

function fb_tab_admin_settings in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb_tab.admin.inc \fb_tab_admin_settings()

Form builder; Configure settings for this site.

See also

system_settings_form()

1 string reference to 'fb_tab_admin_settings'
fb_tab_menu in ./fb_tab.module

File

./fb_tab.admin.inc, line 55
Drupal administration of fb_tab.module.

Code

function fb_tab_admin_settings() {
  $form['process_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Tab URL processing'),
    '#description' => t('This option alters links, so that instead of changing the iframe\'s URL, they change the top frame.  This adds some overhead to each tab served. Still, most sites will want this enabled.'),
  );
  $process_options = array(
    FB_TAB_PROCESS_IFRAME_NONE => t('No processing'),
    FB_TAB_PROCESS_IFRAME_TO_CANVAS => t('Link to canvas pages.  (Your app must support canvas pages.)'),
    FB_TAB_PROCESS_IFRAME_TO_TAB_VIA_APP_DATA => t('Stay on page tab. (Uses the special "app_data" url parameter to express local path.)'),
  );
  $form['process_settings'][FB_TAB_VAR_PROCESS_IFRAME] = array(
    '#type' => 'radios',
    '#title' => t('Link processing on iframe tabs.'),
    '#options' => $process_options,
    '#default_value' => variable_get(FB_TAB_VAR_PROCESS_IFRAME, FB_TAB_PROCESS_IFRAME_TO_CANVAS),
    '#description' => t('When a link appears on a page tab, should the linked-to content appear in the page tab, a canvas page, or some other way.  Note that without any processing, links may have unexpected behavior.'),
  );
  $form['process_settings'][FB_TAB_VAR_PROCESS_ABSOLUTE] = array(
    '#type' => 'checkbox',
    '#title' => t('Process absolute hrefs, not just relative links.  Adds target=_top attribute.'),
    '#default_value' => variable_get(FB_TAB_VAR_PROCESS_ABSOLUTE, TRUE),
  );
  return system_settings_form($form);
}