Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $more, $k_options;
- get_header();?>
- <div id="main">
- <div id="content">
- <h2><?php /* If this is a category archive */ if (is_category()) { ?>
- Archive for <?php echo single_cat_title(); ?>
- <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
- Archive for <?php the_time('F jS, Y'); ?>
- <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
- Archive for <?php the_time('F, Y'); ?>
- <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
- Archive for <?php the_time('Y'); ?>
- <?php /* If this is a search */ } elseif (is_search()) { ?>
- Search Results
- <?php /* If this is an author archive */ } elseif (is_author()) { ?>
- Author Archive
- <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
- Blog Archives
- <?php } ?></h2>
- <?php
- if (have_posts()) :
- while (have_posts()) : the_post();
- // check if we got a previe picture, and which one should be taken
- // (image resizing with "tim thumb" on? then we can take the big one and resize it)
- $preview_small = get_post_meta($post->ID, "_preview_small", true);
- $preview_medium = get_post_meta($post->ID, "_preview_medium", true);
- $preview_big = get_post_meta($post->ID, "_preview_big", true);
- //defaults:
- $preview = $preview_medium;
- $link_url = $preview_big;
- $lightbox = 'singlepost';
- $link = true;
- //change if necessary:
- // resizing? => take next sized picture
- if ($k_option['general']['tim'] == "1" && $preview_medium == "")
- {
- $preview = $preview_big;
- }
- // no bigpicture? => no lightbox
- if ($preview_big == "") { $lightbox = ''; $link = true; $link_url = get_permalink(); }
- // the kriesi_build_image function used here checks if the image should be resized.
- // the function is located in framework/helper_functions
- $preview = kriesi_build_image(array('url'=>$preview,
- 'height'=> '273',
- 'width'=> '610',
- 'lightbox'=>$lightbox,
- 'link'=>$link,
- 'link_url'=>$link_url
- ));
- ?>
- <div class='entry blogentry'>
- <h3><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
- <?php
- echo $preview;
- the_excerpt();
- ?>
- <a href="<?php echo get_permalink(); ?>" class="more-link">Read more</a>
- </div><!--end entry-->
- <?php endwhile;
- kriesi_pagination();
- else:
- ?>
- <div class="entry">
- <h2>Nothing Found</h2>
- <p>Sorry, no posts matched your criteria.</p>
- </div>
- <?php
- endif;
- ?>
- </div><!-- end content -->
- <?php get_sidebar(); ?>
- </div><!--end main-->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement