<?php global $is_ajax; $is_ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']); if (!$is_ajax) get_header(); ?> <?php $wptouch_settings = bnc_wptouch_get_settings(); ?> <div class="content" id="content<?php echo md5($_SERVER['REQUEST_URI']); ?>"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <?php if ( $post->post_parent ) { ?><a class="sh2" href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> » <?php } ?><?php the_title(); ?> <?php if ( comments_open() ) : ?> <?php if (isset($post->comment_count) && $post->comment_count == 0) { ?> <a href="#respond">↓ <?php _e( "Leave a comment", "wptouch" ); ?></a> <?php } elseif (isset($post->comment_count) && $post->comment_count > 0) { ?> <a href="#com-head">↓ <?php _e( "Skip to comments", "wptouch" ); ?></a> <?php } ?> <?php endif; ?> </div> <div class="clearer"></div> </div> <div class="post" id="post-<?php the_ID(); ?>"> <div id="singlentry" class="<?php echo sanitize_html_class( $wptouch_settings['style-text-size'] ); ?> <?php echo sanitize_html_class( $wptouch_settings['style-text-justify'] ); ?>"> <p><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'auto' ); ?></a></p> <p class="caption"></p></p><?php if ( !empty($post->post_excerpt) ) the_excerpt(); ?></p> <p class="image-description"><?php if ( !empty($post->post_content) ) the_content(); ?></p> <?php if ( $post->post_parent ) : ?> <div class="navigation"> <p class="alignleft"><?php previous_image_link() ?></p> <p class="alignright"><?php next_image_link() ?></p> </div> <?php endif; ?> </div> <!-- Categories and Tags post footer --> <ul id="post-options"> <?php $prevPost = get_previous_post(); if ($prevPost) { ?> <li><a href="<?php $prevPost = get_previous_post(false); $prevURL = get_permalink($prevPost->ID); echo $prevURL; ?>" id="oprev"></a></li> <?php } ?> <li><a href="mailto:?subject=<?php bloginfo('name'); ?>- <?php the_title();?>&body=<?php _e( "Check out this post:", "wptouch" ); ?>%20<?php the_permalink() ?>" onclick="return confirm('<?php _e( "Mail a link to this post?", "wptouch" ); ?>');" id="omail"></a></li> <li><a href="javascript:return false;" onclick="wptouch_toggle_text();" id="otext"></a></li> <?php $nextPost = get_next_post(); if ($nextPost) { ?> <li><a href="<?php $nextPost = get_next_post(false); $nextURL = get_permalink($nextPost->ID); echo $nextURL; ?>" id="onext"></a></li> <?php } ?> </ul> </div> <!-- Let's rock the comments --> <?php comments_template(); ?> <?php endwhile; else : ?> <!-- Dynamic test for what page this is. A little redundant, but so what? --> <div class="result-text-footer"> <?php wptouch_core_else_text(); ?> </div> <?php endif; ?> </div> <!-- Do the footer things --> <?php global $is_ajax; if (!$is_ajax) get_footer(); ?>