PageRenderTime 693ms CodeModel.GetById 10ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/themes/fork_in_the_road_lae044/archive.php

https://bitbucket.org/aqge/deptandashboard
PHP | 214 lines | 179 code | 35 blank | 0 comment | 29 complexity | 95f2237c093a7e44352a980304f4cedb MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1
  1. <?php get_header(); ?>
  2. <?php
  3. $lcmp_page_head = <<<TXT
  4. <div class="contentLayout">
  5. <div class="sidebar1">
  6. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  7. </div>
  8. <div class="content">
  9. TXT;
  10. $lcmp_is_left = strpos($lcmp_page_head,"sidebar");
  11. if($lcmp_is_left===FALSE){
  12. $lcmp_rightdefault = 'default';
  13. $lcmp_leftdefault = 'notdefault';
  14. }else{
  15. $lcmp_leftdefault = 'default';
  16. $lcmp_rightdefault = 'notdefault';
  17. }
  18. ?>
  19. <div class="contentLayout">
  20. <div class="kelompok_berita">
  21. <?php is_tag(); ?>
  22. <?php if (have_posts()) : ?>
  23. <div class="Post">
  24. <div class="Post-body">
  25. <div class="Post-inner article">
  26. <div class="PostContent">
  27. <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  28. <?php /* If this is a category archive */ if (is_category()) { ?>
  29. <h2 class="pagetitle"><?php printf(__('Archive for the &#8216;%s&#8217; Category', 'kubrick'), single_cat_title('', false)); ?></h2>
  30. <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  31. <h2 class="pagetitle"><?php printf(__('Posts Tagged &#8216;%s&#8217;', 'kubrick'), single_tag_title('', false) ); ?></h2>
  32. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  33. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_time(__('F jS, Y', 'kubrick'))); ?></h2>
  34. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  35. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Monthly archive page', 'kubrick'), get_the_time(__('F, Y', 'kubrick'))); ?></h2>
  36. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  37. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Yearly archive page', 'kubrick'), get_the_time(__('Y', 'kubrick'))); ?></h2>
  38. <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  39. <h2 class="pagetitle"><?php _e('Author Archive', 'kubrick'); ?></h2>
  40. <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  41. <h2 class="pagetitle"><?php _e('Blog Archives', 'kubrick'); ?></h2>
  42. <?php } ?>
  43. <?php
  44. $prev_link = get_previous_posts_link(__('Newer Entries &raquo;', 'kubrick'));
  45. $next_link = get_next_posts_link(__('&laquo; Older Entries', 'kubrick'));
  46. ?>
  47. <?php if ($prev_link || $next_link): ?>
  48. <div class="navigation">
  49. <div class="alignleft"><?php echo $next_link; ?></div>
  50. <div class="alignright"><?php echo $prev_link; ?></div>
  51. </div>
  52. <?php endif; ?>
  53. </div>
  54. <div class="cleared"></div>
  55. </div>
  56. </div>
  57. </div>
  58. <?php while (have_posts()) : the_post(); ?>
  59. <div class="Post">
  60. <div class="Post-body">
  61. <div class="Post-inner article">
  62. <h2 class="PostHeaderIcon-wrapper">
  63. <span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
  64. <?php the_title(); ?>
  65. </a></span>
  66. </h2>
  67. <?php $icons = array(); ?>
  68. <?php if (!is_page()) : ?>
  69. <?php ob_start(); ?>
  70. <img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="18" height="18" alt="PostDateIcon" />
  71. <?php the_time(__('F jS, Y', 'kubrick')) ?>
  72. <?php $icons[] = ob_get_clean(); ?>
  73. <?php endif; ?>
  74. <?php if (!is_page()) : ?>
  75. <?php ob_start(); ?>
  76. <img src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="18" height="18" alt="PostAuthorIcon" />
  77. <?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a>
  78. <?php $icons[] = ob_get_clean(); ?>
  79. <?php endif; ?>
  80. <?php if (current_user_can( 'edit_post', $post->ID )) : ?><?php ob_start(); ?>
  81. <img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="20" height="20" alt="PostEditIcon" />
  82. <?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
  83. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  84. <?php if (0 != count($icons)): ?>
  85. <div class="PostHeaderIcons metadata-icons">
  86. <?php echo implode(' | ', $icons); ?>
  87. </div>
  88. <?php endif; ?>
  89. <div class="PostContent">
  90. <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
  91. </div>
  92. <div class="cleared"></div>
  93. <?php ob_start(); ?>
  94. <?php $icons = array(); ?>
  95. <?php if (!is_page()) : ?>
  96. <?php ob_start(); ?>
  97. <img src="<?php bloginfo('template_url'); ?>/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon" />
  98. <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
  99. <?php $icons[] = ob_get_clean(); ?>
  100. <?php endif; ?>
  101. <?php if (!is_page() && get_the_tags()) : ?><?php ob_start(); ?>
  102. <img src="<?php bloginfo('template_url'); ?>/images/PostTagIcon.png" width="18" height="18" alt="PostTagIcon" />
  103. <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
  104. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  105. <?php if (!is_page() && !is_single()) : ?><?php ob_start(); ?>
  106. <img src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon" />
  107. <?php comments_popup_link(__('No Comments &#187;', 'kubrick'), __('1 Comment &#187;', 'kubrick'), __('% Comments &#187;', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
  108. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  109. <?php if (0 != count($icons)): ?>
  110. <div class="PostFooterIcons metadata-icons">
  111. <?php echo implode(' | ', $icons); ?>
  112. </div>
  113. <?php endif; ?>
  114. <?php $metadataContent = ob_get_clean(); ?>
  115. <?php if (trim($metadataContent) != ''): ?>
  116. <div class="PostMetadataFooter">
  117. <?php echo $metadataContent; ?>
  118. </div>
  119. <?php endif; ?>
  120. </div>
  121. </div>
  122. </div>
  123. <?php endwhile; ?>
  124. <?php if ($prev_link || $next_link): ?>
  125. <div class="Post">
  126. <div class="Post-body">
  127. <div class="Post-inner article">
  128. <div class="PostContent">
  129. <div class="navigation">
  130. <div class="alignleft"><?php echo $next_link; ?></div>
  131. <div class="alignright"><?php echo $prev_link; ?></div>
  132. </div>
  133. </div>
  134. <div class="cleared"></div>
  135. </div>
  136. </div>
  137. </div>
  138. <?php endif; ?>
  139. <?php else : ?>
  140. <div class="Post">
  141. <div class="Post-body">
  142. <div class="Post-inner article">
  143. <div class="PostContent">
  144. <?php
  145. if ( is_category() ) { // If this is a category archive
  146. printf("<h2 class='center'>".__("Sorry, but there aren't any posts in the %s category yet.", "kubrick").'</h2>', single_cat_title('',false));
  147. } else if ( is_date() ) { // If this is a date archive
  148. echo('<h2>'.__("Sorry, but there aren't any posts with this date.", "kubrick").'</h2>');
  149. } else if ( is_author() ) { // If this is a category archive
  150. $userdata = get_userdatabylogin(get_query_var('author_name'));
  151. printf("<h2 class='center'>".__("Sorry, but there aren't any posts by %s yet.", "kubrick")."</h2>", $userdata->display_name);
  152. } else {
  153. echo("<h2 class='center'>".__('No posts found.', 'kubrick').'</h2>');
  154. }
  155. if(function_exists('get_search_form')) get_search_form();
  156. ?>
  157. </div>
  158. <div class="cleared"></div>
  159. </div>
  160. </div>
  161. </div>
  162. <?php endif; ?>
  163. </div>
  164. <?php
  165. global $lcmp_sidebarloc;
  166. if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
  167. <div class="sidebar1">
  168. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  169. </div>
  170. <?php } ?>
  171. </div>
  172. <div class="cleared"></div>
  173. <?php get_footer(); ?>