Changeset 1021 for trunk/bp-groups/bp-groups-templatetags.php
- Timestamp:
- 02/06/2009 03:07:48 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups/bp-groups-templatetags.php (modified) (34 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-templatetags.php
r1015 r1021 28 28 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $groups_per_page; 29 29 30 if ( ( $bp ['current_action'] == 'my-groups' && $_REQUEST['group-filter-box'] == '' ) || ( !$bp['current_action'] && !isset($_REQUEST['page']) && $_REQUEST['group-filter-box'] == '') ) {31 32 $order = $bp ['action_variables'][0];30 if ( ( $bp->current_action == 'my-groups' && empty( $_REQUEST['group-filter-box'] ) ) || ( !$bp->current_action && !isset($_REQUEST['page']) && empty( $_REQUEST['group-filter-box'] ) ) ) { 31 32 $order = $bp->action_variables[0]; 33 33 34 34 if ( $order == 'recently-joined' ) { 35 $this->groups = groups_get_recently_joined_for_user( $bp ['current_userid'], $this->pag_num, $this->pag_page );35 $this->groups = groups_get_recently_joined_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page ); 36 36 } else if ( $order == 'most-popular' ) { 37 $this->groups = groups_get_most_popular_for_user( $bp ['current_userid'], $this->pag_num, $this->pag_page );37 $this->groups = groups_get_most_popular_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page ); 38 38 } else if ( $order == 'admin-of' ) { 39 $this->groups = groups_get_user_is_admin_of( $bp ['current_userid'], $this->pag_num, $this->pag_page );39 $this->groups = groups_get_user_is_admin_of( $bp->displayed_user->id, $this->pag_num, $this->pag_page ); 40 40 } else if ( $order == 'mod-of' ) { 41 $this->groups = groups_get_user_is_mod_of( $bp ['current_userid'], $this->pag_num, $this->pag_page );41 $this->groups = groups_get_user_is_mod_of( $bp->displayed_user->id, $this->pag_num, $this->pag_page ); 42 42 } else if ( $order == 'alphabetically' ) { 43 $this->groups = groups_get_alphabetically_for_user( $bp ['current_userid'], $this->pag_num, $this->pag_page );43 $this->groups = groups_get_alphabetically_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page ); 44 44 } else { 45 $this->groups = groups_get_recently_active_for_user( $bp ['current_userid'], $this->pag_num, $this->pag_page );45 $this->groups = groups_get_recently_active_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page ); 46 46 } 47 47 … … 50 50 $this->group_count = count($this->groups); 51 51 52 } else if ( ( $bp ['current_action'] == 'my-groups' && $_REQUEST['group-filter-box'] != '' ) || ( !$bp['current_action']&& !isset($_REQUEST['page']) && $_REQUEST['group-filter-box'] != '' ) ) {52 } else if ( ( $bp->current_action == 'my-groups' && $_REQUEST['group-filter-box'] != '' ) || ( !$bp->current_action && !isset($_REQUEST['page']) && $_REQUEST['group-filter-box'] != '' ) ) { 53 53 54 54 $this->groups = groups_filter_user_groups( $_REQUEST['group-filter-box'], $this->pag_num, $this->pag_page ); … … 57 57 $this->group_count = count($this->groups); 58 58 59 } else if ( $bp ['current_action']== 'invites' ) {59 } else if ( $bp->current_action == 'invites' ) { 60 60 61 61 $this->groups = groups_get_invites_for_user(); … … 83 83 $this->single_group = true; 84 84 85 $group = new stdClass ();85 $group = new stdClass; 86 86 $group->group_id = BP_Groups_Group::get_id_from_slug($group_slug); 87 87 … … 92 92 } else { 93 93 94 $this->groups = groups_get_user_groups( $bp ['current_userid'], $this->pag_num, $this->pag_page );94 $this->groups = groups_get_user_groups( $bp->displayed_user->id, $this->pag_num, $this->pag_page ); 95 95 $this->total_group_count = (int)$this->groups['total']; 96 96 $this->groups = $this->groups['groups']; … … 167 167 168 168 if ( !$is_single_group ) { 169 $groups_template = new BP_Groups_Template( $bp ['current_userid'], false, $groups_per_page );169 $groups_template = new BP_Groups_Template( $bp->displayed_user->id, false, $groups_per_page ); 170 170 } else { 171 $groups_template = new BP_Groups_Template( $bp ['current_userid'], $group_obj->slug, $groups_per_page );171 $groups_template = new BP_Groups_Template( $bp->displayed_user->id, $group_obj->slug, $groups_per_page ); 172 172 } 173 173 … … 191 191 return true; 192 192 } else { 193 if ( groups_is_user_member( $bp ['loggedin_userid'], $groups_template->group->id ) ) {193 if ( groups_is_user_member( $bp->loggedin_user->id, $groups_template->group->id ) ) { 194 194 return true; 195 195 } … … 202 202 global $groups_template; 203 203 204 if ( $groups_template->group->news == '')204 if ( empty( $groups_template->group->news ) ) 205 205 return false; 206 206 … … 265 265 $last_active = groups_get_groupmeta( $groups_template->group->id, 'last_activity' ); 266 266 267 if ( $last_active == '')267 if ( empty( $last_active ) ) 268 268 _e( 'not yet active', 'buddypress' ); 269 269 else … … 278 278 279 279 if ( $echo ) 280 echo apply_filters( 'bp_group_permalink', $bp ['root_domain'] . '/' . $bp['groups']['slug']. '/' . $group_obj->slug );280 echo apply_filters( 'bp_group_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug ); 281 281 else 282 return apply_filters( 'bp_group_permalink', $bp ['root_domain'] . '/' . $bp['groups']['slug']. '/' . $group_obj->slug );282 return apply_filters( 'bp_group_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug ); 283 283 } 284 284 … … 290 290 291 291 if ( $echo ) 292 echo apply_filters( 'bp_group_admin_permalink', $bp ['root_domain'] . '/' . $bp['groups']['slug']. '/' . $group_obj->slug . '/admin' );292 echo apply_filters( 'bp_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug . '/admin' ); 293 293 else 294 return apply_filters( 'bp_group_admin_permalink', $bp ['root_domain'] . '/' . $bp['groups']['slug']. '/' . $group_obj->slug . '/admin' );294 return apply_filters( 'bp_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug . '/admin' ); 295 295 } 296 296 … … 480 480 global $groups_template, $bp; 481 481 482 if ( $bp ['current_action'] == 'my-groups' || !$bp['current_action']) {483 $action = $bp ['loggedin_domain'] . $bp['groups']['slug']. '/my-groups/search/';482 if ( $bp->current_action == 'my-groups' || !$bp->current_action ) { 483 $action = $bp->loggedin_user->domain . $bp->groups->slug . '/my-groups/search/'; 484 484 $label = __('Filter Groups', 'buddypress'); 485 485 $name = 'group-filter-box'; 486 486 } else { 487 $action = $bp ['loggedin_domain'] . $bp['groups']['slug']. '/group-finder/search/';487 $action = $bp->loggedin_user->domain . $bp->groups->slug . '/group-finder/search/'; 488 488 $label = __('Find a Group', 'buddypress'); 489 489 $name = 'groupfinder-search-box'; 490 $value = $bp ['action_variables'][0];490 $value = $bp->action_variables[0]; 491 491 } 492 492 ?> 493 493 <form action="<?php echo $action ?>" id="group-search-form" method="post"> 494 <label for="<?php echo $name ?>" id="<?php echo $name ?>-label"><?php echo $label ?> <img id="ajax-loader" src="<?php echo $bp ['groups']['image_base']?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></label>494 <label for="<?php echo $name ?>" id="<?php echo $name ?>-label"><?php echo $label ?> <img id="ajax-loader" src="<?php echo $bp->groups->image_base ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></label> 495 495 <input type="search" name="<?php echo $name ?>" id="<?php echo $name ?>" value="<?php echo $value ?>"<?php echo $disabled ?> /> 496 496 <?php if ( function_exists('wp_nonce_field') ) … … 504 504 global $bp; 505 505 506 if ( !groups_total_groups_for_user( $bp ['current_userid']) )506 if ( !groups_total_groups_for_user( $bp->displayed_user->id ) ) 507 507 return true; 508 508 … … 715 715 global $bp, $groups_template; 716 716 717 $current_tab = $bp ['action_variables'][0];717 $current_tab = $bp->action_variables[0]; 718 718 ?> 719 <?php if ( $bp ['is_item_admin'] || $bp['is_item_mod']) { ?>720 <li<?php if ( $current_tab == 'edit-details' || $current_tab == '' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['root_domain'] . '/' . $bp['groups']['slug']?>/<?php echo $groups_template->group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>719 <?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?> 720 <li<?php if ( $current_tab == 'edit-details' || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li> 721 721 <?php } ?> 722 722 723 <?php if ( $bp ['is_item_admin']) { ?>724 <li<?php if ( $current_tab == 'group-settings' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp ['root_domain'] . '/' . $bp['groups']['slug']?>/<?php echo $groups_template->group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>723 <?php if ( $bp->is_item_admin ) { ?> 724 <li<?php if ( $current_tab == 'group-settings' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li> 725 725 <?php } ?> 726 726 727 <?php if ( $bp ['is_item_admin']) { ?>728 <li<?php if ( $current_tab == 'group-avatar' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp ['root_domain'] . '/' . $bp['groups']['slug']?>/<?php echo $groups_template->group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>727 <?php if ( $bp->is_item_admin ) { ?> 728 <li<?php if ( $current_tab == 'group-avatar' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li> 729 729 <?php } ?> 730 730 731 <?php if ( $bp ['is_item_admin']) { ?>732 <li<?php if ( $current_tab == 'manage-members' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp ['root_domain'] . '/' . $bp['groups']['slug']?>/<?php echo $groups_template->group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>731 <?php if ( $bp->is_item_admin ) { ?> 732 <li<?php if ( $current_tab == 'manage-members' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li> 733 733 <?php } ?> 734 734 735 <?php if ( $bp ['is_item_admin']&& $groups_template->group->status == 'private' ) : ?>736 <li<?php if ( $current_tab == 'membership-requests' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp ['root_domain'] . '/' . $bp['groups']['slug']?>/<?php echo $groups_template->group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>735 <?php if ( $bp->is_item_admin && $groups_template->group->status == 'private' ) : ?> 736 <li<?php if ( $current_tab == 'membership-requests' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li> 737 737 <?php endif; ?> 738 738 739 <?php if ( $bp ['is_item_admin']) { ?>740 <li<?php if ( $current_tab == 'delete-group' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp ['root_domain'] . '/' . $bp['groups']['slug']?>/<?php echo $groups_template->group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>739 <?php if ( $bp->is_item_admin ) { ?> 740 <li<?php if ( $current_tab == 'delete-group' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li> 741 741 <?php } ?> 742 742 … … 763 763 $group = $groups_template->group; 764 764 765 if ( groups_check_for_membership_request( $bp ['loggedin_userid'], $group->id ) )765 if ( groups_check_for_membership_request( $bp->loggedin_user->id, $group->id ) ) 766 766 return true; 767 767 … … 772 772 global $bp, $create_group_step, $completed_to_step; 773 773 ?> 774 <li<?php if ( $create_group_step == '1' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp ['current_domain'] . $bp['groups']['slug']?>/create/step/1">1. <?php _e('Group Details', 'buddypress') ?></a></li>775 <li<?php if ( $create_group_step == '2' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 0 ) { ?><a href="<?php echo $bp ['current_domain'] . $bp['groups']['slug']?>/create/step/2">2. <?php _e('Group Settings', 'buddypress') ?></a><?php } else { ?><span>2. <?php _e('Group Settings', 'buddypress') ?></span><?php } ?></li>776 <li<?php if ( $create_group_step == '3' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 1 ) { ?><a href="<?php echo $bp ['current_domain'] . $bp['groups']['slug']?>/create/step/3">3. <?php _e('Group Avatar', 'buddypress') ?></a><?php } else { ?><span>3. <?php _e('Group Avatar', 'buddypress') ?></span><?php } ?></li>777 <li<?php if ( $create_group_step == '4' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 2 ) { ?><a href="<?php echo $bp ['current_domain'] . $bp['groups']['slug']?>/create/step/4">4. <?php _e('Invite Members', 'buddypress') ?></a><?php } else { ?><span>4. <?php _e('Invite Members', 'buddypress') ?></span><?php } ?></li>774 <li<?php if ( $create_group_step == '1' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/1">1. <?php _e('Group Details', 'buddypress') ?></a></li> 775 <li<?php if ( $create_group_step == '2' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 0 ) { ?><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/2">2. <?php _e('Group Settings', 'buddypress') ?></a><?php } else { ?><span>2. <?php _e('Group Settings', 'buddypress') ?></span><?php } ?></li> 776 <li<?php if ( $create_group_step == '3' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 1 ) { ?><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/3">3. <?php _e('Group Avatar', 'buddypress') ?></a><?php } else { ?><span>3. <?php _e('Group Avatar', 'buddypress') ?></span><?php } ?></li> 777 <li<?php if ( $create_group_step == '4' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 2 ) { ?><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/4">4. <?php _e('Invite Members', 'buddypress') ?></a><?php } else { ?><span>4. <?php _e('Invite Members', 'buddypress') ?></span><?php } ?></li> 778 778 <?php 779 779 do_action( 'groups_creation_tabs' ); … … 807 807 808 808 ?> 809 <form action="<?php echo $bp ['current_domain'] . $bp['groups']['slug']?>/create/step/<?php echo $create_group_step ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data">809 <form action="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/<?php echo $create_group_step ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data"> 810 810 <?php switch( $create_group_step ) { 811 811 case '1': ?> … … 907 907 908 908 if ( function_exists('friends_install') ) { 909 if ( friends_get_friend_count_for_user( $bp ['loggedin_userid']) ) {909 if ( friends_get_friend_count_for_user( $bp->loggedin_user->id ) ) { 910 910 bp_group_send_invite_form( $group_obj ); 911 911 } else { … … 936 936 return false; 937 937 938 $friends = friends_get_friends_invite_list( $bp ['loggedin_userid'], $group_obj->id );938 $friends = friends_get_friends_invite_list( $bp->loggedin_user->id, $group_obj->id ); 939 939 940 940 if ( $friends ) { 941 $invites = groups_get_invites_for_group( $bp ['loggedin_userid'], $group_obj->id );941 $invites = groups_get_invites_for_group( $bp->loggedin_user->id, $group_obj->id ); 942 942 943 943 ?> … … 968 968 global $bp, $create_group_step, $completed_to_step; 969 969 ?> 970 <li<?php if ( !isset($bp ['action_variables'][0]) || $bp['action_variables'][0] == 'recently-active' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug']?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>971 <li<?php if ( $bp ['action_variables'][0] == 'recently-joined' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug']?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li>972 <li<?php if ( $bp ['action_variables'][0] == 'most-popular' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug']?>/my-groups/most-popular""><?php _e( 'Most Popular', 'buddypress' ) ?></a></li>973 <li<?php if ( $bp ['action_variables'][0] == 'admin-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug']?>/my-groups/admin-of""><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li>974 <li<?php if ( $bp ['action_variables'][0] == 'mod-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug']?>/my-groups/mod-of""><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li>975 <li<?php if ( $bp ['action_variables'][0] == 'alphabetically' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug']?>/my-groups/alphabetically""><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>970 <li<?php if ( !isset($bp->action_variables[0]) || $bp->action_variables[0] == 'recently-active' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li> 971 <li<?php if ( $bp->action_variables[0] == 'recently-joined' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li> 972 <li<?php if ( $bp->action_variables[0] == 'most-popular' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/most-popular""><?php _e( 'Most Popular', 'buddypress' ) ?></a></li> 973 <li<?php if ( $bp->action_variables[0] == 'admin-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/admin-of""><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li> 974 <li<?php if ( $bp->action_variables[0] == 'mod-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/mod-of""><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li> 975 <li<?php if ( $bp->action_variables[0] == 'alphabetically' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/alphabetically""><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li> 976 976 977 977 <?php … … 982 982 global $bp; 983 983 984 $current_filter = $bp ['action_variables'][0];984 $current_filter = $bp->action_variables[0]; 985 985 986 986 switch ( $current_filter ) { … … 1009 1009 global $bp, $groups_template; 1010 1010 1011 if ( groups_is_user_member( $bp ['loggedin_userid'], $groups_template->group->id ) )1011 if ( groups_is_user_member( $bp->loggedin_user->id, $groups_template->group->id ) ) 1012 1012 return true; 1013 1013 … … 1018 1018 global $groups_template, $bp; 1019 1019 1020 echo apply_filters( 'bp_group_accept_invite_link', $bp ['loggedin_domain'] . $bp['groups']['slug']. '/invites/accept/' . $groups_template->group->id );1020 echo apply_filters( 'bp_group_accept_invite_link', $bp->loggedin_user->domain . $bp->groups->slug . '/invites/accept/' . $groups_template->group->id ); 1021 1021 } 1022 1022 … … 1024 1024 global $groups_template, $bp; 1025 1025 1026 echo apply_filters( 'bp_group_reject_invite_link', $bp ['loggedin_domain'] . $bp['groups']['slug']. '/invites/reject/' . $groups_template->group->id );1026 echo apply_filters( 'bp_group_reject_invite_link', $bp->loggedin_user->domain . $bp->groups->slug . '/invites/reject/' . $groups_template->group->id ); 1027 1027 } 1028 1028 … … 1033 1033 return false; 1034 1034 1035 if ( !friends_check_user_has_friends( $bp ['loggedin_userid'] ) || !friends_count_invitable_friends( $bp['loggedin_userid'], $groups_template->group->id ) )1035 if ( !friends_check_user_has_friends( $bp->loggedin_user->id ) || !friends_count_invitable_friends( $bp->loggedin_user->id, $groups_template->group->id ) ) 1036 1036 return false; 1037 1037 … … 1058 1058 ?> 1059 1059 <div class="left-menu"> 1060 <h4><?php _e( 'Select Friends', 'buddypress' ) ?> <img id="ajax-loader" src="<?php echo $bp ['groups']['image_base']?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></h4>1060 <h4><?php _e( 'Select Friends', 'buddypress' ) ?> <img id="ajax-loader" src="<?php echo $bp->groups->image_base ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></h4> 1061 1061 <?php bp_group_list_invite_friends() ?> 1062 1062 <?php wp_nonce_field( 'invite_user' ) ?> … … 1070 1070 </div> 1071 1071 1072 <?php $invites = groups_get_invites_for_group( $bp ['loggedin_userid'], $group_obj->id ) ?>1072 <?php $invites = groups_get_invites_for_group( $bp->loggedin_user->id, $group_obj->id ) ?> 1073 1073 1074 1074 <ul id="friend-list" class="item-list"> … … 1081 1081 <span class="activity"><?php echo $user->last_active ?></span> 1082 1082 <div class="action"> 1083 <a class="remove" href="<?php echo site_url() . $bp ['groups']['slug']. '/' . $group_obj->id . '/invites/remove/' . $user->id ?>" id="uid-<?php echo $user->id ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a>1083 <a class="remove" href="<?php echo site_url() . $bp->groups->slug . '/' . $group_obj->id . '/invites/remove/' . $user->id ?>" id="uid-<?php echo $user->id ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a> 1084 1084 </div> 1085 1085 </li> … … 1097 1097 <img src="<?php echo $group_obj->avatar_full ?>" alt="Group Avatar" class="avatar" /> 1098 1098 <?php } else { ?> 1099 <img src="<?php echo $bp ['groups']['image_base']. '/none.gif' ?>" alt="No Group Avatar" class="avatar" />1099 <img src="<?php echo $bp->groups->image_base . '/none.gif' ?>" alt="No Group Avatar" class="avatar" /> 1100 1100 <?php } 1101 1101 } … … 1122 1122 1123 1123 // If they're not logged in or are banned from the group, no join button. 1124 if ( !is_user_logged_in() || groups_is_user_banned( $bp ['loggedin_userid'], $group->id ) )1124 if ( !is_user_logged_in() || groups_is_user_banned( $bp->loggedin_user->id, $group->id ) ) 1125 1125 return false; 1126 1126 … … 1129 1129 switch ( $group->status ) { 1130 1130 case 'public': 1131 if ( BP_Groups_Member::check_is_member( $bp ['loggedin_userid'], $group->id ) )1131 if ( BP_Groups_Member::check_is_member( $bp->loggedin_user->id, $group->id ) ) 1132 1132 echo '<a class="leave-group" href="' . bp_group_permalink( $group, false ) . '/leave-group">' . __('Leave Group', 'buddypress') . '</a>'; 1133 1133 else … … 1136 1136 1137 1137 case 'private': 1138 if ( BP_Groups_Member::check_is_member( $bp ['loggedin_userid'], $group->id ) ) {1138 if ( BP_Groups_Member::check_is_member( $bp->loggedin_user->id, $group->id ) ) { 1139 1139 echo '<a class="leave-group" href="' . bp_group_permalink( $group, false ) . '/leave-group">' . __('Leave Group', 'buddypress') . '</a>'; 1140 1140 } else { … … 1214 1214 global $bp; 1215 1215 1216 $group_ids = BP_Groups_Member::get_random_groups( $bp ['current_userid']);1216 $group_ids = BP_Groups_Member::get_random_groups( $bp->displayed_user->id ); 1217 1217 ?> 1218 1218 <div class="info-group"> 1219 <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <a href="<?php echo $bp ['current_domain'] . $bp['groups']['slug']?>"><?php _e('See All', 'buddypress') ?> »</a></h4>1219 <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>"><?php _e('See All', 'buddypress') ?> »</a></h4> 1220 1220 <?php if ( $group_ids ) { ?> 1221 1221 <ul class="horiz-gallery"> … … 1411 1411 global $bp; 1412 1412 1413 if ( $bp ['current_action']== 'group-finder' )1413 if ( $bp->current_action == 'group-finder' ) 1414 1414 echo apply_filters( 'bp_group_reject_invite_link', 'groupfinder-pag' ); 1415 1415 else
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)