Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

noscope

By: a guest on Dec 15th, 2008  |  syntax: PHP  |  size: 4.26 KB  |  views: 322  |  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 if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
  2. <p><?php _e('Enter your password to view comments.'); ?></p>
  3. <?php return; endif; ?>
  4.  
  5. <h2 id="comments"><?php comments_number(__('No Responses'), __('1 Response'), __('% Responses')); ?>
  6. <?php if ( comments_open() ) : ?>
  7.         <a href="#postcomment" title="<?php _e("Leave a comment"); ?>">&raquo;</a>
  8. <?php endif; ?>
  9. </h2>
  10.  
  11. <? // Begin Comments & Trackbacks ?>
  12. <?php if ( $comments ) : ?>
  13.  
  14. <? // Begin Trackbacks ?>
  15. <?php foreach ($comments as $comment) : ?>
  16.         <? if ($comment->comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("<pingback />", $comment->comment_content) || ereg("<trackback />", $comment->comment_content)) { ?>
  17.  
  18.         <? if (!$runonce) { $runonce = true; ?>
  19.         <h2 id="trackbacks">Trackbacks & Pingbacks</h2>
  20.         <ol id="trackbacklist">
  21.         <? } ?>
  22.  
  23.         <li id="comment-<?php comment_ID() ?>">
  24.         <?php comment_text() ?>
  25.         <p><cite><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?> &#8212; <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite> <?php edit_comment_link(__("Edit This"), ' |'); ?></p>
  26.         </li>
  27.  
  28.         <? } ?>
  29. <?php endforeach; ?>
  30. <? if ($runonce) { ?>
  31. </ol>
  32. <? } ?>
  33. <? // End Trackbacks ?>
  34.  
  35. <br />
  36.  
  37. <? // Begin Comments ?>
  38. <h2 id="comments">Comments</h2>
  39. <ol id="commentlist">
  40. <?php foreach ($comments as $comment) : ?>
  41.         <? if ($comment->comment_type != "trackback" && $comment->comment_type != "pingback" && !ereg("<pingback />", $comment->comment_content) && !ereg("<trackback />", $comment->comment_content)) { ?>
  42.        
  43.                 <li id="comment-<?php comment_ID() ?>">
  44.                 <?php comment_text() ?>
  45.                 <p><cite><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?> &#8212; <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite> <?php edit_comment_link(__("Edit This"), ' |'); ?></p>
  46.                 </li>
  47.        
  48.         <? } ?>
  49. <?php endforeach; ?>
  50. </ol>
  51. <? // End Comments ?>
  52.  
  53. <?php else : // If there are no comments yet ?>
  54.         <p><?php _e('No comments yet.'); ?></p>
  55. <?php endif; ?>
  56.  
  57. <p><?php comments_rss_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.')); ?>
  58. <?php if ( pings_open() ) : ?>
  59.         <a href="<?php trackback_url() ?>" rel="trackback"><?php _e('TrackBack <abbr title="Uniform Resource Identifier">URI</abbr>'); ?></a>
  60. <?php endif; ?>
  61. </p>
  62.  
  63. <?php if ( comments_open() ) : ?>
  64. <h2 id="postcomment"><?php _e('Leave a comment'); ?></h2>
  65.  
  66. <p><?php _e("Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed:"); ?> <code><?php echo allowed_tags(); ?></code></p>
  67.  
  68. <form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  69.         <p>
  70.           <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
  71.            <label for="author"><?php _e('Name'); ?></label> <?php if ($req) _e('(required)'); ?>
  72.         <input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />
  73.         <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?>" />
  74.         </p>
  75.  
  76.         <p>
  77.           <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
  78.            <label for="email"><?php _e('E-mail'); ?></label> <?php if ($req) _e('(required)'); ?>
  79.         </p>
  80.  
  81.         <p>
  82.           <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
  83.            <label for="url"><?php _e('<acronym title="Uniform Resource Identifier">URI</acronym>'); ?></label>
  84.         </p>
  85.  
  86.         <p>
  87.           <label for="comment"><?php _e('Your Comment'); ?></label>
  88.         <br />
  89.           <textarea name="comment" id="comment" cols="60" rows="4" tabindex="4"></textarea>
  90.         </p>
  91.  
  92.         <p>
  93.           <input name="submit" id="submit" type="submit" tabindex="5" value="<?php _e('Say It!'); ?>" />
  94.         </p>
  95.         <?php do_action('comment_form', $post->ID); ?>
  96. </form>
  97.  
  98. <?php else : // Comments are closed ?>
  99. <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
  100. <?php endif; ?>