<?php

	// Do not delete these lines
	if ( isset($_SERVER['SCRIPT_FILENAME']) && '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
			echo '	<p class="nocomments">' . __('This post is password protected. Enter the password to view comments.', 'german_newspaper') . '</p>' . "\n";

			return;
		}
	}

	/* This variable is for alternating comment background */
	$oddcomment = 'class="alt" ';


	//		<!-- You can start editing here. -->


if ( $comments )
{
	echo '	<h3 id="comments">';
	comments_number(__('No Responses', 'german_newspaper'), __('One Response', 'german_newspaper'), __('% Responses', 'german_newspaper'));
	echo ' ';
	printf(__('to &#8220;%s&#8221;', 'german_newspaper'), the_title('', '', false));
	echo '	</h3>' . "\n\n";
	echo '	<ol class="commentlist">' . "\n";
	
	foreach ( $comments as $comment )
	{
	  echo '	<li ' . $oddcomment . 'id="comment-' . get_comment_ID() . '">' . get_avatar( $comment, 32 ) . "\n";
	  printf(__('<cite>%s</cite> Says:', 'german_newspaper'), get_comment_author_link());

		if ( $comment->comment_approved == '0' )
		{
			echo '	<em>' . __('Your comment is awaiting moderation.', 'german_newspaper') . '</em>' . "\n";
		}

		echo '	<br />' . "\n";
		echo '	<small class="commentmetadata"><a href="#comment-' . get_comment_ID() . '" title="">';
		printf(__('%1$s at %2$s', 'german_newspaper'), get_comment_date(__('F jS, Y', 'german_newspaper')), get_comment_time());
		echo '</a> ';
		edit_comment_link(__('edit', 'german_newspaper'),'&nbsp;&nbsp;','');
		echo '</small>' . "\n\n\n";

		comment_text();
		
		echo "\n\n\n" . '  </li>' . "\n";

		/* Changes every other comment to a different class */
		$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
	}
	
	echo '</ol>' . "\n\n";
}
else
{
	// this is displayed if there are no comments so far

	if ( 'open' == $post->comment_status )
	{
	  //		<!-- If comments are open, but there are no comments. -->
	}
	else
	{
		// comments are closed
		//		<!-- If comments are closed. -->
		echo '	<p class="nocomments">' . __('Comments are closed.', 'german_newspaper') . '</p>' . "\n";
	}
}


if ( 'open' == $post->comment_status )
{
	echo '	<h3 id="respond">' . __('Leave a Reply', 'german_newspaper') . '</h3>' . "\n";
	
 	if ( get_option('comment_registration') && !$user_ID )
	{
		echo '	<p>';
		printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'german_newspaper'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink()));
		echo '	</p>' . "\n";
	}
	else
	{
		echo '	<form action="' . get_option('siteurl') . '/wp-comments-post.php" method="post" id="commentform">' . "\n";
		
    if ( $user_ID )
    {
    	echo '		<p>';
			printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'german_newspaper'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity);
			echo ' <a href="' . get_option('siteurl') . '/wp-login.php?action=logout" title="' . __('Log out of this account', 'german_newspaper') . '">' . __('Log out &raquo;', 'german_newspaper') . '</a></p>' . "\n";
		}
		else
		{
			echo '<p><input type="text" name="author" id="author" value="' . $comment_author . '" size="22" tabindex="1" />' . "\n";
			echo '<label for="author"><small>' . __('Name', 'german_newspaper') . ' ';

			if ( $req ) _e("(required)", "german_newspaper");

			echo '</small></label></p>' . "\n";
			echo '<p><input type="text" name="email" id="email" value="' . $comment_author_email . '" size="22" tabindex="2" />' . "\n";
			echo '<label for="email"><small>' . __('Mail (will not be published)', 'german_newspaper') . ' ';
			if ($req) _e("(required)", "german_newspaper");

			echo '</small></label></p>' . "\n";
			echo '<p><input type="text" name="url" id="url" value="' . $comment_author_url . '" size="22" tabindex="3" />' . "\n";
			echo '<label for="url"><small>' . __('Website', 'german_newspaper') . '</small></label></p>' . "\n";
		}

		echo '<!--<p><small>';
		printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'german_newspaper'), allowed_tags());
		echo '</small></p>-->' . "\n";
		echo '<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>' . "\n";
		echo '<p><input name="submit" type="submit" id="comment_submit" tabindex="5" value="' . __('Submit Comment', 'german_newspaper') . '" />' . "\n";
		echo '<input type="hidden" name="comment_post_ID" value="' . $id . '" />' . "\n";
		echo '</p>' . "\n";
		
		do_action('comment_form', $post->ID);
		
		echo '</form>' . "\n\n";

	}
	// If registration required and not logged in
}

?>