Advertisement
Guest User

wp-comments

a guest
Mar 19th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.98 KB | None | 0 0
  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.  
  8.  
  9. <h2><?php _e('Password Protected'); ?></h2>
  10. <p><?php _e('Enter the password to view comments.'); ?></p>
  11.  
  12. <?php return;
  13.     }
  14. }
  15.  
  16.     /* This variable is for alternating comment background */
  17.  
  18. $oddcomment = 'alt';
  19.  
  20. ?>
  21.  
  22. <!-- You can start editing here. -->
  23. <div id="commentsn"><p>Eddig <span id="commentsnumber"><?php comments_number('0', '1', '%' );?> </span> hozzászólás érkezett.</p></div>
  24. <div id="comments-list">
  25. <?php if ($comments) : ?>
  26.  
  27.     <?php foreach ($comments as $comment) : ?>
  28.         <div class="comment-wrapper" id="comment-<?php comment_ID() ?>">
  29.             <div class="avatar">
  30.                 <?php echo get_avatar( $comment, $size = '50', $default = 'mm' ); ?>
  31.             </div>
  32.             <div class="comment-text">
  33.                 <div class="comment-meta">
  34.                     <ul>
  35.                         <li class="username"><?php comment_author_link() ?></li>
  36.                         <li>- <?php comment_date('Y.m.d'); ?> - <?php comment_time() ?> </li>
  37.                         <li class="edit"><?php edit_comment_link('szerkesztés','',''); ?></li>
  38.                     </ul>
  39.                     <?php if ($comment->comment_approved == '0') : ?>
  40.                     <em><?php _e('Hozzászólás moderálás alatt.'); ?></em>
  41.                     <?php endif; ?>
  42.                 </div>
  43.                 <div class="comment-main">
  44.                     <?php comment_text() ?>
  45.                 </div>
  46.             </div>
  47.             <div class="clear"></div>
  48.         </div>
  49.     <?php endforeach; /* end for each comment */ ?>
  50.  
  51.     <?php else : // this is displayed if there are no comments so far ?>
  52.  
  53.     <?php if ('open' == $post->comment_status) : ?>
  54.         <!-- If comments are open, but there are no comments. -->
  55.         <?php else : // comments are closed ?>
  56.         <!-- If comments are closed. -->
  57.         <p class="nocomments">Hozzászólások tiltva.</p>
  58.     <?php endif; ?>
  59. <?php endif; ?>
  60.  
  61.     <?php if ('open' == $post->comment_status) : ?>
  62.         <h2 id="respond">Szóljon hozzá cikkünkhöz!</h2>
  63.     <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  64.     <p class="login-info">A hozzászóláshoz be kell<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>"> jelentkezned!</a></p>
  65.     <?php else : ?>
  66.     <div id="comment-user-details">
  67.         <?php do_action('alt_comment_login'); ?>
  68.         <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  69.             <?php if ( $user_ID ) : ?>
  70.             <p>Bejelentkezve mint <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="Kijelentkezés">Kijelentkezés &raquo;</a></p>
  71.             <?php else : ?>
  72.             <p class="input-line">
  73.                 <label for="author" class="comment-label">Az Ön neve: <?php if ($req) echo "*"; ?></label>
  74.                 <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="40" tabindex="1" />
  75.             </p>
  76.             <span>Ez a név fog a hozzászólás mellett látszani.</span>
  77.             <p class="input-line">
  78.                 <label for="email" class="comment-label">E-mail címe: <?php if ($req) echo "*"; ?></label>
  79.                 <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="40" tabindex="2" />
  80.             </p>
  81.             <span>Nem lesz látható és nem adjuk ki másnak!</span>
  82.             <?php endif; ?>
  83.             <p id="fortextarea">Hozzászólásának szövege:</p>
  84.             <p>
  85.                 <textarea name="comment" id="comment" cols="60" rows="10" tabindex="4"></textarea>
  86.             </p>
  87.             <p>
  88.                 <input name="submit" type="submit" id="submit" tabindex="5" value="Elküldöm!" />
  89.                 <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  90.             </p>
  91.             <?php do_action('comment_form', $post->ID); ?>
  92.         </form>
  93.         <?php endif; // If registration required and not logged in ?>
  94.         <?php endif; // if you delete this the sky will fall on your head ?>
  95.     </div>
  96. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement