Advertisement
Guest User

Untitled

a guest
Aug 16th, 2010
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.51 KB | None | 0 0
  1. <?$i;?>
  2. <?php // Do not delete these lines
  3.     if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  4.         die ('Please do not load this page directly. Thanks!');
  5.  
  6.     if ( post_password_required() ) { ?>
  7.         <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
  8.     <?php
  9.         return;
  10.     }
  11. ?>
  12.  
  13. <!-- You can start editing here. -->
  14. <div id="comment-divider"></div>
  15.  
  16. <?php if ( have_comments() ) : ?>
  17.     <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to <span style="color: #444444;"><?php the_title(); ?></span></h3>
  18.  
  19.      <ol class="comments">
  20.       <?php foreach ($comments as $comment) : ?>
  21.       <!-- COMMENTS ADMIN UNIQUE STYLE -->
  22.       <?php
  23.       $isByAuthor = false;
  24.       if($comment->comment_author_email == get_the_author_email()) {
  25.       $isByAuthor = true;
  26.       }
  27.       ?>
  28.       <span style="clear: both; float: right; display: block; padding: 1%;"><?php delete_comment_link(get_comment_ID());?></span>
  29.           <li class="<?=($i%2)?"color1":"color2";$i++;?> ">
  30.           <?php echo get_avatar(get_comment_author_email(), 90); ?>
  31.               <div class="main_comment">
  32.               <?php if($isByAuthor ) { echo '<div style="background-image: url('.get_bloginfo('template_directory').'/img/comment-admin.png) !important;"></div>';} ?>
  33.               <?php comment_text() ?>
  34.               <h4>Comment by <a href="<?php the_author_link(); ?>"><?php the_author(); ?></a> on <?php echo comment_date(); ?> at <?php comment_date('g:i a'); ?></h4>
  35.               <span class="arrow"></span>
  36.               </div><!-- end main_comment-->
  37.           </li>
  38.       <?php endforeach; ?>
  39.      </ol>
  40.  
  41.     <div class="navigation">
  42.         <div class="alignleft"><?php previous_comments_link() ?></div>
  43.         <div class="alignright"><?php next_comments_link() ?></div>
  44.     </div>
  45.     <?php comment_reply_link( $args, $comment, $post ) ?>
  46.  <?php else : // this is displayed if there are no comments so far ?>
  47.  
  48.     <?php if ('open' == $post->comment_status) : ?>
  49.         <!-- If comments are open, but there are no comments. -->
  50.  
  51.      <?php else : // comments are closed ?>
  52.         <!-- If comments are closed. -->
  53.         <p class="nocomments">Comments are closed.</p>
  54.  
  55.     <?php endif; ?>
  56. <?php endif; ?> <!-- end if have comments -->
  57.  
  58.  
  59. <?php if ('open' == $post->comment_status) : ?>
  60.  
  61. <div id="respond">
  62.  
  63. <h3 id="comments"><?php comment_form_title( 'Say something!', 'Leave a Reply to %s' ); ?></h3>
  64.  
  65. <div class="cancel-comment-reply">
  66.     <small><?php cancel_comment_reply_link(); ?></small>
  67. </div>
  68.  
  69. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  70. <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
  71. <?php else : ?>
  72.  
  73. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  74.  
  75. <?php if ( $user_ID ) : ?>
  76.  
  77. <p class="user_submit"><a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
  78.  
  79. <?php else : ?>
  80. <div class="comments_form">
  81. <p class="form"><input type="text" name="author" id="author" class="required" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
  82. <label for="author"><small>Name <?php if ($req) echo "*"; ?></small></label></p>
  83. <p class="form"><input type="text" name="email" id="email" class="required email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
  84. <label for="email"><small>Mail (will not be published) <?php if ($req) echo "*"; ?></small></label></p>
  85. <p class="form"><input type="text" name="url" id="url" class="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
  86. <label for="url"><small>Website</small></label></p>
  87. </div>
  88. <?php endif; ?>
  89.  
  90. <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
  91.  
  92. <p><textarea name="comment" id="comment" cols="60" rows="4" tabindex="4"></textarea></p>
  93.  
  94. <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit" />
  95. <?php comment_id_fields(); ?>
  96.  
  97. </p>
  98. <?php do_action('comment_form', $post->ID); ?>
  99.  
  100. </form>
  101.  
  102. <?php endif; // If registration required and not logged in ?>
  103. </div>
  104.  
  105. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement