<?php
	// This is the loop, which fetches entries from your database.
	// It is a delicate piece of machinery. Be gentle!
	?>
<?php /* Headlines for archives */ if ((!is_single() && !is_home()) || is_paged()) { ?>
<h2 class="pagetitle">
  <?php // Figure out what kind of page is being shown
			if (is_category()) {
				printf(__('Archiv f&uuml;r die \'%s\' Kategorie','unnamed'), single_cat_title('',false));

			} elseif (is_day()) {
				printf(__('Archiv f&uuml;r %s','unnamed'), get_the_time(__('F jS, Y','unnamed')));

			} elseif (is_month()) {
				printf(__('Archiv f&uuml;r %s','unnamed'), get_the_time(__('F, Y','unnamed')));

			} elseif (is_year()) {
				printf(__('Archiv f&uuml;r %s','unnamed'), get_the_time(__('Y','unnamed')));

			} elseif (is_search()) {
				printf(__('Suchergebnisse f&uuml;r \'%s\'','unnamed'), $s);

			} elseif (function_exists('is_tag') && is_tag()) {
				printf(__('Tag-Archive f&uuml;r \'%s\'','unnamed'), get_query_var('tag') );

			} elseif (is_paged() && ($paged > 1)) { 
				printf(__('Archiv-Seite %s','unnamed'), $paged );
			} ?>
</h2>
<?php } ?>
<?php /* Start the loop */ if (have_posts()) { while (have_posts()) { the_post(); ?>
<?php /* Permalink nav has to be inside loop */ if (is_single()) include (TEMPLATEPATH . '/navigation.php'); ?>
<div id="post-<?php the_ID(); ?>" class="entry">
  <h3 class="entry-header"><a href="<?php the_permalink() ?>" rel="bookmark" title='Permanent Link to "<?php strip_tags(the_title()); ?>"'>
    <?php the_title(); ?>
    </a></h3>
  <div class="date-header"> <?php printf(__(' von %1$s %2$s ','unnamed'), the_time(__(' j. F Y','unnamed')), get_the_author()) ?>
  </div>
  <?php if (is_search() || (function_exists('is_tag') && is_tag())) {
					the_excerpt();
					} else {
					the_content(sprintf(__("Weiterlesen...", 'unnamed'), the_title('', '', false)));
			} ?>
  <?php link_pages('<p><strong>Seiten:</strong> ', '</p>', 'number'); ?>
  <!-- <?php trackback_rdf(); ?> -->
  <?php if (is_home() || is_archive() || (function_exists('is_tag') && is_tag())) { ?>
  <?php if(function_exists(UTW_ShowTagsForCurrentPost)) { ?>
  <small>
  <?php _e('Tags:','unnamed'); ?>
  <?php UTW_ShowTagsForCurrentPost("commalist") ?>
  .</small>
  <?php } ?>
  <p class="entry-footer">
    <?php edit_post_link(__('Bearbeiten','unnamed'),'<span class="metaedit">','</span>'); ?>
    &nbsp;&nbsp; <span class="metapost">
    <?php the_category(','); ?>
    </span> &nbsp;&nbsp;
    <?php comments_popup_link('<span class="metacmt">'.__('Kommentar hinterlassen','unnamed').'</span>', '<span class="metacmt">1&nbsp;'.__('Kommentar','unnamed').'</span>', '<span class="metacmt">%&nbsp;'.__('Kommentare','unnamed').'</span>', '', '<span class="metacmt">'.__('Geschlossen','unnamed').'</span>'); ?>
  </p>
  <?php } ?>
</div>
<?php  } /* End The Loop */ ?>
<?php /* Insert Paged Navigation */ if (!is_single()) { include (TEMPLATEPATH.'/navigation.php'); } ?>
<?php /* If there is nothing to loop */  } else { $notfound = '1'; ?>
<h2 class="center">
  <?php _e('Nicht gefunden!','unnamed'); ?>
</h2>
<div class="entry">
  <p>
    <?php _e('Oh nein! Du suchst\ etwas, was hier \gerade nicht ist! Nutze bitte die Sidebar oder das Men&uuml;.','unnamed'); ?>
  </p>
</div>
<?php /* End Loop Init  */ } ?>
