Advertisement
Guest User

parse-error

a guest
Aug 15th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. <?php // Do not delete these lines
  2. if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  3. die ('Please do not load this page directly. Thanks!');
  4.  
  5. if (!empty($post->post_password)) { // if there's a password
  6. if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
  7. ?>
  8.  
  9. <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
  10.  
  11. <?php
  12. return;
  13. }
  14. }
  15.  
  16. /* This variable is for alternating comment background */
  17. $oddcomment = 'class="alt" ';
  18. ?>
  19.  
  20. <!-- You can start editing here. -->
  21.  
  22. <?php if ($comments) : ?>
  23.  
  24. <?php endif; ?>
  25.  
  26.  
  27. <div class="clear"></div>
  28. </div>
  29. <?php if ($comment->comment_approved == '0') : ?>
  30. <em>Your comment is awaiting moderation.</em>
  31. <?php endif; ?>
  32.  
  33.  
  34. <div class="comment-data"><small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?></small></div>
  35.  
  36. <div class="comment-text"><?php comment_text() ?></div>
  37.  
  38. </li>
  39.  
  40. <?php
  41. /* Changes every other comment to a different class */
  42. $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
  43. ?>
  44.  
  45. /* <?php endforeach /* end for each comment */ ?> */
  46.  
  47. </ol>
  48.  
  49. <?php else : // this is displayed if there are no comments so far ?>
  50.  
  51. <?php if ('open' == $post->comment_status) : ?>
  52. <!-- If comments are open, but there are no comments. -->
  53.  
  54. <?php else : // comments are closed ?>
  55. <!-- If comments are closed. -->
  56. <p class="nocomments">Comments are closed.</p>
  57.  
  58. <?php endif; ?>
  59. <?php endif; ?>
  60.  
  61.  
  62. <?php if ('open' == $post->comment_status) : ?>
  63.  
  64. <h3 id="respond">Leave a Reply</h3>
  65.  
  66. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  67. <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>
  68. <?php else : ?>
  69.  
  70. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  71.  
  72. <?php if ( $user_ID ) : ?>
  73.  
  74. <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>
  75.  
  76. <?php else : ?>
  77. <p><div class="comments-label"><label for="author"><small>Your Name: <?php if ($req) echo ""; ?></small></label></div>
  78. <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
  79. </p>
  80.  
  81. <p><div class="comments-label"><label for="email"><small>E-Mail:<?php if ($req) echo ""; ?></small></label></div>
  82. <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
  83. </p>
  84.  
  85. <p><div class="comments-label"><label for="url"><small>Website:</small></label></div>
  86. <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
  87. </p>
  88.  
  89. <?php endif; ?>
  90.  
  91. <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
  92.  
  93. <p><div class="comments-label comments"><label for="comment"><small>Comments:</small></label></div>
  94. <textarea name="comment" rows="10" id="comment" tabindex="4"></textarea>
  95. </p>
  96.  
  97. <p><div class="comments-label" style="border:none;">&nbsp;</div><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
  98. <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  99. </p>
  100. <?php do_action('comment_form', $post->ID); ?>
  101.  
  102. </form>
  103.  
  104. <?php endif; // If registration required and not logged in ?>
  105.  
  106. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement