web/wp-content/plugins/wptouch/themes/default/page.php
branchwordpress
changeset 123 561aa6d282f6
equal deleted inserted replaced
112:fb7cd02b9848 123:561aa6d282f6
       
     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  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       
     4  	<div class="post content" id="post-<?php the_ID(); ?>">
       
     5 	 <div class="page">
       
     6 		<div class="page-title-icon">		
       
     7 			<?php
       
     8 			$mypages = bnc_wp_touch_get_pages();
       
     9 			
       
    10 			if ( isset( $mypages[get_the_ID()]) ) {
       
    11 				$icon_name = $mypages[get_the_ID()]['icon'];
       
    12 				if ( file_exists( compat_get_plugin_dir( 'wptouch' ) . '/images/icon-pool/' . $icon_name ) ) {
       
    13 					$image = compat_get_plugin_url( 'wptouch' ) . '/images/icon-pool/' . $icon_name;	
       
    14 				} else {
       
    15 					$image = compat_get_upload_url() . '/wptouch/custom-icons/' . $icon_name;
       
    16 				}
       
    17 				echo('<img class="pageicon" src="' . $image . '" alt="icon" />'); 
       
    18 			} else {
       
    19 				echo ('<img class="pageicon" src="' . compat_get_plugin_url( 'wptouch' ) . '/images/icon-pool/Default.png" alt="pageicon" />');
       
    20 			}
       
    21 			
       
    22 			?> 
       
    23 		</div>
       
    24 			<h2><?php the_title(); ?></h2>
       
    25 	</div>
       
    26 	      
       
    27 <div class="clearer"></div>
       
    28   
       
    29     <div id="entry-<?php the_ID(); ?>" class="pageentry <?php echo $wptouch_settings['style-text-size']; ?> <?php echo $wptouch_settings['style-text-justify']; ?>">
       
    30         <?php if (!is_page('archives') || !is_page('links')) { the_content(); } ?>  
       
    31 
       
    32 <?php if (is_page('archives')) {
       
    33 // If you have a page named 'Archives', the WP tag cloud will be displayed
       
    34 ?>
       
    35           </div>
       
    36 	</div>
       
    37 
       
    38 	<h3 class="result-text"><?php _e( "Tag Cloud", "wptouch" ); ?></h3>
       
    39 		<div id="wptouch-tagcloud" class="post">
       
    40 			<?php wp_tag_cloud('smallest=11&largest=18&unit=px&orderby=count&order=DESC'); ?>
       
    41 		</div>
       
    42 	</div>
       
    43 </div>
       
    44 
       
    45 	<h3 class="result-text"><?php _e( "Monthly Archives", "wptouch" ); ?></h3>
       
    46 		<div id="wptouch-archives" class="post">
       
    47 			<?php wp_get_archives(); // This will print out the default WordPress Monthly Archives Listing. ?> 
       
    48 		</div>
       
    49 		  
       
    50 <?php } ?><!-- end if archives page-->
       
    51             
       
    52 <?php if (is_page('photos')) {
       
    53 // If you have a page named 'Photos', and the FlickrRSS activated and configured your photos will be displayed here.
       
    54 // It will override other number of images settings and fetch 20 from the ID.
       
    55 ?>
       
    56 	<?php if (function_exists('get_flickrRSS')) { ?>
       
    57 		<div id="wptouch-flickr">
       
    58 			<?php get_flickrRSS(20); ?>
       
    59 		</div>
       
    60 	<?php } ?>
       
    61 <?php } ?><!-- end if photos page-->
       
    62 		</div>
       
    63 	</div>   
       
    64            		
       
    65 <?php if (is_page('links')) {
       
    66 // If you have a page named 'Links', a default listing of your Links will be displayed here.
       
    67 ?>
       
    68 		</div>
       
    69 	</div>          
       
    70 
       
    71 		<div id="wptouch-links">
       
    72 			<?php wp_list_bookmarks('title_li=&category_before=&category_after='); ?>
       
    73 		</div>
       
    74 <?php } ?><!-- end if links page-->    	
       
    75 	
       
    76 		<?php wp_link_pages( __('Pages in this article: ', 'wptouch'), '', 'number'); ?>
       
    77 
       
    78 <!--If comments are enabled for pages in the WPtouch admin, and 'Allow Comments' is checked on a page-->
       
    79 	<?php if (bnc_is_page_coms_enabled() && 'open' == $post->comment_status) : ?>
       
    80 		<?php comments_template(); ?>
       
    81   	<?php endif; ?>
       
    82 <!--end comment status-->
       
    83     <?php endwhile; ?>	
       
    84 
       
    85 <?php else : ?>
       
    86 
       
    87 	<div class="result-text-footer">
       
    88 		<?php wptouch_core_else_text(); ?>
       
    89 	</div>
       
    90 
       
    91  <?php endif; ?>
       
    92 
       
    93 <!-- If it's ajax, we're not bringing in footer.php -->
       
    94 <?php global $is_ajax; if (!$is_ajax) get_footer(); ?>