Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/28/2011 07:37:22 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Audit the bbp-twentyten theme's actions, HTML, and CSS. See #1702.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-themes/bbp-twentyten/page-forum-statistics.php

    r3349 r3651  
    2929                            <?php get_the_content() ? the_content() : _e( '<p>Here are the statistics and popular topics of our forums.</p>', 'bbpress' ); ?>
    3030
    31                             <dl role="main">
     31                            <div id="bbpress-forums">
    3232
    33                                 <?php do_action( 'bbp_before_statistics' ); ?>
     33                                <dl role="main">
    3434
    35                                 <dt><?php _e( 'Registered Users', 'bbpress' ); ?></dt>
    36                                 <dd>
    37                                     <strong><?php echo $user_count; ?></strong>
    38                                 </dd>
     35                                    <?php do_action( 'bbp_before_statistics' ); ?>
    3936
    40                                 <dt><?php _e( 'Forums', 'bbpress' ); ?></dt>
    41                                 <dd>
    42                                     <strong><?php echo $forum_count; ?></strong>
    43                                 </dd>
     37                                    <dt><?php _e( 'Registered Users', 'bbpress' ); ?></dt>
     38                                    <dd>
     39                                        <strong><?php echo $user_count; ?></strong>
     40                                    </dd>
    4441
    45                                 <dt><?php _e( 'Topics', 'bbpress' ); ?></dt>
    46                                 <dd>
    47                                     <strong><?php echo $topic_count; ?></strong>
    48                                 </dd>
     42                                    <dt><?php _e( 'Forums', 'bbpress' ); ?></dt>
     43                                    <dd>
     44                                        <strong><?php echo $forum_count; ?></strong>
     45                                    </dd>
    4946
    50                                 <dt><?php _e( 'Replies', 'bbpress' ); ?></dt>
    51                                 <dd>
    52                                     <strong><?php echo $reply_count; ?></strong>
    53                                 </dd>
     47                                    <dt><?php _e( 'Topics', 'bbpress' ); ?></dt>
     48                                    <dd>
     49                                        <strong><?php echo $topic_count; ?></strong>
     50                                    </dd>
    5451
    55                                 <dt><?php _e( 'Topic Tags', 'bbpress' ); ?></dt>
    56                                 <dd>
    57                                     <strong><?php echo $topic_tag_count; ?></strong>
    58                                 </dd>
     52                                    <dt><?php _e( 'Replies', 'bbpress' ); ?></dt>
     53                                    <dd>
     54                                        <strong><?php echo $reply_count; ?></strong>
     55                                    </dd>
    5956
    60                                 <?php if ( !empty( $empty_topic_tag_count ) ) : ?>
     57                                    <dt><?php _e( 'Topic Tags', 'bbpress' ); ?></dt>
     58                                    <dd>
     59                                        <strong><?php echo $topic_tag_count; ?></strong>
     60                                    </dd>
    6161
    62                                     <dt><?php _e( 'Empty Topic Tags', 'bbpress' ); ?></dt>
    63                                     <dd>
    64                                         <strong><?php echo $empty_topic_tag_count; ?></strong>
    65                                     </dd>
     62                                    <?php if ( !empty( $empty_topic_tag_count ) ) : ?>
     63
     64                                        <dt><?php _e( 'Empty Topic Tags', 'bbpress' ); ?></dt>
     65                                        <dd>
     66                                            <strong><?php echo $empty_topic_tag_count; ?></strong>
     67                                        </dd>
     68
     69                                    <?php endif; ?>
     70
     71                                    <?php if ( !empty( $topic_count_hidden ) ) : ?>
     72
     73                                        <dt><?php _e( 'Hidden Topics', 'bbpress' ); ?></dt>
     74                                        <dd>
     75                                            <strong>
     76                                                <abbr title="<?php echo esc_attr( $hidden_topic_title ); ?>"><?php echo $topic_count_hidden; ?></abbr>
     77                                            </strong>
     78                                        </dd>
     79
     80                                    <?php endif; ?>
     81
     82                                    <?php if ( !empty( $reply_count_hidden ) ) : ?>
     83
     84                                        <dt><?php _e( 'Hidden Replies', 'bbpress' ); ?></dt>
     85                                        <dd>
     86                                            <strong>
     87                                                <abbr title="<?php echo esc_attr( $hidden_reply_title ); ?>"><?php echo $reply_count_hidden; ?></abbr>
     88                                            </strong>
     89                                        </dd>
     90
     91                                    <?php endif; ?>
     92
     93                                    <?php do_action( 'bbp_after_statistics' ); ?>
     94
     95                                </dl>
     96
     97                                <?php do_action( 'bbp_before_popular_topics' ); ?>
     98
     99                                <?php bbp_set_query_name( 'bbp_popular_topics' ); ?>
     100
     101                                <?php if ( bbp_has_topics( array( 'meta_key' => '_bbp_reply_count', 'posts_per_page' => 15, 'max_num_pages' => 1, 'orderby' => 'meta_value_num', 'show_stickies' => false ) ) ) : ?>
     102
     103                                    <h2 class="entry-title"><?php _e( 'Popular Topics', 'bbpress' ); ?></h2>
     104
     105                                    <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
     106
     107                                    <?php bbp_get_template_part( 'bbpress/loop',       'topics' ); ?>
     108
     109                                    <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
    66110
    67111                                <?php endif; ?>
    68112
    69                                 <?php if ( !empty( $topic_count_hidden ) ) : ?>
     113                                <?php bbp_reset_query_name(); ?>
    70114
    71                                     <dt><?php _e( 'Hidden Topics', 'bbpress' ); ?></dt>
    72                                     <dd>
    73                                         <strong>
    74                                             <abbr title="<?php echo esc_attr( $hidden_topic_title ); ?>"><?php echo $topic_count_hidden; ?></abbr>
    75                                         </strong>
    76                                     </dd>
     115                                <?php do_action( 'bbp_after_popular_topics' ); ?>
    77116
    78                                 <?php endif; ?>
    79 
    80                                 <?php if ( !empty( $reply_count_hidden ) ) : ?>
    81 
    82                                     <dt><?php _e( 'Hidden Replies', 'bbpress' ); ?></dt>
    83                                     <dd>
    84                                         <strong>
    85                                             <abbr title="<?php echo esc_attr( $hidden_reply_title ); ?>"><?php echo $reply_count_hidden; ?></abbr>
    86                                         </strong>
    87                                     </dd>
    88 
    89                                 <?php endif; ?>
    90 
    91                                 <?php do_action( 'bbp_after_statistics' ); ?>
    92 
    93                             </dl>
    94 
    95                             <?php do_action( 'bbp_before_popular_topics' ); ?>
    96 
    97                             <?php bbp_set_query_name( 'bbp_popular_topics' ); ?>
    98 
    99                             <?php if ( bbp_has_topics( array( 'meta_key' => '_bbp_reply_count', 'posts_per_page' => 15, 'max_num_pages' => 1, 'orderby' => 'meta_value_num', 'show_stickies' => false ) ) ) : ?>
    100 
    101                                 <h2 class="entry-title"><?php _e( 'Popular Topics', 'bbpress' ); ?></h2>
    102 
    103                                 <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
    104 
    105                                 <?php bbp_get_template_part( 'bbpress/loop',       'topics' ); ?>
    106 
    107                                 <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
    108 
    109                             <?php endif; ?>
    110 
    111                             <?php bbp_reset_query_name(); ?>
    112 
    113                             <?php do_action( 'bbp_after_popular_topics' ); ?>
    114 
     117                            </div>
    115118                        </div>
    116119                    </div><!-- #bbp-statistics -->
Note: See TracChangeset for help on using the changeset viewer.