Guest User

SplashTOMATO comments.php for Spam Free Wordpress

a guest
Dec 8th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php // Do not delete these lines
  2.  
  3. if (!empty($_SERVER['SCRIPT_FILENAME']) AND 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  4.     die (__('Please do not load this page directly. Thanks!','atahualpa'));
  5.  
  6. if ( post_password_required() ) {
  7.     _e('This post is password protected. Enter the password to view comments.','atahualpa');
  8.     return;
  9. }
  10.  
  11. global $bfa_ata;
  12. // You can start editing below:
  13. ?>
  14.  
  15. <?php // If there are any comments
  16. $bfa_page_comment_open = 0;  
  17. if ( is_page() and ('open' == $post->comment_status)) {
  18.      $bfa_page_comment_open = 1; }
  19. else {
  20.     $bfa_page_comment_open = 0;}
  21.  
  22. if ( have_comments() ) : ?>
  23.  
  24.     <a name="comments"></a><!-- named anchor for skip links -->
  25.     <h3 id="comments"><?php // Comment Area Title
  26.     comments_number(__('No comments yet to ', 'atahualpa'),
  27.     __('1 comment to ', 'atahualpa'), __('% comments to ', 'atahualpa'));
  28.     echo get_the_title(); ?></h3>
  29.  
  30.     <?php bfa_next_previous_comments_links('Above'); ?>
  31.  
  32.     <!-- Comment List -->
  33.     <ul class="commentlist">
  34.        
  35.     <?php // Do this for every comment
  36.     if ($bfa_ata['separate_trackbacks'] == "Yes") {
  37.  
  38.         wp_list_comments(array(
  39.             'avatar_size'=>$bfa_ata['avatar_size'],
  40.             'reply_text'=>__(' &middot; Reply','atahualpa'),
  41.             'login_text'=>__('Log in to Reply','atahualpa'),
  42.             'callback' => bfa_comments,
  43.             'type' => 'comment'
  44.             ));
  45.  
  46.         wp_list_comments(array(
  47.             'avatar_size'=>$bfa_ata['avatar_size'],
  48.             'reply_text'=>__(' &middot; Reply','atahualpa'),
  49.             'login_text'=>__('Log in to Reply','atahualpa'),
  50.             'callback' => bfa_comments,
  51.             'type' => 'pings'
  52.             ));
  53.  
  54.     } else {
  55.  
  56.         wp_list_comments(array(
  57.             'avatar_size'=>$bfa_ata['avatar_size'],
  58.             'reply_text'=>__(' &middot; Reply','atahualpa'),
  59.             'login_text'=>__('Log in to Reply','atahualpa'),
  60.             'callback' => bfa_comments,
  61.             'type' => 'all'
  62.             ));
  63.  
  64.     } ?>
  65.    
  66.     </ul>
  67.     <!-- / Comment List -->
  68.  
  69.     <?php bfa_next_previous_comments_links('Below'); ?>
  70.  
  71. <?php else : // If there are NO comments  ?>
  72.  
  73.     <?php // If comments are open, but there are no comments:
  74. if ( ('open' == $post->comment_status) ) : ?>
  75.         <!-- .... -->
  76.  
  77.     <?php else : // If comments are closed: ?>
  78.  
  79.         <?php echo $bfa_ata['comments_are_closed_text']; ?>
  80.  
  81.     <?php endif; ?>
  82.  
  83. <?php endif; // END of "If there are NO comments" ?>
  84.  
  85.  
  86. <?php // If comments are open
  87. if ( ('open' == $post->comment_status)
  88. OR ( is_page() and ($bfa_page_comment_open)) ) : ?>
  89.  
  90. <?php comment_form(); ?>
  91.    
  92. <?php // End of: If comments are open
  93. endif; ?>
  94.  
Add Comment
Please, Sign In to add comment