Changeset 2199
- Timestamp:
- 12/18/2009 10:36:02 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
bp-activity/bp-activity-templatetags.php (modified) (1 diff)
-
bp-blogs/bp-blogs-templatetags.php (modified) (4 diffs)
-
bp-core/bp-core-templatetags.php (modified) (1 diff)
-
bp-forums/bp-forums-templatetags.php (modified) (1 diff)
-
bp-groups/bp-groups-templatetags.php (modified) (2 diffs)
-
bp-messages/bp-messages-templatetags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-templatetags.php
r2198 r2199 173 173 $from_num = number_format( intval( ( $activities_template->pag_page - 1 ) * $activities_template->pag_num ) + 1 ); 174 174 $to_num = number_format( ( $from_num + ( $activities_template->pag_num - 1 ) > $activities_template->total_activity_count ) ? $activities_template->total_activity_count : $from_num + ( $activities_template->pag_num - 1 ) ); 175 176 echo sprintf( __( 'Viewing item %d to %d (of %d items)', 'buddypress' ), $from_num, $to_num, $activities_template->total_activity_count ); ?> 175 $total = number_format( $activities_template->total_activity_count ); 176 177 echo sprintf( __( 'Viewing item %s to %s (of %s items)', 'buddypress' ), $from_num, $to_num, $total ); ?> 177 178 <span class="ajax-loader"></span><?php 178 179 } -
trunk/bp-blogs/bp-blogs-templatetags.php
r2198 r2199 172 172 $from_num = number_format( intval( ( $blogs_template->pag_page - 1 ) * $blogs_template->pag_num ) + 1 ); 173 173 $to_num = number_format( ( $from_num + ( $blogs_template->pag_num - 1 ) > $blogs_template->total_blog_count ) ? $blogs_template->total_blog_count : $from_num + ( $blogs_template->pag_num - 1 ) ); 174 175 echo sprintf( __( 'Viewing blog %d to %d (of %d blogs)', 'buddypress' ), $from_num, $to_num, $blogs_template->total_blog_count ); ?> 174 $total = number_format( $blogs_template->total_blog_count ); 175 176 echo sprintf( __( 'Viewing blog %s to %s (of %s blogs)', 'buddypress' ), $from_num, $to_num, $total ); ?> 176 177 <span class="ajax-loader"></span><?php 177 178 } … … 284 285 return apply_filters( 'bp_get_total_blog_count', bp_blogs_total_blogs() ); 285 286 } 287 add_filter( 'bp_get_total_blog_count', 'number_format' ); 286 288 287 289 function bp_total_blog_count_for_user( $user_id = false ) { … … 291 293 return apply_filters( 'bp_get_total_blog_count_for_user', bp_blogs_total_blogs_for_user( $user_id ) ); 292 294 } 295 add_filter( 'bp_get_total_blog_count_for_user', 'number_format' ); 293 296 294 297 /*** … … 433 436 global $bp, $posts_template; 434 437 435 $from_num = intval( ( $posts_template->pag_page - 1 ) * $posts_template->pag_num ) + 1;436 $to_num = ( $from_num + ( $posts_template->pag_num - 1 ) > $posts_template->total_post_count ) ? $posts_template->total_post_count : $from_num + ( $posts_template->pag_num - 1 );437 438 echo sprintf( __( 'Viewing post % d to %d (of %dposts)', 'buddypress' ), $from_num, $to_num, $posts_template->total_post_count ); ?> 438 $from_num = number_format( intval( ( $posts_template->pag_page - 1 ) * $posts_template->pag_num ) + 1 ); 439 $to_num = number_format( ( $from_num + ( $posts_template->pag_num - 1 ) > $posts_template->total_post_count ) ? $posts_template->total_post_count : $from_num + ( $posts_template->pag_num - 1 ) ); 440 441 echo sprintf( __( 'Viewing post %s to %s (of %s posts)', 'buddypress' ), $from_num, $to_num, $posts_template->total_post_count ); ?> 439 442 <span class="ajax-loader"></span><?php 440 443 } -
trunk/bp-core/bp-core-templatetags.php
r2198 r2199 164 164 $from_num = number_format( intval( ( $members_template->pag_page - 1 ) * $members_template->pag_num ) + 1 ); 165 165 $to_num = number_format( ( $from_num + ( $members_template->pag_num - 1 ) > $members_template->total_member_count ) ? $members_template->total_member_count : $from_num + ( $members_template->pag_num - 1) ); 166 $total = number_format( $members_template->total_member_count ); 166 167 167 168 if ( 'active' == $members_template->type ) 168 echo sprintf( __( 'Viewing member % d to %d (of %d active members)', 'buddypress' ), $from_num, $to_num, $members_template->total_member_count);169 echo sprintf( __( 'Viewing member %s to %s (of %s active members)', 'buddypress' ), $from_num, $to_num, $total ); 169 170 else if ( 'popular' == $members_template->type ) 170 echo sprintf( __( 'Viewing member % d to %d (of %d members with friends)', 'buddypress' ), $from_num, $to_num, $members_template->total_member_count);171 echo sprintf( __( 'Viewing member %s to %s (of %s members with friends)', 'buddypress' ), $from_num, $to_num, $total ); 171 172 else if ( 'online' == $members_template->type ) 172 echo sprintf( __( 'Viewing member % d to %d (of %d members online)', 'buddypress' ), $from_num, $to_num, $members_template->total_member_count);173 echo sprintf( __( 'Viewing member %s to %s (of %s members online)', 'buddypress' ), $from_num, $to_num, $total ); 173 174 else 174 echo sprintf( __( 'Viewing member % d to %d (of %d members)', 'buddypress' ), $from_num, $to_num, $members_template->total_member_count);175 echo sprintf( __( 'Viewing member %s to %s (of %s members)', 'buddypress' ), $from_num, $to_num, $total ); 175 176 176 177 ?><span class="ajax-loader"></span><?php -
trunk/bp-forums/bp-forums-templatetags.php
r2198 r2199 644 644 $from_num = number_format( intval( ( $forum_template->pag_page - 1 ) * $forum_template->pag_num ) + 1 ); 645 645 $to_num = number_format( ( $from_num + ( $forum_template->pag_num - 1 ) > $forum_template->total_topic_count ) ? $forum_template->total_topic_count : $from_num + ( $forum_template->pag_num - 1 ) ); 646 647 echo apply_filters( 'bp_forum_pagination_count', sprintf( __( 'Viewing topic %d to %d (%d total topics)', 'buddypress' ), $from_num, $to_num, $forum_template->total_topic_count ) ); 646 $total = number_format( $forum_template->total_topic_count ); 647 648 echo apply_filters( 'bp_forum_pagination_count', sprintf( __( 'Viewing topic %s to %s (%s total topics)', 'buddypress' ), $from_num, $to_num, $total ) ); 648 649 ?> 649 650 <span class="ajax-loader"></span> -
trunk/bp-groups/bp-groups-templatetags.php
r2198 r2199 678 678 $from_num = number_format( intval( ( $groups_template->pag_page - 1 ) * $groups_template->pag_num ) + 1 ); 679 679 $to_num = number_format( ( $from_num + ( $groups_template->pag_num - 1 ) > $groups_template->total_group_count ) ? $groups_template->total_group_count : $from_num + ( $groups_template->pag_num - 1 ) ); 680 681 echo sprintf( __( 'Viewing group %d to %d (of %d groups)', 'buddypress' ), $from_num, $to_num, $groups_template->total_group_count ); ?> 680 $total = number_format( $groups_template->total_group_count ); 681 682 echo sprintf( __( 'Viewing group %s to %s (of %s groups)', 'buddypress' ), $from_num, $to_num, $total ); ?> 682 683 <span class="ajax-loader"></span><?php 683 684 } … … 1450 1451 global $members_template; 1451 1452 1452 $from_num = intval( ( $members_template->pag_page - 1 ) * $members_template->pag_num ) + 1; 1453 $to_num = ( $from_num + ( $members_template->pag_num - 1 ) > $members_template->total_member_count ) ? $members_template->total_member_count : $from_num + ( $members_template->pag_num - 1 ); 1454 1455 return apply_filters( 'bp_get_group_member_pagination_count', sprintf( __( 'Viewing members %d to %d (of %d members)', 'buddypress' ), $from_num, $to_num, $members_template->total_member_count ) ); 1453 $from_num = number_format( intval( ( $members_template->pag_page - 1 ) * $members_template->pag_num ) + 1 ); 1454 $to_num = number_format( ( $from_num + ( $members_template->pag_num - 1 ) > $members_template->total_member_count ) ? $members_template->total_member_count : $from_num + ( $members_template->pag_num - 1 ) ); 1455 $total = number_format( $members_template->total_member_count ); 1456 1457 return apply_filters( 'bp_get_group_member_pagination_count', sprintf( __( 'Viewing members %s to %s (of %s members)', 'buddypress' ), $from_num, $to_num, $total ) ); 1456 1458 } 1457 1459 -
trunk/bp-messages/bp-messages-templatetags.php
r2198 r2199 276 276 $from_num = number_format( intval( ( $messages_template->pag_page - 1 ) * $messages_template->pag_num ) + 1 ); 277 277 $to_num = number_format( ( $from_num + ( $messages_template->pag_num - 1 ) > $messages_template->total_thread_count ) ? $messages_template->total_thread_count : $from_num + ( $messages_template->pag_num - 1 ) ); 278 279 echo sprintf( __( 'Viewing message %d to %d (of %d messages)', 'buddypress' ), $from_num, $to_num, $messages_template->total_thread_count ); ?> 278 $total = number_format( $messages_template->total_thread_count ); 279 280 echo sprintf( __( 'Viewing message %s to %s (of %s messages)', 'buddypress' ), $from_num, $to_num, $total ); ?> 280 281 <span class="ajax-loader"></span><?php 281 282 }
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)