Guest User

Untitled

a guest
Apr 26th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.47 KB | None | 0 0
  1. <?php $postType = 'text';
  2. if('note' == $post->post_type) $postType = 'text';
  3. if('video' == $post->post_type) $postType = 'video';
  4. if('quote' == $post->post_type) $postType = 'quote';
  5. if('photo' == $post->post_type) $postType = 'photo';
  6. if('customlink' == $post->post_type) $postType = 'link';
  7. if('audio' == $post->post_type) $postType = 'audio';
  8. ?>
  9.  
  10. <div class="entry<?php echo(" $postType"); ?>">
  11.     <div class="entry-top"></div>
  12.  
  13.     <div class="post clearfix">
  14.         <div class="content clearfix">
  15.            
  16.             <?php $custom = get_post_custom($post->ID);
  17.             $link = ''; ?>
  18.            
  19.             <?php if ($postType == 'link') $link = isset($custom["customlink"][0]) ? $custom["customlink"][0] : '';
  20.             if ($link == '') $link = get_permalink(); ?>
  21.            
  22.             <a href="<?php if(isset($post->post_type)) echo(get_bloginfo('url') . '?post_type=' . $post->post_type); else echo('#'); ?>" class="bubble"><?php the_title(); ?></a>
  23.            
  24.             <h<?php if(!is_single()) echo('2'); else echo('1'); ?> class="title"><?php if(!is_single()) echo('<a href="'. $link .'">');?><?php the_title(); ?><?php if(!is_single()) echo('</a>'); ?></h<?php if(!is_single()) echo('2'); else echo('1'); ?>>
  25.             <span class="date"><?php the_time('M d'); ?></span>
  26.            
  27.             <div class="clear"></div>
  28.            
  29.             <?php $thumb = '';
  30.             if ($postType == 'text' || $postType == 'photo') {
  31.                 if ($postType == 'text') { $width = 550; $height = 260; }
  32.                 if ($postType == 'photo') { $width = 445; $height = 299; }
  33.                 $classtext = '';
  34.                 $titletext = get_the_title();
  35.                
  36.                 $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,true,'thumb');
  37.                 $thumb = $thumbnail["thumb"];
  38.             }; ?>
  39.            
  40.            
  41.             <?php if (!is_single()) { ?>
  42.                 <?php if ($thumb <> '' && $postType == 'text' && get_option('lightbright_thumbnails_index') == 'on') { ?>
  43.                     <div class="small-thumb">
  44.                         <a href="<?php echo $thumbnail["fullpath"]; ?>" class="fancybox">
  45.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  46.                         </a>
  47.                     </div>
  48.                 <?php }; ?>
  49.                
  50.                 <?php if ($thumb <> '' && $postType == 'photo' && get_option('lightbright_thumbnails_index') == 'on') { ?>
  51.                     <div class="big-thumb">
  52.                         <a href="<?php echo $thumbnail["fullpath"]; ?>" class="fancybox">
  53.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  54.                             <span class="overlay"></span>
  55.                         </a>
  56.                     </div>
  57.                 <?php }; ?>
  58.             <?php } else { ?>
  59.                 <?php if (get_option('lightbright_thumbnails') == 'on') { ?>
  60.                     <?php if ($thumb <> '' && $postType == 'text') { ?>
  61.                         <div class="small-thumb">
  62.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  63.                             <span class="overlay"></span>
  64.                         </div>
  65.                     <?php }; ?>
  66.                    
  67.                     <?php if ($thumb <> '' && $postType == 'photo') { ?>
  68.                         <div class="big-thumb">
  69.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  70.                             <span class="overlay"></span>
  71.                         </div>
  72.                     <?php }; ?>
  73.                 <?php }; ?>
  74.             <?php }; ?>
  75.            
  76.            
  77.             <?php if ($postType == 'quote') { ?>
  78.                 <blockquote>
  79.                     <p><?php $quote = isset($custom["quote"][0]) ? $custom["quote"][0] : ''; echo $quote; ?>”</p>
  80.                     <span class="quote_bg"></span>
  81.                 </blockquote>
  82.             <?php }; ?>
  83.            
  84.             <?php if ($postType == 'video') { ?>
  85.                 <div class="video-block">
  86.                     <?php $video = isset($custom["video"][0]) ? $custom["video"][0] : '';
  87.                     $video_width = isset($custom["video_width"][0]) ? $custom["video_width"][0] : '424';
  88.                     $video_height = isset($custom["video_height"][0]) ? $custom["video_height"][0] : '264'; ?>
  89.                    
  90.                     <?php $video = preg_replace("/height=\"[0-9]*\"/", "height=$video_height", $video);
  91.                     $video = preg_replace("/width=\"[0-9]*\"/", "width=$video_width", $video);
  92.                     echo $video; ?>
  93.                 </div> <!-- end .video-block -->
  94.             <?php }; ?>
  95.            
  96.             <?php if ($postType == 'audio') { ?>
  97.                 <?php $audio = isset($custom["audio"][0]) ? $custom["audio"][0] : ''; ?>
  98.                 <div class="audio-block">
  99.                     <?php $postID = $post->ID; ?>              
  100.                     <p id="audioplayer_<?php echo($postID); ?>">Mp3 file</p>  
  101.                     <script type="text/javascript">  
  102.                         AudioPlayer.embed("audioplayer_<?php echo $postID; ?>", {soundFile: "<?php echo $audio; ?>"});
  103.                     </script>  
  104.                    
  105.                 </div> <!-- end .audio-block -->
  106.             <?php }; ?>
  107.            
  108.             <?php if ($postType == 'video') echo('<div class="video-text">'); ?>
  109.  
  110.                 <?php if (get_option('lightbright_blog_style') == 'on' || is_single()) the_content(""); else { ?>
  111.                     <p><?php truncate_post(400); ?></p>
  112.                 <?php }; ?>
  113.            
  114.             <?php if ($postType == 'video') echo('</div> <!-- end .video-text -->'); ?>
  115.            
  116.             <?php if (is_single()) { ?>
  117.                 <?php wp_link_pages(array('before' => '<p><strong>'.__('Pages','LightBright').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  118.                 <?php edit_post_link(__('Edit this page','LightBright')); ?>
  119.             <?php }; ?>
  120.            
  121.         </div> <!-- end .content -->
  122.        
  123.         <div class="entry-bottom-top"></div>
  124.    
  125.         <div class="entry-meta clearfix">
  126.             <p class="meta"><span class="main"><?php _e('Posted by','LightBright');?> <?php the_author_posts_link(); ?>
  127.             <?php $taxonomyName = 'custom-tax';
  128.             if ($postType == 'video') $taxonomyName = 'custom-tax2';
  129.             if ($postType == 'quote') $taxonomyName = 'custom-tax3';
  130.             if ($postType == 'photo') $taxonomyName = 'custom-tax4';
  131.             if ($postType == 'customlink') $taxonomyName = 'custom-tax5';
  132.             if ($postType == 'audio') $taxonomyName = 'custom-tax6'; ?>
  133.             <?php echo get_the_term_list( $post->ID, $taxonomyName, __(' in ','LightBright'),', ' ); ?>
  134.  
  135.             </span> <span class="comment-count"><?php comments_popup_link('0','1','%'); ?></span></p>
  136.             <?php if(!is_single()) { ?>
  137.                 <a href="<?php the_permalink(); ?>" class="readmore"><span><?php _e('read more','LightBright'); ?></span></a>
  138.             <?php }; ?>
  139.         </div> <!-- end .entry-meta -->    
  140.        
  141.     </div> <!-- end .main -->
  142.    
  143.     <div class="entry-bottom"></div>
  144. </div> <!-- end .entry -->
  145.  
  146. <?php if (get_option('lightbright_468_enable') == 'on') { ?>
  147.     <?php if(get_option('lightbright_468_adsense') <> '') echo(get_option('lightbright_468_adsense'));
  148.     else { ?>
  149.         <a href="<?php echo(get_option('lightbright_468_url')); ?>"><img src="<?php echo(get_option('lightbright_468_image')); ?>" alt="468 ad" class="foursixeight" /></a>
  150.     <?php } ?> 
  151. <?php } ?>
  152.  
  153. <?php if (get_option('lightbright_show_postcomments') == 'on') comments_template('', true); ?>
Add Comment
Please, Sign In to add comment