/blog/wp-content/themes/wptouch/single.php
PHP | 71 lines | 64 code | 7 blank | 0 comment | 13 complexity | 0aba165b5107bdf6c74551b7be94262f MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
- <?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">
- <a class="sh2" href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( "Permanent Link to ", "wptouch" ); ?><?php the_title_attribute(); ?>"><?php the_title(); ?></a>
- <div class="single-post-meta-top"><?php echo get_the_time(get_option('date_format')) . ' @ ' . get_the_time(); ?> › <?php the_author() ?><br />
- <!-- Let's check for DISQUS... we need to skip to a different div if it's installed and active -->
- <?php if ('open' == $post->comment_status) : ?>
- <?php if (function_exists('dsq_comments_template')) { ?>
- <a href="#dsq-add-new-comment">↓ <?php _e( "Skip to comments", "wptouch" ); ?></a>
- <?php } elseif (function_exists('id_comments_template')) { ?>
- <a href="#idc-container-parent">↓ <?php _e( "Skip to comments", "wptouch" ); ?></a>
- <?php } elseif (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 $wptouch_settings['style-text-size']; ?> <?php echo $wptouch_settings['style-text-justify']; ?>">
- <?php the_content(); ?>
- </div>
-
- <!-- Categories and Tags post footer -->
- <div class="single-post-meta-bottom">
- <?php wp_link_pages(array(
- 'before' => '<div class="post-page-nav">' . __( "Article Pages", "wptouch" ) . ': ',
- 'after' => '</div>', 'nextpagelink' => ' »', 'previouspagelink' => '« ')); ?>
- <?php _e( "Categories", "wptouch" ); ?>: <?php if (the_category(', ')) the_category(); ?>
- <?php if (function_exists('get_the_tags')) the_tags('<br />' . __( 'Tags', 'wptouch' ) . ': ', ', ', ''); ?>
- </div>
- <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(); ?>