Skip to:
Content

BuddyPress.org

Changeset 3745


Ignore:
Timestamp:
01/19/2011 02:55:32 PM (13 years ago)
Author:
boonebgorges
Message:

Abstracts component setup admin form and reinstates Component Setup dashboard panel. Changes the way that admin styles are loaded so that they load on each BP admin panel. Refactors some bp_is_x() functions so they don't throw errors when components are disabled. Fixes #2943

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r3743 r3745  
    362362        return false;
    363363
     364    $hooks = array();
     365
    364366    // Add the administration tab under the "Site Admin" tab for site administrators
    365     $hook = bp_core_add_admin_menu_page( array(
     367    $hooks[] = bp_core_add_admin_menu_page( array(
    366368        'menu_title' => __( 'BuddyPress', 'buddypress' ),
    367369        'page_title' => __( 'BuddyPress', 'buddypress' ),
     
    372374    ) );
    373375
    374     add_submenu_page( 'bp-general-settings', __( 'BuddyPress Dashboard', 'buddypress' ), __( 'Dashboard', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_dashboard' );
    375     add_submenu_page( 'bp-general-settings', __( 'Settings', 'buddypress' ),             __( 'Settings',  'buddypress' ), 'manage_options', 'bp-settings',         'bp_core_admin_settings'  );
     376    $hooks[] = add_submenu_page( 'bp-general-settings', __( 'BuddyPress Dashboard', 'buddypress' ), __( 'Dashboard', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_dashboard' );
     377    $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Settings', 'buddypress' ),       __( 'Settings',  'buddypress' ), 'manage_options', 'bp-settings',         'bp_core_admin_settings'  );
     378    $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Component Setup', 'buddypress' ),             __( 'Component Setup',  'buddypress' ), 'manage_options', 'bp-component-setup',         'bp_core_admin_component_setup'  );
    376379
    377380    // Add a hook for css/js
    378     add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' );
     381    foreach( $hooks as $hook ) {
     382        add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' );
     383    }
    379384}
    380385add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_core_add_admin_menu', 9 );
  • trunk/bp-core/admin/bp-core-admin.php

    r3728 r3745  
    185185
    186186            <?php $disabled_components = get_site_option( 'bp-deactivated-components' ); ?>
    187 
    188             <table class="form-table" style="width: 80%">
    189                 <tbody>
    190 
    191                     <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-activity.php') ) : ?>
    192 
    193                         <tr>
    194                             <td><h3><?php _e( 'Activity Streams', 'buddypress' ) ?></h3><p><?php _e( 'Allow users to post activity updates and track all activity across the entire site.', 'buddypress' ) ?></p></td>
    195                             <td>
    196                                 <input type="radio" name="bp_components[bp-activity.php]" value="1"<?php if ( !isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    197                                 <input type="radio" name="bp_components[bp-activity.php]" value="0"<?php if ( isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    198                             </td>
    199                         </tr>
    200 
    201                     <?php endif; ?>
    202 
    203                     <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-blogs.php') && is_multisite() ) : ?>
    204 
    205                         <tr>
    206                             <td><h3><?php _e( 'Blog Tracking', 'buddypress' ) ?></h3><p><?php _e( 'Tracks blogs, blog posts and blogs comments for a user across a WPMU installation.', 'buddypress' ) ?></p></td>
    207                             <td>
    208                                 <input type="radio" name="bp_components[bp-blogs.php]" value="1"<?php if ( !isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    209                                 <input type="radio" name="bp_components[bp-blogs.php]" value="0"<?php if ( isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    210                             </td>
    211                         </tr>
    212 
    213                     <?php else: ?>
    214 
    215                         <input type="hidden" name="bp_components[bp-blogs.php]" value="0" />
    216 
    217                     <?php endif; ?>
    218 
    219                     <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-forums.php') ) : ?>
    220 
    221                         <tr>
    222                             <td><h3><?php _e( 'bbPress Forums', 'buddypress' ) ?></h3><p><?php _e( 'Activates bbPress forum support within BuddyPress groups or any other custom component.', 'buddypress' ) ?></p></td>
    223                             <td>
    224                                 <input type="radio" name="bp_components[bp-forums.php]" value="1"<?php if ( !isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    225                                 <input type="radio" name="bp_components[bp-forums.php]" value="0"<?php if ( isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    226                             </td>
    227                         </tr>
    228 
    229                     <?php endif; ?>
    230 
    231                     <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-friends.php') ) : ?>
    232 
    233                         <tr>
    234                             <td><h3><?php _e( 'Friends', 'buddypress' ) ?></h3><p><?php _e( 'Allows the creation of friend connections between users.', 'buddypress' ) ?></p></td>
    235                             <td>
    236                                 <input type="radio" name="bp_components[bp-friends.php]" value="1"<?php if ( !isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    237                                 <input type="radio" name="bp_components[bp-friends.php]" value="0"<?php if ( isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    238                             </td>
    239                         </tr>
    240 
    241                     <?php endif; ?>
    242 
    243                     <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-groups.php') ) : ?>
    244 
    245                         <tr>
    246                             <td><h3><?php _e( 'Groups', 'buddypress' ) ?></h3><p><?php _e( 'Let users create, join and participate in groups.', 'buddypress' ) ?></p></td>
    247                             <td>
    248                                 <input type="radio" name="bp_components[bp-groups.php]" value="1"<?php if ( !isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    249                                 <input type="radio" name="bp_components[bp-groups.php]" value="0"<?php if ( isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    250                             </td>
    251                         </tr>
    252 
    253                     <?php endif; ?>
    254 
    255                     <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-messages.php') ) : ?>
    256 
    257                         <tr>
    258                             <td><h3><?php _e( 'Private Messaging', 'buddypress' ) ?></h3><p><?php _e( 'Let users send private messages to one another. Site admins can also send site-wide notices.', 'buddypress' ) ?></p></td>
    259                             <td>
    260                                 <input type="radio" name="bp_components[bp-messages.php]" value="1"<?php if ( !isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    261                                 <input type="radio" name="bp_components[bp-messages.php]" value="0"<?php if ( isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    262                             </td>
    263                         </tr>
    264 
    265                     <?php endif; ?>
    266 
    267                     <?php if ( file_exists( BP_PLUGIN_DIR . '/bp-xprofile.php') ) : ?>
    268 
    269                         <tr>
    270                             <td><h3><?php _e( 'Extended Profiles', 'buddypress' ) ?></h3><p><?php _e( 'Activates customizable profiles and avatars for site users.', 'buddypress' ) ?></p></td>
    271                             <td width="45%">
    272                                 <input type="radio" name="bp_components[bp-xprofile.php]" value="1"<?php if ( !isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?>  &nbsp;
    273                                 <input type="radio" name="bp_components[bp-xprofile.php]" value="0"<?php if ( isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    274                             </td>
    275                         </tr>
    276 
    277                     <?php endif; ?>
    278 
    279                 </tbody>
    280             </table>
    281 
    282             <p class="submit">
     187           
     188            <?php bp_core_admin_component_options() ?>
     189
     190            <p class="submit clear">
    283191                <input class="button-primary" type="submit" name="bp-admin-component-submit" id="bp-admin-component-submit" value="<?php _e( 'Save Settings', 'buddypress' ) ?>"/>
    284192            </p>
     
    290198
    291199<?php
     200}
     201
     202function bp_core_admin_component_options() {
     203    $disabled_components = apply_filters( 'bp_deactivated_components', get_site_option( 'bp-deactivated-components' ) );
     204    ?>
     205   
     206    <div class="component">
     207        <h5><?php _e( "Extended Profiles", 'buddypress' ) ?></h5>
     208
     209        <div class="radio">
     210            <input type="radio" name="bp_components[bp-xprofile.php]" value="1"<?php if ( !isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     211            <input type="radio" name="bp_components[bp-xprofile.php]" value="0"<?php if ( isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
     212        </div>
     213
     214        <img src="<?php echo plugins_url( 'buddypress/screenshot-2.gif' ) ?>" alt="Activity Streams" />
     215        <p><?php _e( "Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.", 'buddypress' ) ?></p>
     216    </div>
     217
     218    <div class="component">
     219        <h5><?php _e( "Friend Connections", 'buddypress' ) ?></h5>
     220
     221        <div class="radio">
     222            <input type="radio" name="bp_components[bp-friends.php]" value="1"<?php if ( !isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     223            <input type="radio" name="bp_components[bp-friends.php]" value="0"<?php if ( isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
     224        </div>
     225
     226        <img src="<?php echo plugins_url( 'buddypress/screenshot-4.gif' ) ?>" alt="Activity Streams" />
     227        <p><?php _e( "Let your users make connections so they can track the activity of others, or filter on only those users they care about the most.", 'buddypress' ) ?></p>
     228    </div>
     229
     230    <div class="component">
     231        <h5><?php _e( "Discussion Forums", 'buddypress' ) ?></h5>
     232
     233        <div class="radio">
     234            <input type="radio" name="bp_components[bp-forums.php]" value="1"<?php if ( !isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     235            <input type="radio" name="bp_components[bp-forums.php]" value="0"<?php if ( isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
     236        </div>
     237
     238        <img src="<?php echo plugins_url( 'buddypress/screenshot-6.gif' ) ?>" alt="Activity Streams" />
     239        <p><?php _e( "Full powered discussion forums built directly into groups allow for more conventional in-depth conversations. <strong>NOTE: This will require an extra (but easy) setup step.</strong>", 'buddypress' ) ?></p>
     240    </div>
     241
     242    <div class="component">
     243        <h5><?php _e( "Activity Streams", 'buddypress' ) ?></h5>
     244
     245        <div class="radio">
     246            <input type="radio" name="bp_components[bp-activity.php]" value="1"<?php if ( !isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     247            <input type="radio" name="bp_components[bp-activity.php]" value="0"<?php if ( isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
     248        </div>
     249
     250        <img src="<?php echo plugins_url( 'buddypress/screenshot-1.gif' ) ?>" alt="Activity Streams" />
     251        <p><?php _e( "Global, personal and group activity streams with threaded commenting, direct posting, favoriting and @mentions. All with full RSS feed and email notification support.", 'buddypress' ) ?></p>
     252    </div>
     253
     254    <div class="component">
     255        <h5><?php _e( "Extensible Groups", 'buddypress' ) ?></h5>
     256
     257        <div class="radio">
     258            <input type="radio" name="bp_components[bp-groups.php]" value="1"<?php if ( !isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     259            <input type="radio" name="bp_components[bp-groups.php]" value="0"<?php if ( isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
     260        </div>
     261
     262        <img src="<?php echo plugins_url( 'buddypress/screenshot-3.gif' ) ?>" alt="Activity Streams" />
     263        <p><?php _e( "Powerful public, private or hidden groups allow your users to break the discussion down into specific topics with a separate activity stream and member listing.", 'buddypress' ) ?></p>
     264    </div>
     265
     266    <div class="component">
     267        <h5><?php _e( "Private Messaging", 'buddypress' ) ?></h5>
     268
     269        <div class="radio">
     270            <input type="radio" name="bp_components[bp-messages.php]" value="1"<?php if ( !isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     271            <input type="radio" name="bp_components[bp-messages.php]" value="0"<?php if ( isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
     272        </div>
     273
     274        <img src="<?php echo plugins_url( 'buddypress/screenshot-5.gif' ) ?>" alt="Activity Streams" />
     275        <p><?php _e( "Private messaging will allow your users to talk to each other directly, and in private. Not just limited to one on one discussions, your users can send messages to multiple recipients.", 'buddypress' ) ?></p>
     276    </div>
     277
     278    <?php if ( is_multisite() ) : ?>
     279
     280        <div class="component">
     281            <h5><?php _e( "Blog Tracking", 'buddypress' ) ?></h5>
     282
     283            <div class="radio">
     284                <input type="radio" name="bp_components[bp-blogs.php]" value="1"<?php if ( !isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
     285                <input type="radio" name="bp_components[bp-blogs.php]" value="0"<?php if ( isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
     286            </div>
     287
     288            <img src="<?php echo plugins_url( 'buddypress/screenshot-7.gif' ) ?>" alt="Activity Streams" />
     289                <p><?php _e( "Track new blogs, new posts and new comments across your entire blog network.", 'buddypress' ) ?></p>
     290        </div>
     291
     292    <?php else: ?>
     293
     294        <input type="hidden" name="bp_components[bp-blogs.php]" value="0" />
     295
     296    <?php endif; ?>
     297   
     298    <?php
    292299}
    293300
  • trunk/bp-core/admin/bp-core-update.php

    r3737 r3745  
    299299        if ( !current_user_can( 'activate_plugins' ) )
    300300            return false;
     301       
     302        if ( !function_exists( 'bp_core_admin_component_options' ) )
     303            require ( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-admin.php' );
    301304
    302305        $disabled_components = apply_filters( 'bp_deactivated_components', get_site_option( 'bp-deactivated-components' ) ); ?>
     
    304307        <p><?php _e( "BuddyPress is made up of a number of individual components, each one adding a distinct feature. The first step is to decide which of these features you'd like to enable on your site. All features are enabled by default, and don't worry, you can change your mind at any point in the future.", 'buddypress' ) ?></p>
    305308
    306         <div class="component">
    307             <h5><?php _e( "Extended Profiles", 'buddypress' ) ?></h5>
    308 
    309             <div class="radio">
    310                 <input type="radio" name="bp_components[bp-xprofile.php]" value="1"<?php if ( !isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    311                 <input type="radio" name="bp_components[bp-xprofile.php]" value="0"<?php if ( isset( $disabled_components['bp-xprofile.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    312             </div>
    313 
    314             <img src="<?php echo plugins_url( 'buddypress/screenshot-2.gif' ) ?>" alt="Activity Streams" />
    315             <p><?php _e( "Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.", 'buddypress' ) ?></p>
    316         </div>
    317 
    318         <div class="component">
    319             <h5><?php _e( "Friend Connections", 'buddypress' ) ?></h5>
    320 
    321             <div class="radio">
    322                 <input type="radio" name="bp_components[bp-friends.php]" value="1"<?php if ( !isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    323                 <input type="radio" name="bp_components[bp-friends.php]" value="0"<?php if ( isset( $disabled_components['bp-friends.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    324             </div>
    325 
    326             <img src="<?php echo plugins_url( 'buddypress/screenshot-4.gif' ) ?>" alt="Activity Streams" />
    327             <p><?php _e( "Let your users make connections so they can track the activity of others, or filter on only those users they care about the most.", 'buddypress' ) ?></p>
    328         </div>
    329 
    330         <div class="component">
    331             <h5><?php _e( "Discussion Forums", 'buddypress' ) ?></h5>
    332 
    333             <div class="radio">
    334                 <input type="radio" name="bp_components[bp-forums.php]" value="1"<?php if ( !isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    335                 <input type="radio" name="bp_components[bp-forums.php]" value="0"<?php if ( isset( $disabled_components['bp-forums.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    336             </div>
    337 
    338             <img src="<?php echo plugins_url( 'buddypress/screenshot-6.gif' ) ?>" alt="Activity Streams" />
    339             <p><?php _e( "Full powered discussion forums built directly into groups allow for more conventional in-depth conversations. <strong>NOTE: This will require an extra (but easy) setup step.</strong>", 'buddypress' ) ?></p>
    340         </div>
    341 
    342         <div class="component">
    343             <h5><?php _e( "Activity Streams", 'buddypress' ) ?></h5>
    344 
    345             <div class="radio">
    346                 <input type="radio" name="bp_components[bp-activity.php]" value="1"<?php if ( !isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    347                 <input type="radio" name="bp_components[bp-activity.php]" value="0"<?php if ( isset( $disabled_components['bp-activity.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    348             </div>
    349 
    350             <img src="<?php echo plugins_url( 'buddypress/screenshot-1.gif' ) ?>" alt="Activity Streams" />
    351             <p><?php _e( "Global, personal and group activity streams with threaded commenting, direct posting, favoriting and @mentions. All with full RSS feed and email notification support.", 'buddypress' ) ?></p>
    352         </div>
    353 
    354         <div class="component">
    355             <h5><?php _e( "Extensible Groups", 'buddypress' ) ?></h5>
    356 
    357             <div class="radio">
    358                 <input type="radio" name="bp_components[bp-groups.php]" value="1"<?php if ( !isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    359                 <input type="radio" name="bp_components[bp-groups.php]" value="0"<?php if ( isset( $disabled_components['bp-groups.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    360             </div>
    361 
    362             <img src="<?php echo plugins_url( 'buddypress/screenshot-3.gif' ) ?>" alt="Activity Streams" />
    363             <p><?php _e( "Powerful public, private or hidden groups allow your users to break the discussion down into specific topics with a separate activity stream and member listing.", 'buddypress' ) ?></p>
    364         </div>
    365 
    366         <div class="component">
    367             <h5><?php _e( "Private Messaging", 'buddypress' ) ?></h5>
    368 
    369             <div class="radio">
    370                 <input type="radio" name="bp_components[bp-messages.php]" value="1"<?php if ( !isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    371                 <input type="radio" name="bp_components[bp-messages.php]" value="0"<?php if ( isset( $disabled_components['bp-messages.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    372             </div>
    373 
    374             <img src="<?php echo plugins_url( 'buddypress/screenshot-5.gif' ) ?>" alt="Activity Streams" />
    375             <p><?php _e( "Private messaging will allow your users to talk to each other directly, and in private. Not just limited to one on one discussions, your users can send messages to multiple recipients.", 'buddypress' ) ?></p>
    376         </div>
    377 
    378         <?php if ( is_multisite() ) : ?>
    379 
    380             <div class="component">
    381                 <h5><?php _e( "Blog Tracking", 'buddypress' ) ?></h5>
    382 
    383                 <div class="radio">
    384                     <input type="radio" name="bp_components[bp-blogs.php]" value="1"<?php if ( !isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Enabled', 'buddypress' ) ?> &nbsp;
    385                     <input type="radio" name="bp_components[bp-blogs.php]" value="0"<?php if ( isset( $disabled_components['bp-blogs.php'] ) ) : ?> checked="checked" <?php endif; ?>/> <?php _e( 'Disabled', 'buddypress' ) ?>
    386                 </div>
    387 
    388                 <img src="<?php echo plugins_url( 'buddypress/screenshot-7.gif' ) ?>" alt="Activity Streams" />
    389                     <p><?php _e( "Track new blogs, new posts and new comments across your entire blog network.", 'buddypress' ) ?></p>
    390             </div>
    391 
    392         <?php else: ?>
    393 
    394             <input type="hidden" name="bp_components[bp-blogs.php]" value="0" />
    395 
    396         <?php endif; ?>
     309        <?php bp_core_admin_component_options() ?>
    397310
    398311        <div class="submit clear">
  • trunk/bp-core/bp-core-templatetags.php

    r3740 r3745  
    18001800
    18011801function bp_is_activity_component() {
    1802     if ( bp_is_current_component( BP_ACTIVITY_SLUG ) )
     1802    if ( defined( 'BP_ACTIVITY_SLUG' ) && bp_is_current_component( BP_ACTIVITY_SLUG ) )
    18031803        return true;
    18041804
     
    18071807
    18081808function bp_is_blogs_component() {
    1809     if ( is_multisite() && bp_is_current_component( BP_BLOGS_SLUG ) )
     1809    if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG ) )
    18101810        return true;
    18111811
     
    18141814
    18151815function bp_is_messages_component() {
    1816     if ( bp_is_current_component( BP_MESSAGES_SLUG ) )
     1816    if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG ) )
    18171817        return true;
    18181818
     
    18211821
    18221822function bp_is_friends_component() {
    1823     if ( bp_is_current_component( BP_FRIENDS_SLUG ) )
     1823    if ( defined( 'BP_FRIENDS_SLUG' ) && bp_is_current_component( BP_FRIENDS_SLUG ) )
    18241824        return true;
    18251825
     
    18281828
    18291829function bp_is_groups_component() {
    1830     if ( bp_is_current_component( BP_GROUPS_SLUG ) )
     1830    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) )
    18311831        return true;
    18321832
     
    18441844    global $bp;
    18451845
    1846     if ( $bp->displayed_user->id )
     1846    if ( !empty( $bp->displayed_user->id ) )
    18471847        return true;
    18481848
     
    18531853    global $bp;
    18541854
    1855     if ( bp_is_current_component( $bp->activity->slug ) )
     1855    if ( !empty( $bp->activity->slug ) && bp_is_current_component( $bp->activity->slug ) )
    18561856        return true;
    18571857
     
    18621862    global $bp;
    18631863
    1864     if ( bp_is_current_component( $bp->activity->slug ) && 'my-friends' == $bp->current_action )
     1864    if ( !empty( $bp->activity->slug ) && bp_is_current_component( $bp->activity->slug ) && 'my-friends' == $bp->current_action )
    18651865        return true;
    18661866
     
    18711871    global $bp;
    18721872
    1873     if ( bp_is_current_component( BP_ACTIVITY_SLUG ) && is_numeric( $bp->current_action ) )
     1873    if ( defined( 'BP_ACTIVITY_SLUG' ) && bp_is_current_component( BP_ACTIVITY_SLUG ) && is_numeric( $bp->current_action ) )
    18741874        return true;
    18751875
     
    18891889    global $bp;
    18901890
    1891     if ( bp_is_current_component( BP_XPROFILE_SLUG ) && 'edit' == $bp->current_action )
     1891    if ( defined( 'BP_XPROFILE_SLUG' ) && bp_is_current_component( BP_XPROFILE_SLUG ) && 'edit' == $bp->current_action )
    18921892        return true;
    18931893
     
    18981898    global $bp;
    18991899
    1900     if ( bp_is_current_component( BP_XPROFILE_SLUG ) && 'change-avatar' == $bp->current_action )
     1900    if ( defined( 'BP_XPROFILE_SLUG' ) && bp_is_current_component( BP_XPROFILE_SLUG ) && 'change-avatar' == $bp->current_action )
    19011901        return true;
    19021902
     
    19071907    global $bp;
    19081908
    1909     if ( bp_is_current_component( BP_GROUPS_SLUG ) )
     1909    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) )
    19101910        return true;
    19111911
     
    19161916    global $bp;
    19171917
    1918     if ( bp_is_current_component( BP_GROUPS_SLUG ) && isset( $bp->groups->current_group ) && $bp->groups->current_group )
     1918    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && isset( $bp->groups->current_group ) && $bp->groups->current_group )
    19191919        return true;
    19201920
     
    19251925    global $bp;
    19261926
    1927     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
     1927    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
    19281928        return true;
    19291929
     
    19341934    global $bp;
    19351935
    1936     if ( bp_is_current_component( BP_GROUPS_SLUG ) && 'create' == $bp->current_action )
     1936    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && 'create' == $bp->current_action )
    19371937        return true;
    19381938
     
    19441944    global $bp;
    19451945
    1946     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'admin' == $bp->current_action )
     1946    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'admin' == $bp->current_action )
    19471947        return true;
    19481948
     
    19531953    global $bp;
    19541954
    1955     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'forum' == $bp->current_action )
     1955    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'forum' == $bp->current_action )
    19561956        return true;
    19571957
     
    19621962    global $bp;
    19631963
    1964     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'activity' == $bp->current_action )
     1964    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'activity' == $bp->current_action )
    19651965        return true;
    19661966
     
    19711971    global $bp;
    19721972
    1973     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )
     1973    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )
    19741974        return true;
    19751975
     
    19801980    global $bp;
    19811981
    1982     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] )
     1982    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'forum' == $bp->current_action && isset( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && isset( $bp->action_variables[2] ) && 'edit' == $bp->action_variables[2] )
    19831983        return true;
    19841984
     
    19891989    global $bp;
    19901990
    1991     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'members' == $bp->current_action )
     1991    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'members' == $bp->current_action )
    19921992        return true;
    19931993
     
    19981998    global $bp;
    19991999
    2000     if ( bp_is_current_component( BP_GROUPS_SLUG ) && 'send-invites' == $bp->current_action )
     2000    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && 'send-invites' == $bp->current_action )
    20012001        return true;
    20022002
     
    20072007    global $bp;
    20082008
    2009     if ( bp_is_current_component( BP_GROUPS_SLUG ) && 'request-membership' == $bp->current_action )
     2009    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && 'request-membership' == $bp->current_action )
    20102010        return true;
    20112011
     
    20162016    global $bp;
    20172017
    2018     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'leave-group' == $bp->current_action )
     2018    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item && 'leave-group' == $bp->current_action )
    20192019        return true;
    20202020
     
    20252025    global $bp;
    20262026
    2027     if ( bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item )
     2027    if ( defined( 'BP_GROUPS_SLUG' ) && bp_is_current_component( BP_GROUPS_SLUG ) && $bp->is_single_item )
    20282028        return true;
    20292029
     
    20342034    global $bp;
    20352035
    2036     if ( is_multisite() && bp_is_current_component( BP_BLOGS_SLUG ) )
     2036    if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG ) )
    20372037        return true;
    20382038
     
    20432043    global $bp;
    20442044
    2045     if ( is_multisite() && bp_is_current_component( BP_BLOGS_SLUG ) && 'recent-posts' == $bp->current_action )
     2045    if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG ) && 'recent-posts' == $bp->current_action )
    20462046        return true;
    20472047
     
    20522052    global $bp;
    20532053
    2054     if ( is_multisite() && bp_is_current_component( BP_BLOGS_SLUG ) && 'recent-comments' == $bp->current_action )
     2054    if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG ) && 'recent-comments' == $bp->current_action )
    20552055        return true;
    20562056
     
    20612061    global $bp;
    20622062
    2063     if ( is_multisite() && bp_is_current_component( BP_BLOGS_SLUG ) && 'create' == $bp->current_action )
     2063    if ( is_multisite() && defined( 'BP_BLOGS_SLUG' ) && bp_is_current_component( BP_BLOGS_SLUG ) && 'create' == $bp->current_action )
    20642064        return true;
    20652065
     
    20682068
    20692069function bp_is_user_friends() {
    2070     if ( bp_is_current_component( BP_FRIENDS_SLUG ) )
     2070    if ( defined( 'BP_FRIENDS_SLUG' ) && bp_is_current_component( BP_FRIENDS_SLUG ) )
    20712071        return true;
    20722072
     
    20772077    global $bp;
    20782078
    2079     if ( bp_is_current_component( BP_FRIENDS_SLUG ) && 'requests' == $bp->current_action )
     2079    if ( defined( 'BP_FRIENDS_SLUG' ) && bp_is_current_component( BP_FRIENDS_SLUG ) && 'requests' == $bp->current_action )
    20802080        return true;
    20812081
     
    20842084
    20852085function bp_is_user_messages() {
    2086     if ( bp_is_current_component( BP_MESSAGES_SLUG ) )
     2086    if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG ) )
    20872087        return true;
    20882088
     
    20932093    global $bp;
    20942094
    2095     if ( bp_is_current_component( BP_MESSAGES_SLUG ) && ( !$bp->current_action || 'inbox' == $bp->current_action ) )
     2095    if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG ) && ( !$bp->current_action || 'inbox' == $bp->current_action ) )
    20962096        return true;
    20972097
     
    21022102    global $bp;
    21032103
    2104     if ( bp_is_current_component( BP_MESSAGES_SLUG ) && 'sentbox' == $bp->current_action )
     2104    if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG ) && 'sentbox' == $bp->current_action )
    21052105        return true;
    21062106
     
    21122112    global $bp;
    21132113
    2114     if ( bp_is_current_component( BP_MESSAGES_SLUG ) && 'notices' == $bp->current_action )
     2114    if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG ) && 'notices' == $bp->current_action )
    21152115        return true;
    21162116
     
    21222122    global $bp;
    21232123
    2124     if ( bp_is_current_component( BP_MESSAGES_SLUG ) && 'compose' == $bp->current_action )
     2124    if ( defined( 'BP_MESSAGES_SLUG' ) && bp_is_current_component( BP_MESSAGES_SLUG ) && 'compose' == $bp->current_action )
    21252125        return true;
    21262126
  • trunk/bp-core/css/admin.dev.css

    r3728 r3745  
    123123        top: 5px;
    124124    }
    125 
     125   
    126126div#bp-admin div.prev-next, div#bp-admin div.prev-next p,
    127127div#bp-admin div.submit, div#bp-admin div.submit p {
  • trunk/bp-themes/bp-default/functions.php

    r3742 r3745  
    511511    );
    512512
    513     if ( bp_forum_directory_is_disabled() ) {
     513    if ( !bp_is_active( 'forums' ) || bp_forum_directory_is_disabled() ) {
    514514        if ( !empty( $pages_args['exclude'] ) )
    515515                $pages_args['exclude'] .= ',';
  • trunk/bp-themes/bp-default/sidebar.php

    r3698 r3745  
    5757
    5858    <?php /* Show forum tags on the forums directory */
    59     if ( BP_FORUMS_SLUG == bp_current_component() && bp_is_directory() ) : ?>
     59    if ( bp_is_current_component( 'forums' ) && bp_is_directory() ) : ?>
    6060        <div id="forum-directory-tags" class="widget tags">
    6161
Note: See TracChangeset for help on using the changeset viewer.