Skip to:
Content

BuddyPress.org

Changeset 2863 for trunk/bp-forums.php


Ignore:
Timestamp:
03/22/2010 11:34:23 AM (15 years ago)
Author:
apeatling
Message:

Added new install/upgrade wizard. Removed root components and replaced them with actual WordPress pages. Testing on WordPress vhost/novhost and root profile support still to do.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums.php

    r2695 r2863  
    11<?php
    2 
    32/* Define the parent forum ID */
    43if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) )
    54    define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
    65
    7 if ( !defined( 'BP_FORUMS_SLUG' ) )
    8     define( 'BP_FORUMS_SLUG', 'forums' );
    9 
    106if ( !defined( 'BB_PATH' ) )
    117    require ( BP_PLUGIN_DIR . '/bp-forums/bp-forums-bbpress.php' );
     
    1713    global $bp;
    1814
     15    if ( !defined( 'BP_FORUMS_SLUG' ) )
     16        define ( 'BP_FORUMS_SLUG', $bp->pages->forums->slug );
     17
    1918    /* For internal identification */
    2019    $bp->forums->id = 'forums';
     20    $bp->forums->name = $bp->pages->forums->name;
     21    $bp->forums->slug = BP_FORUMS_SLUG;
    2122
    2223    $bp->forums->image_base = BP_PLUGIN_URL . '/bp-forums/images';
    2324    $bp->forums->bbconfig = $bp->site_options['bb-config-location'];
    24     $bp->forums->slug = BP_FORUMS_SLUG;
    2525
    2626    /* Register this in the active components array */
     
    4040}
    4141
    42 function bp_forums_setup_root_component() {
    43     /* Register 'forums' as a root component */
    44     bp_core_add_root_component( BP_FORUMS_SLUG );
    45 }
    46 add_action( 'bp_setup_root_components', 'bp_forums_setup_root_component' );
    47 
    4842function bp_forums_directory_forums_setup() {
    4943    global $bp;
    5044
    5145    if ( $bp->current_component == $bp->forums->slug ) {
    52         if ( (int) $bp->site_options['bp-disable-forum-directory'] || !function_exists( 'groups_install' ) )
     46        if ( (int) $bp->site_options['bp-disable-forum-directory'] || !bp_is_active( 'groups' ) )
    5347            return false;
    5448
Note: See TracChangeset for help on using the changeset viewer.