Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/15/2011 08:26:39 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Add preliminary password protected support to single forums and single topics, including theme compatibility.

File:
1 edited

Legend:

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

    r3130 r3160  
    2727                                <?php bbp_get_template_part( 'bbpress/nav', 'breadcrumb' ); ?>
    2828
    29                                 <?php bbp_single_forum_description(); ?>
     29                                <?php if ( post_password_required() ) : ?>
    3030
    31                                 <?php if ( bbp_get_forum_subforum_count() && bbp_has_forums() ) : ?>
     31                                    <?php bbp_get_template_part( 'bbpress/form', 'protected' ); ?>
    3232
    33                                     <?php bbp_get_template_part( 'bbpress/loop', 'forums' ); ?>
     33                                <?php else : ?>
    3434
    35                                 <?php endif; ?>
     35                                    <?php bbp_single_forum_description(); ?>
    3636
    37                                 <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
     37                                    <?php if ( bbp_get_forum_subforum_count() && bbp_has_forums() ) : ?>
    3838
    39                                     <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
     39                                        <?php bbp_get_template_part( 'bbpress/loop', 'forums' ); ?>
    4040
    41                                     <?php bbp_get_template_part( 'bbpress/loop',       'topics' ); ?>
     41                                    <?php endif; ?>
    4242
    43                                     <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
     43                                    <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    4444
    45                                     <?php bbp_get_template_part( 'bbpress/form',       'topic' ); ?>
     45                                        <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
    4646
    47                                 <?php elseif( !bbp_is_forum_category() ) : ?>
     47                                        <?php bbp_get_template_part( 'bbpress/loop',       'topics' ); ?>
    4848
    49                                     <?php bbp_get_template_part( 'bbpress/no',        'topics' ); ?>
     49                                        <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?>
    5050
    51                                     <?php bbp_get_template_part( 'bbpress/form',       'topic'  ); ?>
     51                                        <?php bbp_get_template_part( 'bbpress/form',       'topic'  ); ?>
     52
     53                                    <?php elseif( !bbp_is_forum_category() ) : ?>
     54
     55                                        <?php bbp_get_template_part( 'bbpress/no',         'topics' ); ?>
     56
     57                                        <?php bbp_get_template_part( 'bbpress/form',       'topic'  ); ?>
     58
     59                                    <?php endif; ?>
    5260
    5361                                <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.