gnopaste

gnopaste database reset @ 19/03/2013

Name
Anonymous
Scriptlanguage
Plain Text
Tabwidth
4
Date
04/28/2013 03:11:36 pm
IP
::ffff:77.177.122.119

The user was too lazy to give a description

  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.     <?php get_template_part('includes/share'); ?>
  14.     
  15.     <div class="post clearfix">
  16.         <div class="content clearfix">
  17.             
  18.             <?php $custom = get_post_custom($post->ID);
  19.             $link = ''; ?>
  20.             
  21.             <?php if ($postType == 'link') $link = isset($custom["customlink"][0]) ? $custom["customlink"][0] : '';
  22.             if ($link == '') $link = get_permalink(); ?>
  23.             
  24.             <a href="<?php if(isset($post->post_type)) echo esc_url(get_bloginfo('url') . '?post_type=' . $post->post_type); else echo('#'); ?>" class="bubble"><?php the_title(); ?></a>
  25.             
  26.             <h<?php if(!is_single()) echo('2'); else echo('1'); ?> class="title"><?php if(!is_single()) echo('<a href="'. esc_url($link) .'">');?><?php the_title(); ?><?php if(!is_single()) echo('</a>'); ?></h<?php if(!is_single()) echo('2'); else echo('1'); ?>>
  27.             <span class="date"><?php the_time('M d'); ?></span>
  28.             
  29.             <div class="clear"></div>
  30.             
  31. <?php if(function_exists('has_post_video') && has_post_video()): the_post_video(); else: ?>
  32.             <?php $thumb = '';
  33.             if ($postType == 'text' || $postType == 'photo') {
  34.                 if ($postType == 'text') { $width = 545; $height = 365; }
  35.                 if ($postType == 'photo') { $width = 545; $height = 365; }
  36.                 if ($postType == 'audio') { $width = 545; $height = 365; }
  37.                 if ($postType == 'track') { $width = 545; $height = 365; }
  38.                 $classtext = '';
  39.                 $titletext = get_the_title();
  40.                 
  41.                 $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,true,'thumb');
  42.                 $thumb = $thumbnail["thumb"];
  43.             }; ?>    
  44.  
  45.             <?php if (!is_single()) { ?>
  46.  
  47.                 <?php if ($thumb <> '' && $postType == 'text' && get_option('lightbright_thumbnails_index') == 'on') { ?>
  48.                     <div class="big-thumb">
  49.                         <a href="<?php echo $thumbnail["fullpath"]; ?>" rel="gallery" title="<?php the_title(); ?>" class="fancybox">
  50.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  51.                             <span class="overlay"></span>
  52.                         </a>
  53.                     </div>
  54.                 <?php }; ?>
  55.  
  56.                 
  57.                 
  58.                 <?php if ($thumb <> '' && $postType == 'photo' && get_option('lightbright_thumbnails_index') == 'on') { ?>
  59.                     <div class="big-thumb">
  60.                         <a href="<?php echo $thumbnail["fullpath"]; ?>" rel="gallery" title="<?php the_title(); ?>" class="fancybox">
  61.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  62.                             <span class="overlay"></span>
  63.                         </a>
  64.                     </div>
  65.                 <?php }; ?>
  66.             <?php } else { ?>
  67.                 <?php if (get_option('lightbright_thumbnails') == 'on') { ?>
  68.                     <?php if ($thumb <> '' && $postType == 'text') { ?>
  69.                         <div class="big-thumb">
  70.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  71.                             <span class="overlay"></span>
  72.                         </div>
  73.                     <?php }; ?>
  74.                     
  75.                     <?php if ($thumb <> '' && $postType == 'photo') { ?>
  76.                         <div class="big-thumb">
  77.                             <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
  78.                             <span class="overlay"></span>
  79.                         </div>
  80.                     <?php }; ?>
  81.                 <?php }; ?>
  82.             <?php }; ?>
  83.         
  84. <?php endif; ?>            
  85.             
  86.             <?php if ($postType == 'quote') { ?>
  87.                 <blockquote>
  88.                     <p><?php $quote = isset($custom["quote"][0]) ? $custom["quote"][0] : ''; echo $quote; ?>"</p>
  89.                     <span class="quote_bg"></span>
  90.                 </blockquote>
  91.             <?php }; ?>
  92.             
  93.             <?php if ($postType == 'video') { ?>
  94.                 <div class="video-block">
  95.                     <?php $video = isset($custom["video"][0]) ? $custom["video"][0] : '';
  96.                     $video_width = isset($custom["video_width"][0]) ? $custom["video_width"][0] : '1280';
  97.                     $video_height = isset($custom["video_height"][0]) ? $custom["video_height"][0] : '720'; ?>
  98.                     
  99.                     <?php
  100.                     $video = preg_replace("/height="[0-9]*"/", "height=$video_height", $video);
  101.                     $video = preg_replace("/width="[0-9]*"/", "width=$video_width", $video);
  102.                     echo $video; ?>
  103.                 </div> <!-- end .video-block -->
  104.             <?php }; ?>
  105.             
  106.             <?php if ($postType == 'audio') { ?>
  107.                 <?php $audio = isset($custom["audio"][0]) ? $custom["audio"][0] : ''; ?>
  108.                 <div class="audio-block">
  109.                     <?php $postID = $post->ID; ?>                
  110.                     <script type="text/javascript"> 
  111.                         AudioPlayer.embed("audioplayer_<?php echo esc_js($postID); ?>", {soundFile: "<?php echo esc_js($audio); ?>"});
  112.                     </script>    
  113.                 </div> <!-- end .audio-block -->
  114.             <?php }; ?>
  115.             
  116.             <?php if ($postType == 'video') echo('<div class="video-text">'); ?>
  117.  
  118.                 <?php if (get_option('lightbright_blog_style') == 'on' || is_single()) the_content(""); else { ?>
  119.                     <p><?php truncate_post(400); ?></p>
  120.                 <?php }; ?>
  121.             
  122.             <?php if ($postType == 'video') echo('</div> <!-- end .video-text -->'); ?>
  123.             
  124.             <?php if (is_single()) { ?>
  125.                 <?php wp_link_pages(array('before' => '<p><strong>'.esc_html__('Pages','LightBright').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  126.                 <?php edit_post_link(esc_html__('Edit this page','LightBright')); ?>
  127.             <?php }; ?>
  128.             
  129.         </div> <!-- end .content -->
  130.         
  131.         <div class="entry-bottom-top"></div>
  132.     
  133.         <div class="entry-meta clearfix">
  134.             <p class="meta"><span class="main"><?php esc_html_e('Posted by','LightBright');?> <?php the_author_posts_link(); ?>
  135.             <?php $taxonomyName = 'custom-tax';
  136.             if ($postType == 'video') $taxonomyName = 'custom-tax2';
  137.             if ($postType == 'quote') $taxonomyName = 'custom-tax3';
  138.             if ($postType == 'photo') $taxonomyName = 'custom-tax4';
  139.             if ($postType == 'customlink') $taxonomyName = 'custom-tax5';
  140.             if ($postType == 'audio') $taxonomyName = 'custom-tax6'; ?>
  141.             <?php echo get_the_term_list( $post->ID, $taxonomyName, esc_html__(' in ','LightBright'),', ' ); ?>
  142.             <?php if (get_the_category()) { esc_html_e(' in ','LightBright'); the_category(', '); } ?>
  143.  
  144.             </span> <span class="comment-count"><?php comments_popup_link('0','1','%'); ?></span></p>
  145.             <?php if(!is_single()) { ?>
  146.                 <a href="<?php the_permalink(); ?>" class="readmore"><span><?php esc_html_e('Comment','LightBright'); ?></span></a>
  147.             <?php }; ?>
  148.         </div> <!-- end .entry-meta -->        
  149.         
  150.     </div> <!-- end .main -->
  151.     
  152.     <div class="entry-bottom"></div>
  153. </div> <!-- end .entry -->
  154.  
  155. <?php if (get_option('lightbright_468_enable') == 'on') { ?>
  156.     <?php if(get_option('lightbright_468_adsense') <> '') echo(get_option('lightbright_468_adsense'));
  157.     else { ?>
  158.         <a href="<?php echo esc_url(get_option('lightbright_468_url')); ?>"><img src="<?php echo esc_url(get_option('lightbright_468_image')); ?>" alt="468 ad" class="foursixeight" /></a>
  159.     <?php } ?>    
  160. <?php } ?>
  161.  
  162. <?php if (get_option('lightbright_show_postcomments') == 'on') comments_template('', true); ?>
submitter » gnopaster | imprint « imprint     
» Terms of use «