You are here

function fb_user_app_admin_settings in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 7.3 contrib/fb_user_app.admin.inc \fb_user_app_admin_settings()

Form builder; Configure settings for statistic gathering.

1 string reference to 'fb_user_app_admin_settings'
fb_user_app_menu in contrib/fb_user_app.module
Implementation of hook_menu().

File

contrib/fb_user_app.admin.inc, line 12
Admin pages and forms for fb_user_app module, which tracks various events within Drupal for Facebook.

Code

function fb_user_app_admin_settings() {
  $form['stats'] = array(
    '#type' => 'fieldset',
    '#title' => t('Statistics'),
    '#description' => t('User tracking statistics are optional.'),
  );
  $form['stats'][FB_USER_APP_VAR_TRACK_USERS] = array(
    '#type' => 'checkbox',
    '#title' => t('Store data for regular Facebook users who authorize your app.'),
    '#default_value' => variable_get(FB_USER_APP_VAR_TRACK_USERS, TRUE),
  );
  $form['stats'][FB_USER_APP_VAR_TRACK_PAGES] = array(
    '#type' => 'checkbox',
    '#title' => t('Store the ids of Facebook pages when your application is added to a page.'),
    '#default_value' => variable_get(FB_USER_APP_VAR_TRACK_PAGES, TRUE),
  );
  $form['stats'][FB_USER_APP_VAR_TRACK_EVERY_PAGE] = array(
    '#type' => 'checkbox',
    '#title' => t("Store time of user's most recent visit to the application. This adds some overhead to every request."),
    '#default_value' => variable_get(FB_USER_APP_VAR_TRACK_EVERY_PAGE, FALSE),
  );
  $form['stats'][FB_USER_APP_VAR_USERS_THAT_GRANT_OFFLINE] = array(
    '#type' => 'checkbox',
    '#title' => t("Store user data <strong>only</strong> when users have granted offline_access extended permission. For example, to perform cron jobs using those users' access tokens."),
    '#default_value' => variable_get(FB_USER_APP_VAR_USERS_THAT_GRANT_OFFLINE, FALSE),
    '#weight' => -1,
  );
  return system_settings_form($form);
}