WordPress.org

Ready to get started?Download WordPress

Forums

Comments error with plugin wordpress-thread-comment (8 posts)

  1. takethebox
    Member
    Posted 4 years ago #

    Hello,

    I have installed the plugin wordpress-thread-comment in mij wordpress on my Dutch website http://www.takethebox.com and I have this code for my comments.php

    <?php // Do not delete these lines
    	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    		die ('Please do not load this page directly. Thanks!');
    
            if (!empty($post->post_password)) { // if there's a password
                if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
    				?>
    
    				<p class="nocomments">Dit bericht is beveiligd met een wachtwoord<p>
    
    				<?php
    				return;
                }
            }
    
    		/* This variable is for alternating comment background */
    		$oddcomment = 'alt';
    ?>
    
    <a name="reageer"></a><div class="header"><?php comments_number(__('Geen reacties'), __('Er is tot nu toe 1 reactie'), __('Er zijn tot nu toe % reacties'), 'commentslink', __('Reageren gesloten')); ?> op "<?php the_title(); ?>"</div><br />
    
    <!-- You can start editing here. -->
    
    <?php if ($comments) : ?>
    
    	<?php foreach ($comments as $comment) : ?>
    
    		<?php if ($comment->comment_approved == '0') : ?> <em>Your comment is awaiting moderation.</em>
    
    			<?php endif; ?>
    
    <div class="headercommentss"> <li id="comment-<?php comment_ID(); ?>"> <div class="gravatar"><?php if(function_exists('get_avatar')) { echo get_avatar($comment, '30'); } ?></div></a>
    <div class="commentsuser"><?php comment_author_link() ?></div> <div class="datumcomments"><?php comment_date('j F, Y') ?> om <?php comment_time() ?></div>
    <div class="commentsreactie">
      <?php comment_text() ?>
    </div>
      </div>
    
    	<?php /* Changes every other comment to a different class */
    		if ('alt' == $oddcomment) $oddcomment = '';
    		else $oddcomment = 'alt';
    	?>
    
    	<?php endforeach; /* end for each comment */ ?>
    
    	</ol>
    
     <?php else : // this is displayed if there are no comments so far ?>
    
      <?php if ('open' == $post->comment_status) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    		<p class="nocomments">Comments are closed.</p>
    
    	<?php endif; ?>
    <?php endif; ?>
    
    <?php if ('closed' == $post->comment_status) : ?>
    <a name="comments"></a><div class="header">Geef een reactie</div>
    
    <br /><div class="code">
    <b><img border="0" src="http://www.takethebox.com/wp-content/themes/ttb/uitroepteken.gif" align="left">&nbsp;Reacties op dit bericht zijn gesloten.</b>
    </div>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    
    <a name="comments"></a><div class="header">Geef een reactie</div>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
    <?php else : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    <?php if ( $user_ID ) : ?>
    
    Ingelogd als <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Uitloggen</a></p>
    
    <?php else : ?>
    
    <table border="0" width="100%" id="table1">
    	<tr>
    		<td><label for="author">Naam</label></td>
    		<td><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /></td>
    	</tr>
    	<tr>
    		<td><label for="email">E-mail</label></p></td>
    		<td><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /></td>
    	</tr>
    	<tr>
    		<td><label for="url">Website</label></td>
    		<td><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /></td>
    	</tr>
    </table>
    
    <?php endif; ?>
    
    <!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
    <p></p><?php if ( function_exists(cs_print_smilies) ) {cs_print_smilies();} ?>
    <br />
    
    <textarea name="comment" id="comment" cols="60%" rows="6" tabindex="4"></textarea>
    
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="Reageer" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    </p>
    
    </form><center>
    
    <?php endif; // If registration required and not logged in ?>
    
    <?php endif; // if you delete this the sky will fall on your head ?>
    </center></center>

    The plugin dousn't works with this plugin, there comes a Javascript error in the statusbar in internet explorer.

    Please help me!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    I have installed the plugin wordpress-thread-comment in mij wordpress

    Why? Threaded comments are already available in WordPress.

  3. takethebox
    Member
    Posted 4 years ago #

    I know, I installed it, and it dousn't works with my comment template. Can anyone help me?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    You don't need a plugin. Try deactivating wordpress-thread-comment and configure WordPress to use threaded comments via Admin/Settings/Discussion. You then may need to make some change to your theme to get the comments to work properly.

    http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display

  5. takethebox
    Member
    Posted 4 years ago #

    But a plugin is so much quicker.
    Anyway; I have wordpress 2.8 and not 2.7.

    Dous it also works with WordPress 2.8?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Threaded comments were introduced with 2.7. They're also available in 2.8.

  7. takethebox
    Member
    Posted 4 years ago #

    So; visitors can reply comments on my website on other comments?

  8. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Yes.

Topic Closed

This topic has been closed to new replies.

About this Topic