daily pastebin goal
1%
SHARE
TWEET

comments.php

luckyankit Dec 4th, 2011 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  
  4.  
  5. // Do not delete these lines
  6.  
  7.         if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  8.  
  9.                 die ('Please do not load this page directly. Thanks!');
  10.  
  11.  
  12.  
  13.         if ( post_password_required() ) { ?>
  14.  
  15.  
  16.  
  17. <p class="nocomments">Password protected.</p>
  18.  
  19. <?php
  20.  
  21.                 return;
  22.  
  23.         }
  24.  
  25. ?>
  26.  
  27. <!-- You can start editing here. -->
  28.  
  29. <div class="comments-box"> <a name="comments" id="comments"></a>
  30.  
  31.   <?php if ( have_comments() ) : ?>
  32.  
  33.         <div id="displaying">Displaying <?php comments_number('No Additional Review Yet', '1 More Review', '% More Reviews' );?>  </div>
  34.  
  35.                        
  36.  
  37.                         <div id="haveyoursay">Have Your Say  </div>
  38.  
  39.                         <br />
  40.  
  41.   <ol class="commentlist">
  42.  
  43.     <?php wp_list_comments('avatar_size=40'); ?>
  44.  
  45.   </ol>
  46.  
  47.   <div class="navigation">
  48.  
  49.     <div class="left">
  50.  
  51.       <?php previous_comments_link() ?>
  52.  
  53.     </div>
  54.  
  55.     <div class="right">
  56.  
  57.       <?php next_comments_link() ?>
  58.  
  59.     </div>
  60.  
  61.   </div>
  62.  
  63.   <?php else : // this is displayed if there are no comments so far ?>
  64.  
  65.   <?php if ('open' == $post->comment_status) : ?>
  66.  
  67.   <!-- If comments are open, but there are no comments. -->
  68.  
  69.   <?php else : // comments are closed ?>
  70.  
  71.   <!-- If comments are closed. -->
  72.  
  73.  
  74.  
  75.   <?php endif; ?>
  76.  
  77.   <?php endif; ?>
  78.  
  79.   <?php if ('open' == $post->comment_status) : ?>        
  80.  
  81.   <div id="respond">    
  82.  
  83.     <h3>Add your Review:</h3></br>
  84.  
  85.     <div class="cancel-comment-reply"> <small>
  86.  
  87.       <?php cancel_comment_reply_link(); ?>
  88.  
  89.       </small> </div>
  90.  
  91. <?php do_action("comment_form_before");?>
  92.  
  93.     <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  94.  
  95.    <p><?php print 'You must be'; ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php print 'Logged in'; ?></a> <?php print 'to post review'; ?>.</p>
  96.  
  97.     <?php else : ?>
  98. <?php do_action("comment_form_after");?>
  99.   <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  100.  
  101.     <?php if ( $user_ID ) : ?>
  102.  
  103. <p><?php print 'Logged as'; ?> <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="Log out of this account"><?php print 'Log out'; ?> &raquo;</a></p>
  104.  
  105.       <?php else : ?>
  106.  
  107.       <p>
  108.  
  109.         <input class="author" type="text" value="Your Name..." onclick="this.value='';" name="author" id="author" size="22" tabindex="1"/>
  110.  
  111.         <label for="author"><small>
  112.  
  113.         <?php if ($req) echo "(Required)"; ?>
  114.  
  115.         </small></label>
  116.  
  117.       </p>
  118.  
  119.       <p>
  120.  
  121.         <input class="email" type="text" value="Your Email..." onclick="this.value='';" name="email" id="email" size="22" tabindex="2"/>
  122.  
  123.         <label for="email"><small>(Will not be published)
  124.  
  125.         <?php if ($req) echo " (Required)"; ?>
  126.  
  127.         </small></label>
  128.  
  129.       </p>
  130.  
  131.       <p>
  132.  
  133.         <input class="url" type="text" value="Your Website..." onclick="this.value='';" name="url" id="url" size="22" tabindex="3"/>
  134.  
  135.         <label for="url"><small>(Optional)</small></label>
  136.  
  137.       </p>
  138.  
  139.       <?php endif; ?>
  140.  
  141.  
  142.  
  143.       <p>
  144.  
  145.         <textarea name="comment" id="comment" tabindex="4"></textarea>
  146.  
  147.       </p>
  148.  
  149.            <p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>
  150.  
  151.       <p>
  152.  
  153.         <input class="submit" name="submit" type="submit" id="submit" tabindex="5" value="Submit Review" />
  154.  
  155.         <?php comment_id_fields(); ?>
  156.  
  157.       </p>
  158.  
  159.       <?php do_action('comment_form', $post->ID); ?>
  160.  
  161.     </form>
  162.  
  163.     <?php endif; // If registration required and not logged in ?>
  164.  
  165.   </div>
  166. <?php show_manual_subscription_form(); ?>
  167. </br>
  168. <h3>»» Share your Comments & Images for this Review ««</h3>
  169. <div id="disqus_thread"></div>
  170. <script type="text/javascript">
  171.     /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
  172.     var disqus_shortname = 'reviewcenter'; // required: replace example with your forum shortname
  173.  
  174.     /* * * DON'T EDIT BELOW THIS LINE * * */
  175.     (function() {
  176.         var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  177.         dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
  178.         (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  179.     })();
  180. </script>
  181. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  182.                  
  183.   <?php endif; // if you delete this the sky will fall on your head ?>
  184.  
  185. </div>
  186.  
  187.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top