Skip to:
Content

BuddyPress.org

Ticket #3249: #3249-add-replies-to-comments-closed-for-comments.patch

File #3249-add-replies-to-comments-closed-for-comments.patch, 2.1 KB (added by hnla, 15 years ago)

Add 'Replies to comments closed' for comments to posts when general comments 'Off'

  • bp-themes/bp-default/functions.php

     
    433433
    434434                <div class="comment-content">
    435435                        <div class="comment-meta">
    436                                 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"><?php echo get_comment_author() ?></a> <?php echo _n( 'said:', 'replied:', $depth, 'buddypress' ) ?></a>
    437                                 <span class="time-since">&nbsp; <?php comment_date() ?></span>
     436                                <p>
     437                                        <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"><?php echo get_comment_author() ?></a> <?php echo _n( 'said:', 'replied:', $depth, 'buddypress' ) ?>
     438                                        <span class="time-since">&nbsp; <?php comment_date() ?></span>
    438439
    439                                 <?php if ( 1 == $depth ) : ?>
    440                                         &middot; <a href="#comment-<?php comment_ID() ?>"><?php _e( 'View', 'buddypress' ) ?></a>
    441                                 <?php else: ?>
    442                                         &middot; <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply', 'buddypress' ) ) ) ?>
    443                                 <?php endif; ?>
     440                                        <?php if ( 1 == $depth ) : ?>
     441                                                &middot; <a href="#comment-<?php comment_ID() ?>"><?php _e( 'View', 'buddypress' ) ?></a>
     442                                        <?php else: ?>
     443                                        <?php if( comments_open() ){ ?> &middot; <?php } ?><?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply', 'buddypress' ) ) ) ?>
     444                                        <?php endif; ?>
    444445
    445                                 <?php edit_comment_link( __( 'Edit', 'buddypress' ), '&middot; ', '' ) ?>
     446                                        <?php edit_comment_link( __( 'Edit', 'buddypress' ), '&middot; ', '' ) ?>
     447                                </p>
    446448                        </div>
    447449
    448450                        <?php if ( $comment->comment_approved == '0' ) : ?>
     
    453455
    454456                        <?php if ( 1 == $depth ) : ?>
    455457                                <div class="comment-options">
     458                               
     459                                <?php if( comments_open() ) : ?>
    456460                                        <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?>
     461                                <?php else: ?> 
     462                                        <p><?php _e('Replies to comments are closed', 'buddypress'); ?></p>     
     463                                <?php endif; ?>
     464                               
    457465                                </div>
    458466                        <?php endif; ?>
    459467                </div>