You are here

function spaces_og_init in Spaces 6.2

Same name and namespace in other branches
  1. 5.2 spaces_og.module \spaces_og_init()
  2. 6 spaces_og/spaces_og.module \spaces_og_init()

Implementation of hook_init(); We're gonna bulldoze your OG settings. Get over it.

File

spaces_og/spaces_og.module, line 439

Code

function spaces_og_init() {
  global $conf;
  $conf['og_visibility_directory'] = 2;

  // Default to 'visible'.
  $conf['og_visibility_registration'] = 3;

  // Default to 'visible' on form.
  $conf['og_private_groups'] = 3;

  // Default group to 'public'.
  $conf['og_notification'] = 0;

  // Disable OG's Notifications.
  $conf['og_audience_checkboxes'] = 0;

  // Disable audience checkboxes.
  $conf['og_visibility'] = 2;

  // Default visibility to 'public'.
  $conf['og_audience_required'] = 1;

  // Require audience.
  $conf['og_member_pics'] = 0;

  // Disable pictures.
  // Force feature content types to be OG enabled.
  // Don't like this behavior? Turn off feature modules.
  $map = spaces_features_map('node');
  $features = spaces_features('og');
  foreach ($map as $type => $feature) {

    // If the feature apples to OG spaces, force the OG content type usage.
    if (!empty($features[$feature])) {
      $conf['og_content_type_usage_' . $type] = 'group_post_standard';
    }
  }
}