You are here

function fbconnect_get_config in Facebook Connect 6

Same name and namespace in other branches
  1. 8.2 fbconnect.module \fbconnect_get_config()
  2. 5 fbconnect.module \fbconnect_get_config()
  3. 6.2 fbconnect.module \fbconnect_get_config()
  4. 7.2 fbconnect.module \fbconnect_get_config()

Get fbconnect config parameter

Return value

array

12 calls to fbconnect_get_config()
facebook_client in ./fbconnect.module
Get the facebook client object for easy access.
fbconnect_appearance_settings in ./fbconnect.admin.inc
fbconnect_footer in ./fbconnect.module
Implementation of hook_footer().
fbconnect_form_alter in ./fbconnect.module
Impletementation of hook_form_alter.
fbconnect_init in ./fbconnect.module
Implementation of hook_init().

... See full list

File

./fbconnect.module, line 443

Code

function fbconnect_get_config() {
  global $base_url;
  static $config;
  if (!$config) {
    $config['api_key'] = variable_get('fbconnect_key', NULL);
    $config['secret_api_key'] = variable_get('fbconnect_skey', NULL);
    $config['xd_path'] = 'fbconnect/receiver';
    $config['user_pictures'] = variable_get('fbconnect_pic_allow', 'allow');
    $config['language_code'] = variable_get('fbconnect_language_code', 'en_US');
    $url = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? "https://ssl.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/" . $config['language_code'] : "http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/" . $config['language_code'];
    $config['featureLoader_url'] = $url;
    $config['debug'] = variable_get('fbconnect_debug', FALSE);
    $config['loginout_mode'] = variable_get('fbconnect_loginout_mode', 'manual');
    $config['invite_name'] = variable_get('fbconnect_invite_name', variable_get('site_name', $base_url));
    $config['fast_reg_mode'] = variable_get('fbconnect_fast_reg', null);

    // allow third party modules to change settings
    drupal_alter('fbconnect_config', $config);
  }
  if ($config['api_key'] && $config['secret_api_key']) {
    return $config;
  }
}