<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<div id="content_left">
<div id="recent_posts">
<h3><?php _e('Recent posts', SHORTNAME) ?></h3>
<?php if (have_posts()) : ?>
<?php $i=0; while (have_posts()) : the_post(); $i++; ?>
<div class="recent_post" id="post-<?php the_ID(); ?>">
<div class="post_top">
<div class="post_info">
<div class="post_title">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', SHORTNAME ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="post_top_data">
<p class="post_author">
<?php obwp_posted_on(); ?>
<?php if ( comments_open() ) : ?>
<span class="post_comm"> |
<?php comments_popup_link( __( 'Leave a Reply', SHORTNAME ), __( '1 Comment', SHORTNAME ), __( '% Comments', SHORTNAME ) ); ?>
</span>
<?php endif; ?>
</p>
<p class="post_cats"><?php _e('Category :', SHORTNAME) ?> <span><?php the_category(', ') ?></span></p>
<?php the_tags('<p class="post_tags">' . __('Tags:', SHORTNAME) . ' <span>', ', ', '</span></p>'); ?>
</div>
</div>
<?php if ( has_post_thumbnail()) : ?>
<div class="post_thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
<?php the_post_thumbnail( 'recent-thumb', array('title' => get_the_title()) ); ?>
</a>
</div>
<?php endif; ?>
</div>
<div class="entry">
<?php if($i==1 || $i==2) : ?>
<?php
$ad_under_title_468_60 = obwp_get_meta(SHORTNAME."_ad_under_title_468_60");
if(!empty($ad_under_title_468_60))
{
echo '<div class="banner">'.$ad_under_title_468_60.'</div>';
}
?>
<? endif; ?>
<?php the_content( __('→ Continue', SHORTNAME),FALSE,''); ?>
</div>
</div>
<?php endwhile; ?>
<?php
$next_page = get_next_posts_link( __('Previous', SHORTNAME));
$prev_pages = get_previous_posts_link( __('Next', SHORTNAME));
if(!empty($next_page) || !empty($prev_pages)) :
?>
<!-- navigation -->
<div class="navigation">
<?php if(!function_exists('wp_pagenavi')) : ?>
<div class="alignleft"><?php echo $next_page; ?></div>
<div class="alignleft"><?php echo $prev_pages; ?></div>
<?php else : wp_pagenavi(); endif; ?>
</div>
<!-- /navigation -->
<?php endif; ?>
<?php else : ?>
<h2 class="center"><?php _e('Not Found', SHORTNAME) ?></h2>
<p class="center"><?php _e("Sorry, but you are looking for something that isn't here.", SHORTNAME) ?></p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
</div>
</div>
<div id="content_right">
<div id="post_tabs">
<ul id="post_tabs_links">
<li><a href="#" rel="post_tabs_item_rated" class="selected"><?php _e('Top <span>Rated</span>', SHORTNAME) ?></a></li>
<li><a href="#" rel="post_tabs_item_commented"><?php _e('Most <span>Commented</span>', SHORTNAME) ?></a></li>
<li class="last"><a href="#" rel="post_tabs_item_viewed"><?php _e('Most <span>Viewed</span>', SHORTNAME) ?></a></li>
</ul>
<ul class="post_tabs_item" id="post_tabs_item_rated">
<?php if (function_exists('get_highest_rated')): ?>
<?php theme_get_highest_rated('post',0,5); ?>
<?php endif; ?>
</ul>
<ul class="post_tabs_item" id="post_tabs_item_commented">
<?php obwp_list_most_commented(5); ?>
</ul>
<ul class="post_tabs_item" id="post_tabs_item_viewed">
<?php if (function_exists('get_most_viewed')): ?>
<?php theme_get_most_viewed('post', 5); ?>
<?php endif; ?>
</ul>
<script type="text/javascript">
var post_tabs=new ddtabcontent("post_tabs")
post_tabs.setpersist(true)
post_tabs.setselectedClassTarget("link")
post_tabs.init()
</script>
</div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>