Skip to:
Content

BuddyPress.org

Changeset 2474


Ignore:
Timestamp:
01/29/2010 01:44:11 PM (15 years ago)
Author:
apeatling
Message:

Fixing component dependencies within the default theme.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r2274 r2474  
    279279
    280280    if ( !function_exists('xprofile_install') )
    281         bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'profile/index' ) );
     281        bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) );
    282282}
    283283
  • trunk/bp-core/bp-core-templatetags.php

    r2468 r2474  
    13891389/* Template is_() functions to determine the current page */
    13901390
     1391function bp_is_deactivated( $plugin_file ) {
     1392    global $bp_deactivated;
     1393
     1394    if ( isset( $bp_deactivated[$plugin_file] ) )
     1395        return true;
     1396
     1397    return false;
     1398}
     1399
    13911400function bp_is_profile_component() {
    13921401    global $bp;
     
    14911500    global $bp;
    14921501
    1493     if ( BP_XPROFILE_SLUG == $bp->current_component )
     1502    if ( BP_XPROFILE_SLUG == $bp->current_component || $bp->core->profile->slug == $bp->current_component )
    14941503        return true;
    14951504
  • trunk/bp-themes/bp-default/_inc/options.php

    r2284 r2474  
    3535                            <td>
    3636                                <label><input id="bpdtheme_frontpage_blog" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'blog' || empty($bp_dtheme_options['show_on_frontpage']) ) echo 'checked="checked"'; ?> value="blog" /> <?php _e( 'Blog Posts', 'buddypress' ) ?></label><br />
    37                                 <label><input id="bpdtheme_frontpage_activity" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'activity' ) echo 'checked="checked"'; ?> value="activity" /> <?php _e( 'Activity Stream', 'buddypress' ) ?></label>
     37                                <?php if ( !bp_is_deactivated('bp-activity.php') ) : ?>
     38                                    <label><input id="bpdtheme_frontpage_activity" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'activity' ) echo 'checked="checked"'; ?> value="activity" /> <?php _e( 'Activity Stream', 'buddypress' ) ?></label>
     39                                <?php endif; ?>
    3840                            </td>
    3941                        </tr>
  • trunk/bp-themes/bp-default/activity/index.php

    r2455 r2474  
    2222                    <?php if ( is_user_logged_in() ) : ?>
    2323
    24                         <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    25                             <li id="activity-friends"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#friends/' ) ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
     24                        <?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?>
     25                            <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
     26                                <li id="activity-friends"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#friends/' ) ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li>
     27                            <?php endif; ?>
    2628                        <?php endif; ?>
    2729
    28                         <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
    29                             <li id="activity-groups"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#groups/' ) ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
     30                        <?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?>
     31                            <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
     32                                <li id="activity-groups"><a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#groups/' ) ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li>
     33                            <?php endif; ?>
    3034                        <?php endif; ?>
    3135
  • trunk/bp-themes/bp-default/activity/post-form.php

    r2471 r2474  
    3434            </div>
    3535
    36             <?php if ( !bp_is_my_profile() && !bp_is_group() ) : ?>
     36            <?php if ( function_exists('bp_has_groups') && !bp_is_my_profile() && !bp_is_group() ) : ?>
    3737                <div id="whats-new-post-in-box">
    3838                    <?php _e( 'Post in', 'buddypress' ) ?>:
  • trunk/bp-themes/bp-default/header.php

    r2429 r2474  
    4949                </li>
    5050
    51                 <?php if ( 'blog' == bp_dtheme_show_on_frontpage() ) : ?>
    52                     <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
    53                         <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
    54                     </li>
    55                 <?php else : ?>
    56                     <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) || bp_is_blog_page() && !is_front_page() && !is_page() ) : ?> class="selected"<?php endif; ?>>
    57                         <a href="<?php echo site_url() ?>/<?php echo BP_HOME_BLOG_SLUG ?>/" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a>
    58                     </li>
     51                <?php if ( !bp_is_deactivated('bp-activity.php') ) : ?>
     52                    <?php if ( 'blog' == bp_dtheme_show_on_frontpage() ) : ?>
     53                        <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
     54                            <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
     55                        </li>
     56                    <?php else : ?>
     57                        <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) || bp_is_blog_page() && !is_front_page() && !is_page() ) : ?> class="selected"<?php endif; ?>>
     58                            <a href="<?php echo site_url() ?>/<?php echo BP_HOME_BLOG_SLUG ?>/" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a>
     59                        </li>
     60                    <?php endif; ?>
    5961                <?php endif; ?>
    6062
  • trunk/bp-themes/bp-default/home.php

    r2308 r2474  
    44     * This is set in wp-admin > Appearance > Theme Options
    55     */
    6 
    7     if ( 'blog' == bp_dtheme_show_on_frontpage() )
     6    if ( bp_is_deactivated('bp-activity.php') )
    87        locate_template( array( 'index.php' ), true );
    9     else
    10         locate_template( array( 'activity/index.php' ), true );
     8    else {
     9        if ( 'blog' == bp_dtheme_show_on_frontpage() )
     10            locate_template( array( 'index.php' ), true );
     11        else
     12            locate_template( array( 'activity/index.php' ), true );
     13    }
    1114?>
Note: See TracChangeset for help on using the changeset viewer.