PageRenderTime 40ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/blog/wp-content/themes/wptouch/single.php

https://bitbucket.org/sergiohzlz/reportaprod
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
  1. <?php global $is_ajax; $is_ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']); if (!$is_ajax) get_header(); ?>
  2. <?php $wptouch_settings = bnc_wptouch_get_settings(); ?>
  3. <div class="content" id="content<?php echo md5($_SERVER['REQUEST_URI']); ?>">
  4. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  5. <div class="post">
  6. <a class="sh2" href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( "Permanent Link to ", "wptouch" ); ?><?php the_title_attribute(); ?>"><?php the_title(); ?></a>
  7. <div class="single-post-meta-top"><?php echo get_the_time(get_option('date_format')) . ' @ ' . get_the_time(); ?> &rsaquo; <?php the_author() ?><br />
  8. <!-- Let's check for DISQUS... we need to skip to a different div if it's installed and active -->
  9. <?php if ('open' == $post->comment_status) : ?>
  10. <?php if (function_exists('dsq_comments_template')) { ?>
  11. <a href="#dsq-add-new-comment">&darr; <?php _e( "Skip to comments", "wptouch" ); ?></a>
  12. <?php } elseif (function_exists('id_comments_template')) { ?>
  13. <a href="#idc-container-parent">&darr; <?php _e( "Skip to comments", "wptouch" ); ?></a>
  14. <?php } elseif (isset($post->comment_count) && $post->comment_count == 0) { ?>
  15. <a href="#respond">&darr; <?php _e( "Leave a comment", "wptouch" ); ?></a>
  16. <?php } elseif (isset($post->comment_count) && $post->comment_count > 0) { ?>
  17. <a href="#com-head">&darr; <?php _e( "Skip to comments", "wptouch" ); ?></a>
  18. <?php } ?>
  19. <?php endif; ?>
  20. </div>
  21. <div class="clearer"></div>
  22. </div>
  23. <div class="post" id="post-<?php the_ID(); ?>">
  24. <div id="singlentry" class="<?php echo $wptouch_settings['style-text-size']; ?> <?php echo $wptouch_settings['style-text-justify']; ?>">
  25. <?php the_content(); ?>
  26. </div>
  27. <!-- Categories and Tags post footer -->
  28. <div class="single-post-meta-bottom">
  29. <?php wp_link_pages(array(
  30. 'before' => '<div class="post-page-nav">' . __( "Article Pages", "wptouch" ) . ': ',
  31. 'after' => '</div>', 'nextpagelink' => ' &raquo;', 'previouspagelink' => '&laquo; ')); ?>
  32. <?php _e( "Categories", "wptouch" ); ?>: <?php if (the_category(', ')) the_category(); ?>
  33. <?php if (function_exists('get_the_tags')) the_tags('<br />' . __( 'Tags', 'wptouch' ) . ': ', ', ', ''); ?>
  34. </div>
  35. <ul id="post-options">
  36. <?php $prevPost = get_previous_post(); if ($prevPost) { ?>
  37. <li><a href="<?php $prevPost = get_previous_post(false); $prevURL = get_permalink($prevPost->ID); echo $prevURL; ?>" id="oprev"></a></li>
  38. <?php } ?>
  39. <li><a href="mailto:?subject=<?php
  40. 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>
  41. <li><a href="javascript:return false;" onclick="wptouch_toggle_text();" id="otext"></a></li>
  42. <?php $nextPost = get_next_post(); if ($nextPost) { ?>
  43. <li><a href="<?php $nextPost = get_next_post(false); $nextURL = get_permalink($nextPost->ID); echo $nextURL; ?>" id="onext"></a></li>
  44. <?php } ?>
  45. </ul>
  46. </div>
  47. <!-- Let's rock the comments -->
  48. <?php comments_template(); ?>
  49. <?php endwhile; else : ?>
  50. <!-- Dynamic test for what page this is. A little redundant, but so what? -->
  51. <div class="result-text-footer">
  52. <?php wptouch_core_else_text(); ?>
  53. </div>
  54. <?php endif; ?>
  55. </div>
  56. <!-- Do the footer things -->
  57. <?php global $is_ajax; if (!$is_ajax) get_footer(); ?>