<?php
  global    $id,
            $gn_comments_count;

	// Do not delete these lines
   if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
      die ('Please do not load this page directly. Thanks!');
   // if there's a password
   if ( post_password_required() ) 
   {
      echo '<p class="nocomments">This post is password protected. Enter the password to view comments.</p>';
      return;
   }

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

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


  if ( have_comments() ) 
  {
    echo '   <div id="comments">' . "\n";
    echo '     <h4 id="comments-number" class="comments-header">';
    comments_number(__('No Comments', 'german_newspaper'), __('One Comment', 'german_newspaper'), __('% Comments', 'german_newspaper'));
    echo ' ';
    printf(__('to &#8220;%s&#8221;', 'german_newspaper'), the_title('', '', false));
    echo '     </h4>' . "\n\n";

    if (  function_exists('paginate_comments_links') AND get_option('page_comments') AND
          paginate_comments_links(array('echo' => 'false')) != '' )
    {
      echo '<div id="comments-nav-above" class="comments-navigation">' . "\n";
      echo '   <div class="paginated-comments-links clear">' . "\n";
      echo '   <span class="title">' . _e('Comment Pages:', 'german_newspaper') . '</span>';
      paginate_comments_links(); 
      echo '   </div>' . "\n";
      echo '</div>' . "\n";
    }

    // new comments.php stuff - since wp 2.7
    echo '     <ol class="commentlist">' . "\n";
    wp_list_comments();
    echo '     </ol>' . "\n";

    if (  function_exists('paginate_comments_links') AND get_option('page_comments') AND
          paginate_comments_links(array('echo' => 'false')) != '' )
    {
      echo '     </div>' . "\n";
      echo '<div id="comments-nav-below" class="comments-navigation">' . "\n";
      echo '   <div class="paginated-comments-links clear">' . "\n";
      echo '   <span class="title">' . _e('Comment Pages:', 'german_newspaper') . '</span>';
      paginate_comments_links(); 
      echo '   </div>' . "\n";
      echo '</div>' . "\n";
    }
    else
    {
      echo '       <div class="navigation">' . "\n";
      echo '       <div class="alignleft">';
      previous_comments_link(); 
      echo '       </div>' . "\n";
      echo '       <div class="alignright">';
      next_comments_link();
      echo '       </div>' . "\n";
      echo '     </div>' . "\n";
      echo '     </div>' . "\n";
    }
  }
  else
  {
    // this is displayed if there are no comments so far
    if ( comments_open() ) 
    {
      // If comments are open, but there are no comments.
      echo '	<p class="nocomments">' . __('No Comments so far.', 'german_newspaper') . '</p>' . "\n";
    }
    else
    {
      // comments are closed
      echo '	<p class="nocomments">' . __('Comments are closed.', 'german_newspaper') . '</p>' . "\n";
    }
  }
                       

   if ( 'open' == $post->comment_status )
   {
      echo '   <div id="respond">' . "\n";
      echo '     <h3>';
      comment_form_title( __('Leave a Reply', 'german_newspaper'), __('Leave a Reply to %s', 'german_newspaper') );
      echo '     </h3>';

      echo '     <div id="cancel-comment-reply">' . "\n";
      echo '        <small>';
      cancel_comment_reply_link();
      echo '        </small>' . "\n";
      echo '     </div>' . "\n";

   	
    	if ( get_option('comment_registration') && !$user_ID )
      {
        echo '     <div id="comment_login" class="messagebox">' . "\n";
	     	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";
        echo '     </div>' . "\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>' . "\n";
        echo '<input name="submit" type="submit" id="comment_submit" tabindex="5" value="' . __('Submit Comment','german_newspaper') . '" />' . "\n";
        comment_id_fields();
		    echo '</p>' . "\n";
		
		    do_action('comment_form', $post->ID);
		
		    echo '</form>' . "\n\n";

	     }

      echo '   </div>' . "\n";
	     
	     // If registration required and not logged in
   }




?>