Advertisement
Guest User

Untitled

a guest
Oct 13th, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. <?php
  2. global $more, $k_options;
  3. get_header();?>
  4. <div id="main">
  5.  
  6. <div id="content">
  7. <h2><?php /* If this is a category archive */ if (is_category()) { ?>
  8. Archive for <?php echo single_cat_title(); ?>
  9.  
  10. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  11. Archive for <?php the_time('F jS, Y'); ?>
  12.  
  13. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  14. Archive for <?php the_time('F, Y'); ?>
  15.  
  16. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  17. Archive for <?php the_time('Y'); ?>
  18.  
  19. <?php /* If this is a search */ } elseif (is_search()) { ?>
  20. Search Results
  21.  
  22. <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  23. Author Archive
  24.  
  25. <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  26. Blog Archives
  27. <?php } ?></h2>
  28.  
  29. <?php
  30. if (have_posts()) :
  31. while (have_posts()) : the_post();
  32.  
  33. // check if we got a previe picture, and which one should be taken
  34. // (image resizing with "tim thumb" on? then we can take the big one and resize it)
  35. $preview_small = get_post_meta($post->ID, "_preview_small", true);
  36. $preview_medium = get_post_meta($post->ID, "_preview_medium", true);
  37. $preview_big = get_post_meta($post->ID, "_preview_big", true);
  38.  
  39. //defaults:
  40. $preview = $preview_medium;
  41. $link_url = $preview_big;
  42. $lightbox = 'singlepost';
  43. $link = true;
  44. //change if necessary:
  45.  
  46. // resizing? => take next sized picture
  47. if ($k_option['general']['tim'] == "1" && $preview_medium == "")
  48. {
  49. $preview = $preview_big;
  50. }
  51.  
  52. // no bigpicture? => no lightbox
  53. if ($preview_big == "") { $lightbox = ''; $link = true; $link_url = get_permalink(); }
  54. // the kriesi_build_image function used here checks if the image should be resized.
  55. // the function is located in framework/helper_functions
  56.  
  57. $preview = kriesi_build_image(array('url'=>$preview,
  58. 'height'=> '273',
  59. 'width'=> '610',
  60. 'lightbox'=>$lightbox,
  61. 'link'=>$link,
  62. 'link_url'=>$link_url
  63. ));
  64.  
  65. ?>
  66.  
  67. <div class='entry blogentry'>
  68.  
  69. <h3><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
  70. <?php
  71. echo $preview;
  72. the_excerpt();
  73.  
  74. ?>
  75. <a href="<?php echo get_permalink(); ?>" class="more-link">Read more</a>
  76. </div><!--end entry-->
  77. <?php endwhile;
  78.  
  79. kriesi_pagination();
  80. else:
  81. ?>
  82. <div class="entry">
  83. <h2>Nothing Found</h2>
  84. <p>Sorry, no posts matched your criteria.</p>
  85. </div>
  86. <?php
  87. endif;
  88. ?>
  89. </div><!-- end content -->
  90.  
  91. <?php get_sidebar(); ?>
  92.  
  93. </div><!--end main-->
  94.  
  95. <?php get_footer(); ?>
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement