Changeset 3841
- Timestamp:
- 01/22/2011 04:10:42 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-template.php
r3830 r3841 1 1 <?php 2 3 /** 4 * Output the forums component slug 5 * 6 * @package BuddyPress 7 * @subpackage Forums Template 8 * @since BuddyPress {unknown} 9 * 10 * @uses bp_get_forums_slug() 11 */ 12 function bp_forums_slug() { 13 echo bp_get_forums_slug(); 14 } 15 /** 16 * Return the forums component slug 17 * 18 * @package BuddyPress 19 * @subpackage Forums Template 20 * @since BuddyPress {unknown} 21 */ 22 function bp_get_forums_slug() { 23 global $bp; 24 return apply_filters( 'bp_get_forums_slug', $bp->forums->slug ); 25 } 26 27 /** 28 * Output the forums component root slug 29 * 30 * @package BuddyPress 31 * @subpackage Forums Template 32 * @since BuddyPress {unknown} 33 * 34 * @uses bp_get_forums_root_slug() 35 */ 36 function bp_forums_root_slug() { 37 echo bp_get_forums_root_slug(); 38 } 39 /** 40 * Return the forums component root slug 41 * 42 * @package BuddyPress 43 * @subpackage Forums Template 44 * @since BuddyPress {unknown} 45 */ 46 function bp_get_forums_root_slug() { 47 global $bp; 48 return apply_filters( 'bp_get_forums_root_slug', $bp->forums->root_slug ); 49 } 2 50 3 51 class BP_Forums_Template_Forum { -
trunk/bp-friends/bp-friends-template.php
r3778 r3841 1 1 <?php 2 2 3 /** 4 * Output the friends component slug 5 * 6 * @package BuddyPress 7 * @subpackage Friends Template 8 * @since BuddyPress {unknown} 9 * 10 * @uses bp_get_friends_slug() 11 */ 12 function bp_friends_slug() { 13 echo bp_get_friends_slug(); 14 } 15 /** 16 * Return the friends component slug 17 * 18 * @package BuddyPress 19 * @subpackage Friends Template 20 * @since BuddyPress {unknown} 21 */ 22 function bp_get_friends_slug() { 23 global $bp; 24 return apply_filters( 'bp_get_friends_slug', $bp->friends->slug ); 25 } 26 27 /** 28 * Output the friends component root slug 29 * 30 * @package BuddyPress 31 * @subpackage Friends Template 32 * @since BuddyPress {unknown} 33 * 34 * @uses bp_get_friends_root_slug() 35 */ 36 function bp_friends_root_slug() { 37 echo bp_get_friends_root_slug(); 38 } 39 /** 40 * Return the friends component root slug 41 * 42 * @package BuddyPress 43 * @subpackage Friends Template 44 * @since BuddyPress {unknown} 45 */ 46 function bp_get_friends_root_slug() { 47 global $bp; 48 return apply_filters( 'bp_get_friends_root_slug', $bp->friends->root_slug ); 49 } 50 3 51 function bp_friends_header_tabs() { 4 global $bp; 5 ?> 52 global $bp; ?> 53 6 54 <li<?php if ( !isset($bp->action_variables[0]) || 'recently-active' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li> 7 55 <li<?php if ( 'newest' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li> 8 56 <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/alphabetically""><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li> 57 9 58 <?php 10 59 do_action( 'friends_header_tabs' ); … … 25 74 case 'alphabetically': 26 75 _e( 'Alphabetically', 'buddypress' ); 27 break;76 break; 28 77 } 29 78 } … … 35 84 $friend_ids = BP_Friends_Friendship::get_random_friends( $bp->displayed_user->id ); 36 85 wp_cache_set( 'friends_friend_ids_' . $bp->displayed_user->id, $friend_ids, 'bp' ); 37 } 38 ?> 86 } ?> 87 39 88 <div class="info-group"> 40 89 <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?> (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>"><?php _e('See All', 'buddypress') ?> →</a></span></h4> 41 90 42 91 <?php if ( $friend_ids ) { ?> 92 43 93 <ul class="horiz-gallery"> 94 44 95 <?php for ( $i = 0; $i < count( $friend_ids ); $i++ ) { ?> 96 45 97 <li> 46 98 <a href="<?php echo bp_core_get_user_domain( $friend_ids[$i] ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $friend_ids[$i], 'type' => 'thumb' ) ) ?></a> 47 99 <h5><?php echo bp_core_get_userlink($friend_ids[$i]) ?></h5> 48 100 </li> 101 49 102 <?php } ?> 103 50 104 </ul> 105 51 106 <?php } else { ?> 107 52 108 <div id="message" class="info"> 53 109 <p><?php bp_word_or_name( __( "You haven't added any friend connections yet.", 'buddypress' ), __( "%s hasn't created any friend connections yet.", 'buddypress' ) ) ?></p> 54 110 </div> 111 55 112 <?php } ?> 56 113 <div class="clear"></div> … … 65 122 $user_ids = BP_Core_User::get_users( 'random', $total_members ); 66 123 wp_cache_set( 'friends_random_users', $user_ids, 'bp' ); 67 } 68 ?> 124 } ?> 125 69 126 <?php if ( $user_ids['users'] ) { ?> 127 70 128 <ul class="item-list" id="random-members-list"> 129 71 130 <?php for ( $i = 0; $i < count( $user_ids['users'] ); $i++ ) { ?> 131 72 132 <li> 73 133 <a href="<?php echo bp_core_get_user_domain( $user_ids['users'][$i]->user_id ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->user_id, 'type' => 'thumb' ) ) ?></a> 74 134 <h5><?php echo bp_core_get_userlink( $user_ids['users'][$i]->user_id ) ?></h5> 135 75 136 <?php if ( function_exists( 'xprofile_get_random_profile_data' ) ) { ?> 137 76 138 <?php $random_data = xprofile_get_random_profile_data( $user_ids['users'][$i]->user_id, true ); ?> 139 77 140 <div class="profile-data"> 78 141 <p class="field-name"><?php echo $random_data[0]->name ?></p> 142 79 143 <?php echo $random_data[0]->value ?> 144 80 145 </div> 146 81 147 <?php } ?> 82 148 83 149 <div class="action"> 150 84 151 <?php if ( function_exists( 'bp_add_friend_button' ) ) { ?> 152 85 153 <?php bp_add_friend_button( $user_ids['users'][$i]->user_id ) ?> 154 86 155 <?php } ?> 156 87 157 </div> 88 158 </li> 159 89 160 <?php } ?> 161 90 162 </ul> 163 91 164 <?php } else { ?> 165 92 166 <div id="message" class="info"> 93 167 <p><?php _e( "There aren't enough site members to show a random sample just yet.", 'buddypress' ) ?></p> 94 168 </div> 169 95 170 <?php } ?> 96 171 <?php … … 101 176 102 177 $action = $bp->displayed_user->domain . $bp->friends->slug . '/my-friends/search/'; 103 $label = __( 'Filter Friends', 'buddypress' ); 104 ?> 178 $label = __( 'Filter Friends', 'buddypress' ); ?> 179 105 180 <form action="<?php echo $action ?>" id="friend-search-form" method="post"> 106 181 … … 109 184 110 185 <?php wp_nonce_field( 'friends_search', '_wpnonce_friend_search' ) ?> 186 111 187 <input type="hidden" name="initiator" id="initiator" value="<?php echo esc_attr( $bp->displayed_user->id ) ?>" /> 112 188 113 189 </form> 190 114 191 <?php 115 192 } … … 346 423 return apply_filters( 'bp_friend_get_total_requests_count', count( BP_Friends_Friendship::get_friend_user_ids( $user_id, true ) ) ); 347 424 } 425 348 426 ?> -
trunk/bp-groups/bp-groups-template.php
r3830 r3841 5 5 * 6 6 * @package BuddyPress 7 * @subpackage ActivityTemplate7 * @subpackage Groups Template 8 8 * @since BuddyPress {unknown} 9 9 * … … 17 17 * 18 18 * @package BuddyPress 19 * @subpackage ActivityTemplate19 * @subpackage Groups Template 20 20 * @since BuddyPress {unknown} 21 21 */ … … 29 29 * 30 30 * @package BuddyPress 31 * @subpackage ActivityTemplate31 * @subpackage Groups Template 32 32 * @since BuddyPress {unknown} 33 33 * … … 41 41 * 42 42 * @package BuddyPress 43 * @subpackage ActivityTemplate43 * @subpackage Groups Template 44 44 * @since BuddyPress {unknown} 45 45 */
Note: See TracChangeset
for help on using the changeset viewer.