Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/18/2009 10:20:35 AM (16 years ago)
Author:
apeatling
Message:

Applying number formatting to pagination and tabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-templatetags.php

    r2194 r2198  
    642642    global $bp, $forum_template;
    643643
    644     $from_num = intval( ( $forum_template->pag_page - 1 ) * $forum_template->pag_num ) + 1;
    645     $to_num = ( $from_num + ( $forum_template->pag_num - 1  ) > $forum_template->total_topic_count ) ? $forum_template->total_topic_count : $from_num + ( $forum_template->pag_num - 1 );
     644    $from_num = number_format( intval( ( $forum_template->pag_page - 1 ) * $forum_template->pag_num ) + 1 );
     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 ) );
    646646
    647647    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 ) );
     
    10031003    }
    10041004
     1005function bp_forum_topic_count_for_user( $user_id = false ) {
     1006    echo bp_get_forum_topic_count_for_user( $user_id );
     1007}
     1008    function bp_get_forum_topic_count_for_user( $user_id = false ) {
     1009        return apply_filters( 'bp_get_forum_topic_count_for_user', bp_forums_total_topic_count_for_user( $user_id ) );
     1010    }
     1011
     1012function bp_forum_topic_count( $user_id = false ) {
     1013    echo bp_get_forum_topic_count( $user_id );
     1014}
     1015    function bp_get_forum_topic_count( $user_id = false ) {
     1016        return apply_filters( 'bp_get_forum_topic_count', bp_forums_total_topic_count( $user_id ) );
     1017    }
    10051018?>
Note: See TracChangeset for help on using the changeset viewer.