[Plugin: PTM AJAX Comments] Works in twentyten with custom comments.php, but not in my own theme
-
Hello,
I can’t get PTM AJAX Comments to work in my theme. I checked the FAQ and I believe all the necessary tags ad ID’s are there.
Also the plugin works fine in the twentyten theme. So there are no plugins conflict.But confusing is it when I override the “comments.php” in the twentyten theme with my own “comments.php” the plugin works fine. It’s the same code it use (no function.php), but it only works in the twentyten theme. The layout is correct displayed (off course without css markup).
I also checked if I was missing something in the header.php. But the <?php wp_head(); ?> is there.
Firts I will copy my theme’s comments.php:
<?php if(!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) : ?> <?php die('You can not access this page directly!'); ?> <?php endif; ?> <?php if(!empty($post->post_password)) : ?> <?php if($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?> <p>This post is password protected. Enter the password to view comments.</p> <?php endif; ?> <?php endif; ?> <?php if(comments_open()) : ?> <?php if(get_option('comment_registration') && !$user_ID) : ?> <?php else : ?> <div class="commentbox commentboxinput clearfix"> <div class="commentavatar floatleft"> <?php global $userdata; get_currentuserinfo(); echo get_avatar($userdata->ID, 50); ?> </div> <div class="commentcontent floatleft"> <div class="commentheading clearfix"> <h2 class="floatleft"> <?php echo $user_identity; ?></h2> <p class="floatright">Now</p> </div> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <textarea name="comment" id="comment" class="commentinput inputstylebox" onfocus="checkOnFocus(this);" onblur="resetInitialText(this);"></textarea> <input name="submit" type="submit" id="submit" class="sendcomment floatright inputstylebox" value="Submit" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> <?php do_action('comment_form', $post->ID); ?> </form> </div> </div> <?php endif; ?> <?php else : ?> <p>Comments are closed.</p> <?php endif; ?> <ol class="commentlist"> <?php if($comments) : ?> <?php foreach (array_reverse($comments) as $comment) : ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> <div class="commentbox clearfix"> <div class="commentavatar floatleft"> <?php $urlHome = get_option('home'); echo get_avatar( $comment, $size='50', $default = $urlHome . '/wp-content/themes/hmc/images/avatar.png' ); ?> </div> <div class="commentcontent floatleft"> <div class="commentheading clearfix"> <h2 class="floatleft"><?php comment_author_link(); ?></h2> <p class="floatright"><?php echo human_time_diff( get_comment_time('U'), current_time('timestamp') ) . ' ago'; ?></p> </div> <?php comment_text(); ?> </div> </div> </li> <?php endforeach; ?> <?php else : ?> <?php endif; ?> </ol>
With this markup in the comments.php do I need to adjust the functions.php? I don’t make use off a callback in this script.
For everybody who is reading this; already thanks for reading!
(sorry for my bad English…)
- The topic ‘[Plugin: PTM AJAX Comments] Works in twentyten with custom comments.php, but not in my own theme’ is closed to new replies.