Advertisement
Guest User

Miguel Netto

a guest
Jun 6th, 2009
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.00 KB | None | 0 0
  1. <?php
  2.  
  3. // 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. if ( post_password_required() ) { ?>
  7.     <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.','arthemia');?></p>
  8.     <?php return;
  9. }
  10.  
  11. // add a microid to all the comments
  12. function comment_add_microid($classes) {
  13.     $c_email=get_comment_author_email();
  14.     $c_url=get_comment_author_url();
  15.     if (!empty($c_email) && !empty($c_url)) {
  16.         $microid = 'microid-mailto+http:sha1:' . sha1(sha1('mailto:'.$c_email).sha1($c_url));
  17.         $classes[] = $microid;
  18.     }
  19.     return $classes;   
  20. }
  21. add_filter('comment_class','comment_add_microid');
  22.  
  23. ?>
  24.  
  25. <!-- You can start editing here. -->
  26.  
  27. <?php if (have_comments()) : ?>
  28.  
  29. <h3><?php comments_number(__('No Comment','arthemia'), __('One Comment','arthemia'), __('% Comments','arthemia') );?> &raquo; </h3>
  30.  
  31. <ul class="commentlist" id="singlecomments">
  32.     <?php wp_list_comments(array('avatar_size'=>45, 'reply_text'=>__('Reply to this comment &raquo;','arthemia'))); ?>
  33.  
  34. </ul>
  35. <?php if(function_exists('wp_commentnavi')) { wp_commentnavi(); } ?>
  36. <div class="navigation">
  37. <div class="alignleft"><?php previous_comments_link(); ?></div>
  38. <div class="alignright"><?php next_comments_link(); ?></div>
  39. </div>
  40.  
  41.  <?php else : // this is displayed if there are no comments so far ?>
  42.  
  43.     <?php if ('open' == $post->comment_status) : ?>
  44.         <!-- If comments are open, but there are no comments. -->
  45.  
  46.      <?php else : // comments are closed ?>
  47.         <p class="nocomments"><?php _e('Comments are closed.','arthemia');?></p>
  48.  
  49.    
  50.     <?php endif; ?>
  51. <?php endif; ?>
  52.  
  53.  
  54. <?php if ('open' == $post->comment_status) : ?>
  55.  
  56.     <div id="respond">
  57.     <h3><?php comment_form_title(__('Leave a comment!','arthemia'), __('Leave a comment to %s','arthemia')); ?></h3>
  58.      
  59.     <div id="cancel-comment-reply">
  60.     <p><?php cancel_comment_reply_link(__('Click here to cancel reply &raquo;','arthemia')); ?></p>
  61.     </div>
  62.  
  63. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  64. <p><?php _e('You must be','arthemia'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('logged in','arthemia'); ?></a> <?php _e('to post a comment.','arthemia'); ?></p>
  65. <?php else : ?>
  66.  
  67. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  68.  
  69. <?php if ( $user_ID ) : ?>
  70.  
  71. <p><?php _e('Logged in as','arthemia'); ?> <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="<?php _e('Log out of this account','arthemia'); ?>"><?php _e('Logout','arthemia'); ?> &raquo;</a></p>
  72.  
  73. <?php else : ?>
  74.  
  75. <p><?php _e('Add your comment below, or','arthemia'); ?> <a href="<?php trackback_url(true); ?>" rel="trackback"><?php _e('trackback','arthemia'); ?></a> <?php _e('from your own site','arthemia'); ?>. <?php _e('You can also','arthemia'); ?> <?php comments_rss_link(__('subscribe to these comments','arthemia')); ?> <?php _e('via RSS.','arthemia');?></p>
  76.  
  77. <p><?php _e('Be nice. Keep it clean. Stay on topic. No spam.','arthemia'); ?></p>
  78.  
  79. <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" class="field" />
  80.  
  81.  
  82.  
  83. <label for="author"><small><?php _e('Name','arthemia'); ?> <?php if ($req) echo __('(required)','arthemia'); ?></small></label></p>
  84.  
  85. <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" class="field" />
  86. <label for="email"><small><?php _e('Mail','arthemia'); ?> <?php _e('(will not be published)','arthemia'); ?> <?php if ($req) echo __('(required)','arthemia'); ?></small></label></p>
  87.  
  88. <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" class="field" />
  89. <label for="url"><small><?php _e('Website','arthemia'); ?> <?php _e('(optional)','arthemia'); ?></small></label></p>
  90.  
  91. <?php endif; ?>
  92.  
  93. <div>
  94. <?php comment_id_fields(); ?>
  95. <input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" /></div>
  96.  
  97. <p><textarea name="comment" id="comment" cols="100%" rows="15" tabindex="4" class="field"></textarea></p>
  98. <p><?php _e('You can use these tags:','arthemia'); ?><br/><code><?php echo allowed_tags(); ?></code></p>
  99. <p><?php _e('This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at','arthemia'); ?> <a href="http://www.gravatar.com">Gravatar</a>.</p>
  100.  
  101. <p><input name="submit" class="submitbutton" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment','arthemia'); ?>" />
  102. <?php do_action('comment_form', $post->ID); ?>
  103.  
  104. <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  105. </p>
  106.  
  107. </form>
  108.  
  109.  
  110. <?php endif; // If registration required and not logged in ?>
  111.  
  112. </div>
  113.  
  114. <?php endif; ?>
  115.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement