timfurnish

Old single-event.php

Feb 18th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.48 KB | None | 0 0
  1. <?php get_header() ?>
  2.  
  3.     <div id="content">
  4.    
  5.        
  6.         <div class="padder">
  7.  
  8.             <?php do_action( 'bp_before_blog_single_post' ) ?>
  9.  
  10.             <div class="page" id="blog-single">
  11.                    
  12.                 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  13.                    
  14.                     <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  15.        
  16.                         <?php
  17.                         global $cc_post_options;
  18.                         $cc_post_options=cc_get_post_meta();
  19.                         $single_class = false;
  20.                         if(isset($cc_post_options) && $cc_post_options['cc_post_template_on'] == 1){
  21.                                
  22.                             switch ($cc_post_options['cc_post_template_type'])
  23.                             {
  24.                             case 'img-left-content-right':
  25.                                 $single_class = 'single-img-left-content-right';
  26.                             break;
  27.                             case 'img-right-content-left':
  28.                                 $single_class = 'single-img-right-content-left';
  29.                             break;
  30.                             case 'img-over-content':
  31.                                 $single_class = 'single-img-over-content';
  32.                             break;
  33.                             case 'img-under-content':
  34.                                 $single_class = 'single-img-under-content';
  35.                             break;
  36.                             default:
  37.                                 $single_class = false;
  38.                             break;
  39.                             }
  40.                         }
  41.                         ?>     
  42.                         <?php if($cc_post_options['cc_post_template_avatar'] != '1') { ?>
  43.                             <div class="author-box">
  44.                                 <?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?>
  45.                                 <?php if(defined('BP_VERSION')){ ?>
  46.                                     <p><?php printf( __( 'by %s', 'cc' ), bp_core_get_userlink( $post->post_author ) ) ?></p>
  47.                                 <?php } ?>
  48.                             </div>
  49.                         <?php } ?>
  50.                        
  51.                         <div class="post-content" style="<?php if($cc_post_options['cc_post_template_avatar'] == '1') { echo 'margin-left:0;'; } ?>">  
  52.                             <?php if ($single_class != false){ ?>
  53.                                 <div class="<?php echo $single_class ?>">
  54.                             <?php } ?>
  55.            
  56.                             <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'cc' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  57.                             <?php if($cc_post_options['cc_post_template_date'] != '1') {?>
  58.                                 <p class="date"><?php the_time('F j, Y') ?> <em><?php _e( 'in', 'cc' ) ?> <?php the_category(', ') ?> <?php if(defined('BP_VERSION')){  printf( __( ' by %s', 'cc' ), bp_core_get_userlink( $post->post_author ) ); }?></em></p>
  59.                             <?php } ?>
  60.            
  61.                             <div class="entry">
  62.                                 <?php if ($single_class == 'single-img-left-content-right' || $single_class == 'single-img-right-content-left' || $single_class == 'single-img-over-content'){ ?>
  63.                                     <?php the_post_thumbnail()?>
  64.                                 <?php } ?>
  65.                                 <?php the_content( __( 'Read the rest of this entry &rarr;', 'cc' ) ); ?>
  66.                                 <?php if ($single_class == 'single-img-under-content'){ ?>
  67.                                     <?php the_post_thumbnail()?>
  68.                                 <?php } ?>     
  69.                                 <div class="clear"></div>
  70.                                 <?php wp_link_pages(array('before' => __( '<p class="cc_pagecount"><strong>Pages:</strong> ', 'cc' ), 'after' => '</p>', 'next_or_number' => 'number')); ?>
  71.                             </div>
  72.                                
  73.                             <div class="clear"></div>
  74.            
  75.                             <?php if($cc_post_options['cc_post_template_tags'] != '1') {?>
  76.                                 <?php $tags = get_the_tags(); if($tags) {  ?>
  77.                                     <p class="postmetadata"><span class="tags"><?php the_tags( __( 'Tags: ', 'cc' ), ', ', '<br />'); ?></span></p>
  78.                                 <?php } ?>
  79.                             <?php } ?>   
  80.                            
  81.                             <?php if($cc_post_options['cc_post_template_comments_info'] != '1') {?>
  82.                                 <p class="postmetadata"><span class="comments"><?php comments_popup_link( __( 'No Comments &#187;', 'cc' ), __( '1 Comment &#187;', 'cc' ), __( '% Comments &#187;', 'cc' ) ); ?></span></p>
  83.                             <?php } ?>
  84.                                    
  85.                             <?php if ($single_class != false){ ?>
  86.                                 </div>
  87.                             <?php } ?> 
  88.                
  89.                             <div class="alignleft"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'cc' ) . '</span> %title' ); ?></div>
  90.                             <div class="alignright"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'cc' ) . '</span>' ); ?></div>
  91.                         </div>
  92.                     </div>
  93.    
  94.                     <?php edit_post_link( __( 'Edit this entry.', 'cc' ), '<p>', '</p>'); ?>
  95.    
  96.                     <?php comments_template(); ?>
  97.        
  98.                     <?php endwhile; else: ?>
  99.                         <p><?php _e( 'Sorry, no posts matched your criteria.', 'cc' ) ?></p>
  100.                     <?php endif; ?>
  101.             </div>
  102.  
  103.             <?php do_action( 'bp_after_blog_single_post' ) ?>
  104.  
  105.         </div><!-- .padder -->
  106.     </div><!-- #content -->
  107.  
  108. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment