Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/27/2011 07:37:50 AM (15 years ago)
Author:
johnjamesjacoby
Message:

More adjustments for theme compatability layer. Rejigs the bbp_load_template function to also have theme compatability. Introduces bbp_user_can_view_forum() function as a method to check the scope of a users ability to view private/hidden forums, topics, and replies.

File:
1 edited

Legend:

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

    r3032 r3057  
    1010?>
    1111
    12 <?php if ( bbp_is_forum_public( bbp_get_forum_id(), false ) || current_user_can( 'read_private_forums' ) ) : ?>
     12<?php if ( bbp_user_can_view_forum( array( 'forum_id' => bbp_get_topic_forum_id() ) ) ) : ?>
    1313
    1414    <?php bbp_single_forum_description(); ?>
     
    3636    <?php endif; ?>
    3737
    38 <?php else : ?>
     38<?php elseif ( bbp_is_forum_private( bbp_get_forum_id(), false ) ) : ?>
    3939
    40     <div id="forum-private" class="bbp-forum-info">
    41         <h1 class="entry-title"><?php _e( 'Private', 'bbpress' ); ?></h1>
    42         <div class="entry-content">
    43 
    44             <div class="bbp-template-notice info">
    45                 <p><?php _e( 'You do not have permission to view this forum.', 'bbpress' ); ?></p>
    46             </div>
    47 
    48         </div>
    49     </div><!-- #forum-private -->
     40    <?php bbp_get_template_part( 'bbpress/no', 'access'); ?>
    5041
    5142<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.