<?php
/**
* The template for displaying Comments.
* Modified for "sicktb"
*
* For variants of this template alter "Test:" at line 91 (input) and 142 (output)
* Coordinate with bcw_handle_comment() on functions.php
*
* The area of the page that contains both current comments
* and the comment form.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>
<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
</div><!-- #comments -->
<?php
/* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
*/
return;
endif;
?>
<?php
// You can start editing here -- including this comment!
?>
<?php if ( have_comments() ) : ?>
<h3 id="comments-title"><?php
printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
?></h3>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
</div> <!-- .navigation -->
<?php endif; // check for comment navigation ?>
<ol class="commentlist">
<?php
/* Loop through and list the comments. Tell wp_list_comments()
* to use twentyten_comment() to format the comments.
* If you want to overload this in a child theme then you can
* define twentyten_comment() and that will be used instead.
* See twentyten_comment() in twentyten/functions.php for more.
*/
wp_list_comments( array( 'callback' => 'twentyten_comment1' ) );
?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
</div><!-- .navigation -->
<?php endif; // check for comment navigation ?>
<?php
/* If there are no comments and comments are closed, let's leave a little note, shall we?
* But we only want the note on posts and pages that had comments in the first place.
*/
if ( ! comments_open() && get_comments_number() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p>
<?php endif; ?>
<?php endif; // end have_comments() ?>
<?php $post_id = get_the_ID();
if ( comments_open( $post_id ) ) : ?>
<div id="respond" class="comment-respond">
<h3 id="reply-title" class="comment-reply-title"><?php comment_form_title(__( 'Leave a Reply' ),__( 'Leave a Reply to %s' )); ?> <small><?php cancel_comment_reply_link(__( 'Cancel reply' )); ?></small></h3>
<?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?>
<?php echo '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>'; ?>
<?php else : ?>
<form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo 'commentform'; ?>" class="comment-form">
<?php $args = '<p class="logged-in-as">' . sprintf( __( 'Logged in as %2$s. <a href="%3$s" title="Log out of this account">Log out?</a>' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>';
echo apply_filters( 'comment_form_logged_in', $args, $commenter, $user_identity ); ?>
<?php $args = '<p class="comment-form-comment" style="display: none;"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true">' . time() . '</textarea></p>';
echo apply_filters( 'comment_form_field_comment', $args ); ?>
<!-- !!!!!! Custom form fields start here !!!!!!! -->
Wat is kaas?: <input type="text" name="kaas" id="kaas" size="22" /><br style="clear: both;"><br>
Wat is vlees?: <input type="text" name="vlees" id="vlees" size="22" /><br style="clear: both;">
<p class="form-submit">
<input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo __( 'Post Comment' ); ?>" />
<?php comment_id_fields( $post_id ); ?>
</p>
</form>
<?php endif; ?>
</div><!-- #respond -->
<?php else :
do_action( 'comment_form_comments_closed' );
endif; ?>
</div><!-- #comments -->
<?php
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own twentyten_comment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since Twenty Ten 1.0
*/
function twentyten_comment1( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-author vcard">
<?php echo get_avatar( $comment, 40 ); ?>
<?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
</div><!-- .comment-author .vcard -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
<br />
<?php endif; ?>
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
<?php
/* translators: 1: date, 2: time */
printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
$user_id = get_current_user_id();
$nonce = wp_create_nonce('del-comment');
$link = get_permalink();
if ( current_user_can('moderate_comments') || $comment->user_id == $user_id ) {
echo " <a href=\"$link?bcw_task=del&com_id={$comment->comment_ID}&user_id=$user_id&_wpnonce=$nonce\" title=\"Move immediately to trash (no confirmation)\">(Del)</a><br />";
}
if ( current_user_can('moderate_comments')) {
echo '<br />Timestamp:';
comment_text();
}
?>
<!-- !!!!!! Custom form field output starts here !!!!!!! -->
Wat is kaas?: <?php echo get_comment_meta( $comment->comment_ID, 'bcw_kaas', true ); ?><br />
Wat is vlees?: <?php echo get_comment_meta( $comment->comment_ID, 'bcw_vlees', true ); ?><br />
</div><!-- .comment-meta .commentmetadata -->
</div><!-- #comment-## -->
<?php
break;
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p>
<?php
break;
endswitch;
}