Don't like ads? PRO users don't see any ads ;-)
Guest

eddy180 comments.php

By: a guest on Jun 9th, 2010  |  syntax: PHP  |  size: 3.60 KB  |  hits: 255  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php // Do not delete these lines
  2. if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!');
  3. if (!empty($post->post_password)) { // if there's a password
  4.         if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
  5. ?>
  6.  
  7. <h2><?php _e('Password Protected'); ?></h2>
  8. <p><?php _e('Enter the password to view comments.'); ?></p>
  9.  
  10. <?php return;
  11.         }
  12. }
  13.  
  14.         /* This variable is for alternating comment background */
  15.  
  16. $oddcomment = 'alt';
  17.  
  18. ?>
  19.  
  20. <!-- You can start editing here. -->
  21.  
  22. <?php if ($comments) : ?>
  23.  
  24. <ol class="commentlist">
  25. <?php foreach ($comments as $comment) : ?>
  26.  
  27.         <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
  28.  
  29. <div class="commentmetadata">
  30. <strong>Afzender:</strong> <?php comment_author_link() ?> - <?php _e('op'); ?> <?php comment_date('l j F Y') ?> <?php _e('om');?> <?php comment_time() ?>  <?php edit_comment_link('Edit Comment','',''); ?>
  31.                 <?php if ($comment->comment_approved == '0') : ?>
  32.                 <em><?php _e('Uw bericht is in afwachting op goedkeuring.'); ?></em>
  33.                 <?php endif; ?>
  34. </div>
  35.  
  36. <?php comment_text() ?>
  37.         </li>
  38.  
  39. <?php /* Changes every other comment to a different class */
  40.         if ('alt' == $oddcomment) $oddcomment = '';
  41.         else $oddcomment = 'alt';
  42. ?>
  43.  
  44. <?php endforeach; /* end for each comment */ ?>
  45.         </ol>
  46.  
  47. <?php else : // this is displayed if there are no comments so far ?>
  48.  
  49. <?php if ('open' == $post->comment_status) : ?>
  50.         <!-- If comments are open, but there are no comments. -->
  51.         <?php else : // comments are closed ?>
  52.  
  53.         <!-- If comments are closed. -->
  54.  
  55.         <?php endif; ?>
  56. <?php endif; ?>
  57.  
  58.  
  59. <?php if ('open' == $post->comment_status) : ?>
  60.  
  61.                 <h3 id="respond">Neem even de tijd om het gastenboek te tekenen.</h3>
  62.  
  63. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  64. <p>Je moet <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">inloggen</a> om een bericht achter te laten.</p>
  65.  
  66. <?php else : ?>
  67.  
  68. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  69. <?php if ( $user_ID ) : ?>
  70.  
  71. <p>Ingelogged als <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">Log-uit &raquo;</a></p>
  72.  
  73. <?php else : ?>
  74.  
  75. <p><input type="text" name="author" id="author" value="Naam" onfocus="value=''" size="40" tabindex="1" />
  76. <label for="author"><small>Naam <?php if ($req) echo "(verplicht)"; ?></small></label></p>
  77.  
  78. <p><input type="text" name="email" id="email" value="E-mail" onfocus="value=''" size="40" tabindex="2" />
  79. <label for="email"><small>Mail (wordt niet bekend gemaakt) <?php if ($req) echo "(verplicht)"; ?></small></label></p>
  80.  
  81. <p><input type="text" name="url" id="url" value="Website" onfocus="value=''" size="40" tabindex="3" />
  82. <label for="url"><small>Website</small></label></p>
  83.  
  84. <?php endif; ?>
  85.  
  86. <!--<p><small><strong>XHTML:</strong> <?php _e('Je kan deze tags gebruiken&#58;'); ?> <?php echo allowed_tags(); ?></small></p>-->
  87.  
  88. <p><textarea name="comment" id="comment" cols="60" rows="10" tabindex="4"></textarea></p>
  89.  
  90. <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
  91. <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  92. </p>
  93.  
  94. <?php do_action('comment_form', $post->ID); ?>
  95.  
  96. </form>
  97.  
  98. <?php endif; // If registration required and not logged in ?>
  99.  
  100. <?php endif; // if you delete this the sky will fall on your head ?>