Advertisement
Guest User

Comments

a guest
Sep 25th, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.19 KB | None | 0 0
  1. <div id="comments">
  2.  
  3. <?php // Do not delete these lines
  4.     if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  5.         die ('Please do not load this page directly. Thanks!');
  6.  
  7.     if (!empty($post->post_password)) { // if there's a password
  8.         if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
  9.             ?>
  10.  
  11.             <p>Dieser Beitrag ist Passwort geschützt. Bitte das Passwort eingeben um den Kommentarbereich anzusehen.</p>
  12.  
  13.             <?php
  14.             return;
  15.         }
  16.     }
  17.  
  18.     /* This variable is for alternating comment background */
  19.     $oddcomment = 'class="alt clearfix" ';
  20. ?>
  21.  
  22. <!-- You can start editing here. -->
  23.  
  24. <?php if ($comments) : ?>
  25.     <h2 class="section-title"><?php comments_number('Keine Kommentare', '1 Kommentar', '% Kommentare' );?></h2>
  26.  
  27.     <ol>
  28.  
  29.     <?php foreach ($comments as $comment) : ?>
  30.  
  31.         <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>" class="clearfix">
  32.             <div class="comment-info">
  33.                 <div class="comment-gravatar">
  34.                     <?php echo get_avatar( $comment, 60 ); ?>
  35.                 </div> 
  36.            
  37.                 <div class="comment-data">
  38.                     <div class="comment-author"><?php comment_author_link() ?></div>
  39.                     <div class="comment-meta"><?php comment_date() ?></div>
  40.                 </div>
  41.             </div>
  42.             <div class="comment-text">
  43.     <?php if ($comment->comment_approved == '0') { ?><span class='unapproved'>Ihr Kommentar wartet auf die Freischaltung durch einen Moderator.</span><?php } ?>                           
  44.                 <?php comment_text() ?>
  45.             </div>
  46.         </li>
  47.  
  48.     <?php
  49.         /* Changes every other comment to a different class */
  50.         $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt clearfix" ' : '';
  51.     ?>
  52.  
  53.     <?php endforeach; /* end for each comment */ ?>
  54.  
  55.     </ol>
  56.  
  57.  <?php else : // this is displayed if there are no comments so far ?>
  58.  
  59.     <?php if ('open' == $post->comment_status) : ?>
  60.         <!-- If comments are open, but there are no comments. -->
  61.  
  62.      <?php else : // comments are closed ?>
  63.         <!-- If comments are closed. -->
  64.         <p>Kommentarbereich geschlossen.</p>
  65.  
  66.     <?php endif; ?>
  67. <?php endif; ?>
  68.  
  69. </div>
  70.  
  71.  
  72. <?php if ('open' == $post->comment_status) : ?>
  73.  
  74. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  75. <p>Sie müssen <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">eingeloggt sein</a> um einen Kommentar zu hinterlassen.</p>
  76. <?php else : ?>
  77.  
  78. <div id="respond">
  79.  
  80.     <h2 class="section-title">Kommentar schreiben</h2>
  81.  
  82.     <form method="post" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php">
  83.    
  84.         <div id="comment-form">
  85.    
  86.         <?php if ( $user_ID ) : ?>
  87.             <p class="login">Eingeloggt 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="Ausloggen">Aus diesem Account ausloggen &raquo;</a></p>           
  88.         <?php else : ?>
  89.    
  90.         <label for="author">Name <?php if ($req) echo "*"; ?></label><br />
  91.         <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
  92. <br />
  93. <br />
  94.         <label for="email">E-Mail (wird nicht veröffentlicht) <?php if ($req) echo "*"; ?></label><br />
  95.         <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
  96. <br /><br />
  97.         <label for="url">Website</label><br />
  98.         <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
  99. <br /><br />       
  100.         <?php endif; ?>
  101.         <label for="comment">Ihre Nachricht</label><br />
  102.         <textarea name="comment" id="comment" tabindex="4"></textarea>
  103.        
  104.         </div>                         
  105.  
  106.         <input name="submit" type="submit" id="submit" tabindex="5" value="Kommentar absenden" />
  107.         <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  108.         <?php do_action('comment_form', $post->ID); ?>
  109.  
  110.     </form>
  111. <br />
  112.     <p class="orange">Mit "*" gekennzeichnete Felder sind Pflichtfelder</p>
  113.  
  114. </div>
  115.  
  116. <?php endif; // If registration required and not logged in ?>
  117.  
  118. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement