File: /home/nudepix.eu/public_html/wp-content/themes/cpp/index.php
<?php get_header();
global $page, $paged;
?>
<div id="wrapper" class="clearfix">
<?php if((imwb_interest_get_option('homesidebar') == '1' || imwb_interest_get_option('homesidebar') == '2') && $page < 2 && $paged < 2) get_sidebar(); ?>
<?php if ( is_home() && imwb_interest_get_option('homepostorder') == '1') { query_posts(array('orderby' => 'rand'));} ?>
<?php while(have_posts()): the_post();
$postImage = imwb_interest_get_the_image(Array('echo' => false));
preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', $postImage, $matches );
$postImageSrc = $matches[1][0];
?>
<div class="tack">
<?php if(imwb_interest_get_option('commentbtn') == '1' || imwb_interest_get_option('likebtn') == '1' || imwb_interest_get_option('repinbtn') == '1') {?>
<div class="actions">
<?php if(imwb_interest_get_option('repinbtn') == '1') { ?>
<div class="left"><a class="button" href="http://pinterest.com/pin/create/bookmarklet/?media=<?php echo urlencode($postImageSrc)?>&url=<?php urlencode(the_permalink())?>&title=<?php echo urlencode(the_title('','',false))?>&is_video=false&description=<?php echo urlencode(the_title('','',false))?>" <?php echo imwb_interest_get_option('pinopen') == 'Y' ? "target='_blank'" : "" ?>><em></em>Repin</a> </div>
<?php }
if(imwb_interest_get_option('likebtn') == '1') { ?>
<?php if(imwb_interest_get_option('sneakylikebtn') == '1') { ?>
<div id="facebook_like_button_holder" class="left">
<iframe src="//www.facebook.com/plugins/like.php?href=<?php urlencode(the_permalink())?>&send=false&layout=button_count&width=450&show_faces=false&action=like&colorscheme=light&font=verdana&height=21&appId=208343952536987" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
<div id="fake_facebook_button" class="button likebtn"><em></em><strong>Like</strong></div>
</div>
<?php } else { ?>
<div class="left"><a class="button likebtn" onclick="window.open(this.href, 'popupwindow', 'width=655,height=380,scrollbars,resizable'); return false;" href="http://www.facebook.com/sharer.php?u=<?php urlencode(the_permalink())?>&t=<?php echo urlencode(the_title('','',false))?>" target='_blank'><em></em>Like</a> </div>
<?php } ?>
<?php } ?>
<?php if(imwb_interest_get_option('commentbtn') == '1') { ?>
<div class="left"><a class="button commentbtn" href="<?php comments_link(); ?>"><em></em>Comment</a></div>
<?php } ?>
</div>
<?php
}
echo '<div class="tackHolder">';
echo $postImage
?>
</div>
<p class="description">
<?php
if(imwb_interest_get_option('postcontent') == 'F') {
$content = get_the_content();
//$content = do_shortcode( $content );
$content = apply_filters('imwb_interest_filter_content', $content, '' );
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
}
else if(imwb_interest_get_option('postcontent') == 'E')
echo do_shortcode(the_excerpt());
else if(imwb_interest_get_option('postcontent') == 'T')
echo do_shortcode(the_title());
else
echo substr(trim(strip_tags(do_shortcode(get_the_content()))), 0,imwb_interest_get_option('postchars')).' [...]';
?>
</p>
<?php if(imwb_interest_get_option('commentstats') == '1') { ?>
<p class="stats"><a href="<?php comments_link(); ?>"><?php comments_number("no comments", "one comment", "% comments"); ?></a></p>
<?php } ?>
<?php if(imwb_interest_get_option('showcomments') == '1') {
$count = 1;
?>
<div class="commentlist">
<?php
$args = array('status' => 'approve','number' => '5','post_id' => get_the_ID());
$comments = get_comments($args);
foreach($comments as $comment) {
?>
<div class="comment clearfix">
<?php echo get_avatar( $comment, 30)?>
<p><a href="<?php the_permalink()?>#comments" class="author"><?php echo $comment->comment_author . '</a> ' . strip_tags($comment->comment_content, '<a> <p> <strong>') ?></p>
</div>
<?php
if(imwb_interest_get_option('commentcount') > 0 && $count >= imwb_interest_get_option('commentcount'))
break;
$count++;
} ?>
</div>
<?php } ?>
</div>
<?php endwhile;?>
</div>
<?php get_footer(); ?>