Changeset 1145
- Timestamp:
- 02/25/2009 04:32:50 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r1052 r1145 279 279 280 280 function bp_core_force_buddypress_stylesheet( $stylesheet ) { 281 global $bp, $is_ single_group, $is_member_page;281 global $bp, $is_member_page; 282 282 283 283 $member_theme = get_site_option('active-member-theme'); -
trunk/bp-core/bp-core-templatetags.php
r1079 r1145 74 74 */ 75 75 function bp_get_options_nav() { 76 global $bp, $is_single_group; 77 78 /* Only render this navigation when the logged in user is looking at one of their own pages. */ 79 if ( bp_is_home() || $is_single_group ) { 76 global $bp; 77 78 /*** 79 * Only render this navigation when the logged in user is looking at one of their own pages, or we are using it to display nav 80 * menus for something like a group, or event. 81 */ 82 if ( bp_is_home() || $bp->is_single_item ) { 80 83 if ( count( $bp->bp_options_nav[$bp->current_component] ) < 1 ) 81 84 return false; -
trunk/bp-forums/bp-forums-templatetags.php
r1052 r1145 94 94 function bp_has_topics( $topics_per_page = 10 ) { 95 95 global $forum_template, $bp; 96 global $ is_single_group, $group_obj;96 global $group_obj; 97 97 98 98 $forum_id = groups_get_groupmeta( $group_obj->id, 'forum_id' ); … … 369 369 function bp_has_topic_posts( $posts_per_page = 10 ) { 370 370 global $topic_template, $bp; 371 global $ is_single_group, $group_obj;371 global $group_obj; 372 372 373 373 $topic_id = $bp->action_variables[1]; -
trunk/bp-groups.php
r1142 r1145 189 189 function groups_setup_nav() { 190 190 global $bp, $current_blog; 191 global $group_obj , $is_single_group;191 global $group_obj; 192 192 193 193 if ( $group_id = BP_Groups_Group::group_exists($bp->current_action) ) { 194 194 195 /* This is a single group page. */ 195 $ is_single_group= true;196 $bp->is_single_item = true; 196 197 $group_obj = new BP_Groups_Group( $group_id ); 197 198 … … 228 229 if ( $bp->current_component == $bp->groups->slug ) { 229 230 230 if ( bp_is_home() && !$ is_single_group) {231 if ( bp_is_home() && !$bp->is_single_item ) { 231 232 232 233 $bp->bp_options_title = __('My Groups', 'buddypress'); 233 234 234 } else if ( !bp_is_home() && !$ is_single_group) {235 } else if ( !bp_is_home() && !$bp->is_single_item ) { 235 236 236 237 $bp->bp_options_avatar = bp_core_get_avatar( $bp->displayed_user->id, 1 ); 237 238 $bp->bp_options_title = $bp->displayed_user->fullname; 238 239 239 } else if ( $ is_single_group) {240 } else if ( $bp->is_single_item ) { 240 241 // We are viewing a single group, so set up the 241 242 // group navigation menu using the $group_obj global. … … 397 398 398 399 function groups_screen_group_home() { 399 global $ is_single_group, $bp;400 401 if ( $ is_single_group) {400 global $bp; 401 402 if ( $bp->is_single_item ) { 402 403 403 404 if ( isset($_GET['new']) ) { … … 416 417 417 418 function groups_screen_group_forum() { 418 global $ is_single_group, $bp, $group_obj;419 420 if ( $ is_single_group) {419 global $bp, $group_obj; 420 421 if ( $bp->is_single_item ) { 421 422 $topic_id = $bp->action_variables[1]; 422 423 $forum_id = groups_get_groupmeta( $group_obj->id, 'forum_id' ); … … 452 453 function groups_screen_group_wire() { 453 454 global $bp; 454 global $ is_single_group, $group_obj;455 global $group_obj; 455 456 456 457 $wire_action = $bp->action_variables[0]; 457 458 458 if ( $ is_single_group) {459 if ( $bp->is_single_item ) { 459 460 if ( 'post' == $wire_action && BP_Groups_Member::check_is_member( $bp->loggedin_user->id, $group_obj->id ) ) { 460 461 … … 496 497 function groups_screen_group_members() { 497 498 global $bp; 498 global $ is_single_group, $group_obj;499 500 if ( $ is_single_group) {499 global $group_obj; 500 501 if ( $bp->is_single_item ) { 501 502 do_action( 'groups_screen_group_members', $group_obj->id ); 502 503 … … 507 508 function groups_screen_group_photos() { 508 509 global $bp; 509 global $ is_single_group, $group_obj;510 511 if ( $ is_single_group) {510 global $group_obj; 511 512 if ( $bp->is_single_item ) { 512 513 // Not implemented yet. 513 514 bp_core_load_template( 'groups/group-home' ); … … 517 518 function groups_screen_group_invite() { 518 519 global $bp; 519 global $ is_single_group, $group_obj;520 521 if ( $ is_single_group) {520 global $group_obj; 521 522 if ( $bp->is_single_item ) { 522 523 if ( isset($bp->action_variables) && 'send' == $bp->action_variables[0] ) { 523 524 // Send the invites. … … 538 539 function groups_screen_group_leave() { 539 540 global $bp; 540 global $ is_single_group, $group_obj;541 542 if ( $ is_single_group) {541 global $group_obj; 542 543 if ( $bp->is_single_item ) { 543 544 if ( isset($bp->action_variables) && 'yes' == $bp->action_variables[0] ) { 544 545 … … 923 924 function groups_action_join_group() { 924 925 global $bp; 925 global $ is_single_group, $group_obj;926 927 if ( !$ is_single_group|| $bp->current_component != $bp->groups->slug || $bp->current_action != 'join' )926 global $group_obj; 927 928 if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug || $bp->current_action != 'join' ) 928 929 return false; 929 930 … … 2219 2220 2220 2221 if ( $current_component == $groups_bp->groups->slug ) 2221 $ is_single_group= BP_Groups_Group::group_exists( $current_action, $groups_bp->groups->table_name );2222 2223 if ( $ is_single_group) {2222 $bp->is_single_item = BP_Groups_Group::group_exists( $current_action, $groups_bp->groups->table_name ); 2223 2224 if ( $bp->is_single_item ) { 2224 2225 add_filter( 'theme_root', 'bp_core_set_member_theme_root' ); 2225 2226 add_filter( 'theme_root_uri', 'bp_core_set_member_theme_root_uri' ); … … 2235 2236 2236 2237 function groups_force_buddypress_stylesheet( $stylesheet ) { 2237 global $bp, $is_ single_group, $is_member_page, $current_component;2238 global $bp, $is_member_page, $current_component; 2238 2239 2239 2240 if ( $current_component != $bp->groups->slug ) … … 2245 2246 $member_theme = 'buddypress-member'; 2246 2247 2247 if ( $ is_single_group) {2248 if ( $bp->is_single_item ) { 2248 2249 add_filter( 'theme_root', 'bp_core_set_member_theme_root' ); 2249 2250 add_filter( 'theme_root_uri', 'bp_core_set_member_theme_root_uri' ); -
trunk/bp-groups/bp-groups-templatetags.php
r1138 r1145 164 164 function bp_has_groups( $groups_per_page = 10 ) { 165 165 global $groups_template, $bp; 166 global $ is_single_group, $group_obj;167 168 if ( !$ is_single_group) {166 global $group_obj; 167 168 if ( !$bp->is_single_item ) { 169 169 $groups_template = new BP_Groups_Template( $bp->displayed_user->id, false, $groups_per_page ); 170 170 } else { -
trunk/buddypress-theme/member-themes/buddypress-member/functions.php
r1052 r1145 9 9 10 10 function bp_get_options_class() { 11 global $bp , $is_single_group;11 global $bp; 12 12 13 13 if ( !bp_is_home() && $bp->current_component == $bp->profile->slug || $bp->current_component == $bp->friends->slug || $bp->current_component == $bp->blogs->slug ) { … … 15 15 } 16 16 17 if ( ( $bp->current_component == $bp->groups->slug && $ is_single_group) || ( $bp->current_component == $bp->groups->slug && !bp_is_home() ) )17 if ( ( $bp->current_component == $bp->groups->slug && $bp->is_single_item ) || ( $bp->current_component == $bp->groups->slug && !bp_is_home() ) ) 18 18 echo ' class="arrow"'; 19 19 }
Note: See TracChangeset
for help on using the changeset viewer.