whyisjake

Jake Spurlock

May 3rd, 2010
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.40 KB | None | 0 0
  1. <div id="comments-wrapper">
  2. <?php if(have_comments()): ?>
  3.    
  4.     <?php if ( 'open' == $post->comment_status ) { ?>
  5.    
  6.     <div id="comments">
  7.         <h2>Comments</h2>
  8.         <?php
  9.         wp_list_comments(array(
  10.             'avatar_size'=>128,
  11.             'style'=> 'div',
  12.             'callback'=>'uds_comment_shorter'
  13.         ));
  14.         ?>
  15.     </div>
  16.     <div>
  17.         <div class="align-left"><?php previous_comments_link() ?></div>
  18.         <div class="align-right"><?php next_comments_link() ?></div>
  19.     </div>
  20.     <div class="clear"></div>
  21.    
  22.     <?php } ?>
  23.    
  24. <?php else: ?> 
  25.     <?php if(comments_open()): ?>
  26.         <p class="comment-info">There are no comments yet</p>
  27.     <?php else: ?>
  28.         <!-- <p class="comment-info">Comments are closed</p> -->
  29.     <?php endif; ?>
  30. <?php endif; //have comments?>     
  31.     <hr class="comment-divider" />
  32. <?php if(comments_open()): ?>
  33.     <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
  34.         <p>
  35.             <a href="<?php echo wp_login_url( get_permalink() ); ?>">Log in</a> <?php wp_register(' or ', '');?> to post a comment.
  36.         </p>
  37.     <?php else : ?>
  38.         <?php if ( is_user_logged_in() ) : ?>
  39.             <p>Logged in as
  40.                 <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>.
  41.                 <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a>
  42.             </p>
  43.         <?php endif; ?>
  44.         <div id="respond">
  45.             <h3><?php comment_form_title('Leave a comment', 'Reply to %s') ?></h3>
  46.             <form method="post" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" id="add-comment">
  47.                 <fieldset>
  48.                     <?php comment_id_fields(); ?>
  49.                     <div>
  50.                         <label>Your name:</label>
  51.                         <input type="text" class="input-text" name="author" />
  52.                     </div>
  53.                     <div>
  54.                         <label>Your email:</label>
  55.                         <input type="text" class="input-text" name="email" />
  56.                     </div>
  57.                     <div>
  58.                         <label>Comment:</label>
  59.                         <textarea rows="3" cols="54" name="comment" class="comment-text" id="comment"></textarea>
  60.                     </div>
  61.                     <div class="buttons">
  62.                         <button type="reset">Reset</button>
  63.                         <button type="submit">Submit</button>
  64.                         <div class="cancel-comment-reply">
  65.                         <small><?php cancel_comment_reply_link(); ?></small>
  66.                         </div>
  67.                     </div>
  68.                 </fieldset>
  69.             </form>
  70.            
  71.         </div>
  72.     <?php endif; // If registration required and not logged in ?>
  73. <?php endif; ?>
  74. </div>
  75. <div class="clear"></div>
Add Comment
Please, Sign In to add comment