template_exists( "blog-comments.html" ) ) or (is_single())) { unset( $t ); if (!empty($post->post_password)) { // if there's a password if ($_COOKIE['bm-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie ?>

comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"; $comments = $wpdb->get_results( $query ); if( is_array( $comments ) ) { foreach( $comments as $key => $comment ) { $t[ $key ] = $comment; $t[ $key ]->comment_content = stripslashes( $t[ $key ]->comment_content ); } } else { $t = $comments; } $wpsmarty->assign( "comments", $t); $wpsmarty->assign( "comment_author_url", $comment_author_url ); $wpsmarty->assign( "comment_author", $comment_author ); $wpsmarty->assign( "comment_author_email", $comment_author_email ); $wpsmarty->assign( "req", $req ); $wpsmarty->assign( "redirect_to", htmlspecialchars($_SERVER["REQUEST_URI"]) ); $wpsmarty->assign( "post", $post ); $wpsmarty->caching = false; if( is_single() == false ) { if( $wpsmarty->template_exists( "blog-comments.html" ) ) $commentstext .= $wpsmarty->fetch( "blog-comments.html" ); } else { $commentstext .= $wpsmarty->fetch( "comments.html" ); } $wpsmarty->caching = true; } ?>