Skip to:
Content

BuddyPress.org

Ticket #1997: activity-disabled.patch

File activity-disabled.patch, 3.0 KB (added by johnjamesjacoby, 16 years ago)
  • bp-core/bp-core-templatetags.php

     
    15901590        return false;
    15911591}
    15921592
     1593function bp_is_group_activity() {
     1594        global $bp;
     1595
     1596        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'activity' == $bp->current_action )
     1597                return true;
     1598
     1599        return false;
     1600}
     1601
    15931602function bp_is_group_forum_topic() {
    15941603        global $bp;
    15951604
  • bp-themes/bp-default/groups/single/home.php

     
    2323                        <div id="item-body">
    2424                                <?php do_action( 'bp_before_group_body' ) ?>
    2525
    26                                 <?php if ( bp_is_group_admin_page() && bp_group_is_visible() ) : ?>
    27                                         <?php locate_template( array( 'groups/single/admin.php' ), true ) ?>
     26                                <?php if ( bp_group_is_visible() ) : ?>
    2827
    29                                 <?php elseif ( bp_is_group_members() && bp_group_is_visible() ) : ?>
    30                                         <?php locate_template( array( 'groups/single/members.php' ), true ) ?>
     28                                        <?php if ( bp_is_group_admin_page() ) : ?>
     29                                                <?php locate_template( array( 'groups/single/admin.php' ), true ) ?>
    3130
    32                                 <?php elseif ( bp_is_group_invites() && bp_group_is_visible() ) : ?>
    33                                         <?php locate_template( array( 'groups/single/send-invites.php' ), true ) ?>
     31                                        <?php elseif ( bp_is_group_home() ) : ?>
    3432
    35                                 <?php elseif ( bp_is_group_forum() && bp_group_is_visible() ) : ?>
    36                                         <?php locate_template( array( 'groups/single/forum.php' ), true ) ?>
     33                                                <?php if ( function_exists( 'bp_activity_install' ) ) : ?>
     34                                                        <?php locate_template( array( 'groups/single/activity.php' ), true ) ?>
    3735
     36                                                <?php elseif ( function_exists( 'bp_forums_setup' ) ) : ?>
     37                                                        <?php locate_template( array( 'groups/single/forum.php' ), true ) ?>
     38
     39                                                <?php else : ?>
     40                                                        <?php locate_template( array( 'groups/single/members.php' ), true ) ?>
     41
     42                                                <?php endif; ?>
     43
     44                                        <?php elseif ( function_exists( 'bp_forums_setup' ) && bp_is_group_forum() ) : ?>
     45                                                <?php locate_template( array( 'groups/single/forum.php' ), true ) ?>
     46
     47                                        <?php elseif ( function_exists( 'bp_activity_install' ) && bp_is_group_activity() ) : ?>
     48                                                <?php locate_template( array( 'groups/single/forum.php' ), true ) ?>
     49
     50                                        <?php elseif ( bp_is_group_members() ) : ?>
     51                                                <?php locate_template( array( 'groups/single/members.php' ), true ) ?>
     52
     53                                        <?php elseif ( bp_is_group_invites() ) : ?>
     54                                                <?php locate_template( array( 'groups/single/send-invites.php' ), true ) ?>
     55
     56                                        <?php endif; ?>
     57
    3858                                <?php elseif ( bp_is_group_membership_request() ) : ?>
    3959                                        <?php locate_template( array( 'groups/single/request-membership.php' ), true ) ?>
    4060
    41                                 <?php elseif ( bp_group_is_visible() ) : ?>
    42                                         <?php locate_template( array( 'groups/single/activity.php' ), true ) ?>
    43 
    4461                                <?php else : ?>
    4562                                        <?php /* The group is not visible, show the status message */ ?>
    4663