Changeset 393
- Timestamp:
- 09/28/03 18:20:14 (5 years ago)
- Files:
-
- trunk/b2commentspopup.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/b2commentspopup.php
r390 r393 22 22 <h2>Comments</h2> 23 23 <ol id="comments"> 24 25 24 <?php /* this line is b2's motor, do not delete it */ 26 25 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date"); 27 26 $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id"); 27 if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass'] != $commentstatus->post_password) { // and it doesn't match the cookie 28 echo("<li>".get_the_password_form()."</li></ol>"); 29 } 30 else { 31 if ($comments) { 28 32 // this line is WordPress' motor, do not delete it. 29 if ($comments) {30 if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass'] != $commentstatus->post_password) { // and it doesn't match the cookie31 echo("<li>Enter your password to view comments.</li>");32 }33 else {34 33 foreach ($comments as $comment) { 35 34 ?> … … 40 39 </li> 41 40 42 <?php } // end for each comment 43 } // end password check 44 } else { // this is displayed if there are no comments so far 41 <?php } // end for each comment 42 } else { // this is displayed if there are no comments so far 45 43 ?> 46 44 <li>No comments yet.</li> … … 49 47 </ol> 50 48 <?php 51 if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass'] != $commentstatus->post_password) { 52 // no authorization for private comments 53 } 54 else if ('open' == $commentstatus->comment_status) { ?> 49 if ('open' == $commentstatus->comment_status) { ?> 55 50 <h2>Leave a Comment</h2> 56 51 <p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <?php echo htmlentities($comment_allowed_tags); ?></p> … … 87 82 <?php } else { // comments are closed ?> 88 83 <p>Sorry, comments are closed at this time.</p> 89 <?php } ?> 84 <?php } 85 } // end password check 86 ?> 90 87 91 88 <div><strong><a href="javascript:window.close()">Close this window</a>.</strong></div>
