Advertisement
Guest User

Untitled

a guest
Oct 29th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * @author madars.bitenieks
  4.  * @copyright 2011
  5.  */
  6.  
  7. get_header();
  8.  
  9.  
  10.  
  11.  
  12. $post_types=get_post_types('','names');
  13. foreach ($post_types as $post_type ) {
  14. }
  15.  
  16. $slides = get_post_meta($post->ID,'slides', true);
  17. $sidebar=get_post_meta($post->ID, "madza_sidebar_type", true);
  18. $single_thumb=get_post_meta($post->ID, "madza_post_single_thumb_size", true);
  19.  
  20.  
  21.  
  22. $image_type = get_post_meta(get_the_ID(), 'tz_post_thumb_single', TRUE);
  23. $height = get_post_meta(get_the_ID(), 'tz_post_image_height', TRUE);
  24. $height2 = get_post_meta(get_the_ID(), 'tz_post_image_height2', TRUE);
  25. $height3 = get_post_meta(get_the_ID(), 'tz_post_image_height3', TRUE);
  26. $height4 = get_post_meta(get_the_ID(), 'tz_post_image_height4', TRUE);
  27. $height5 = get_post_meta(get_the_ID(), 'tz_post_image_height5', TRUE);
  28. $image1 = get_post_meta(get_the_ID(), 'tz_post_image', TRUE);
  29. $image2 = get_post_meta(get_the_ID(), 'tz_post_image2', TRUE);
  30. $image3 = get_post_meta(get_the_ID(), 'tz_post_image3', TRUE);
  31. $image4 = get_post_meta(get_the_ID(), 'tz_post_image4', TRUE);
  32. $image5 = get_post_meta(get_the_ID(), 'tz_post_image5', TRUE);
  33. $height = get_post_meta(get_the_ID(), 'tz_post_image_height', TRUE);
  34. $embed = get_post_meta(get_the_ID(), 'tz_post_embed_code', TRUE);
  35. $heightSingle = get_post_meta(get_the_ID(), 'tz_video_height_single', TRUE);
  36. $mp4 = get_post_meta(get_the_ID(), 'tz_video_m4v', TRUE);
  37. $webm = get_post_meta(get_the_ID(), 'tz_video_webm', TRUE);
  38. $ogv = get_post_meta(get_the_ID(), 'tz_video_ogv', TRUE);
  39. $image_prew = get_post_meta(get_the_ID(), 'tz_video_poster', TRUE);
  40.  
  41.  
  42. if ( have_posts() ) while ( have_posts() ) : the_post();
  43.     ?>
  44.  
  45.     <!--TEXT CONTENT -->
  46.     <div class="<?php $sidebar=get_post_meta($post->ID, "madza_sidebar_type", true);  if($sidebar=="Left") { echo "right-content"; } else { echo "left-content"; } ?>">
  47.  
  48.         <?php
  49.  
  50.         if ($heightSingle == '' AND $embed == '' AND $image1 == '' AND $image2 == '' AND $image3 == '' AND $image4 == '' AND $image5 == '' AND has_post_thumbnail() ) {
  51.  
  52.             the_post_thumbnail("post-670");
  53.  
  54.         } else if ($image1 != '') { ?>
  55.             <?php if($image2 != '' or $image3 != '' or $image4 != '' or $image5 != '') {?><div id="single-slider"><?php } ?>
  56.             <ul style="margin-top:0px;" class="slider-ul-single" id="circle-slidrer">
  57.  
  58.                 <?php if($image1 != '') : ?>
  59.                     <li><img height="<?php echo $height; ?>" width="670" src="<?php echo $image1; ?>" alt="<?php the_title(); ?>" /></li>
  60.                 <?php endif; ?>
  61.  
  62.                 <?php if($image2 != '') : ?>
  63.                     <li><img height="<?php echo $height2; ?>" width="670" src="<?php echo $image2; ?>" alt="<?php the_title(); ?>" /></li>
  64.                 <?php endif; ?>
  65.  
  66.                 <?php if($image3 != '') : ?>
  67.                     <li><img height="<?php echo $height3; ?>" width="670" src="<?php echo $image3; ?>" alt="<?php the_title(); ?>" /></li>
  68.                 <?php endif; ?>
  69.  
  70.                 <?php if($image4 != '') : ?>
  71.                     <li><img height="<?php echo $height4; ?>" width="670" src="<?php echo $image4; ?>" alt="<?php the_title(); ?>" /></li>
  72.                 <?php endif; ?>
  73.  
  74.                 <?php if($image5 != '') : ?>
  75.                     <li><img height="<?php echo $height5; ?>" width="670" src="<?php echo $image5; ?>" alt="<?php the_title(); ?>" /></li>
  76.                 <?php endif; ?>
  77.  
  78.  
  79.  
  80.             </ul>
  81.             <?php if($image2 != '' or $image3 != '' or $image4 != '' or $image5 != '') {?>
  82.  
  83.                 <div class="single-blog-nav">
  84.                     <div id="next2"></div>
  85.                     <div id="prev2"></div>
  86.                     <div class="clear"></div>
  87.                 </div>
  88.  
  89.                 <script type="text/javascript">
  90.                     var $j = jQuery.noConflict();
  91.                     $j(document).ready(function(){
  92.                         $j('#circle-slidrer').cycle({
  93.                             fx:         'scrollHorz',
  94.                             speed:       1000,
  95.                             before: onBefore,
  96.                             timeout: 0,
  97.                             after: onAfter,
  98.                             next:   '#next2',
  99.                             prev:   '#prev2',
  100.                             easing: 'easeInOutExpo',
  101.                             sync: true
  102.                         });
  103.                         function onAfter(curr, next, opts, fwd) {
  104.                             var $ht = $j(this).height();
  105.  
  106.                             $j(this).parent().animate({height: $ht});
  107.                         };
  108.                         function onBefore(curr, next, opts, fwd) {
  109.                             var $ht = $j(this).height();
  110.  
  111.                             $j(this).parent().animate({height: $ht});
  112.                         };
  113.                     });
  114.                 </script>
  115.                 </div>
  116.             <?php }
  117.  
  118.         } else if($heightSingle != '') { ?>
  119.  
  120.  
  121.             <script type="text/javascript" charset="utf-8"> VideoJS.setupAllWhenReady(); </script>
  122.  
  123.             <!-- Begin VideoJS -->
  124.             <div class="video-js-box">
  125.                 <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
  126.                 <video class="video-js" width="670" height="<?php echo $heightSingle; ?>" controls preload poster="<?php echo $image_prew; ?>">
  127.                     <source src="<?php echo $mp4; ?>" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
  128.                     <source src="<?php echo $webm; ?>" type='video/webm; codecs="vp8, vorbis"' />
  129.                     <source src="<?php echo $ogv; ?>" type='video/ogg; codecs="theora, vorbis"' />
  130.                     <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
  131.                     <object class="vjs-flash-fallback" width="670" height="<?php echo $heightSingle; ?>" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
  132.                         <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
  133.                         <param name="allowfullscreen" value="true" />
  134.                         <param name="flashvars" value='config={"playlist":["<?php echo $image_prew; ?>", {"url": "<?php echo $mp4; ?>","autoPlay":false,"autoBuffering":true}]}' />
  135.                         <!-- Image Fallback. Typically the same as the poster image. -->
  136.                         <img src="<?php echo $image_prew; ?>" width="670" height="<?php echo $heightSingle; ?>" alt="Poster Image" title="No video playback capabilities." />
  137.                     </object>
  138.                 </video>
  139.  
  140.             </div>
  141.             <!-- End VideoJS -->
  142.         <?php
  143.         } else if ( $embed!="" ) {
  144.  
  145.             ?><?php echo stripslashes(htmlspecialchars_decode($embed)); ?><?php
  146.  
  147.         }
  148.  
  149.         ?>
  150.  
  151.  
  152.  
  153.         <!-- <h1 style="margin-bottom:0px;"><?php the_title(); ?></h1> -->
  154.  
  155.  
  156.         <div id="single-content-div"><?php the_content(); ?> </div>
  157.  
  158.  
  159.  
  160.  
  161.         <p class="callme2" style="margin: 0 0 0 11px;"><a href="tel:014130636">Click this button</a></p>
  162.  
  163.         <!--<div class="single-meta-frame">
  164.  
  165.     <?php if ( count( get_the_category() ) ) : ?>
  166.                <div class="cat-links">
  167.  
  168.                     <?php if (of_get_option("meta_date")=="1") {
  169.  
  170.                         ?><div class="meta-date-blog"><?php  the_time('F jS, Y'); ?></div><?php
  171.  
  172.                     }
  173.  
  174.                     if (of_get_option("meta_category")=="1") {
  175.  
  176.                         ?><div class="meta-category-blog"><?php _e( 'In: ', "madza_translate" ); printf( __( '%2$s' , 'madza_translate'), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?></div><?php
  177.  
  178.                     } ?>
  179.  
  180.                     <?php if (of_get_option("meta_author")=="1") {
  181.  
  182.                         ?><div class="meta-author-blog"><?php _e( 'By: ', "madza_translate" ); the_author_posts_link(); ?></div><?php
  183.  
  184.                     } ?>
  185.  
  186.                     <?php if (of_get_option("meta_comment")=="1") {
  187.  
  188.                         ?><div class="meta-comment-blog"><?php comments_popup_link( __( ' Comments: 0', "madza_translate"), __( ' Comment: 1', "madza_translate" ), __( ' Comments: %', "madza_translate"), '0', '0' ); ?></div><?php
  189.  
  190.                     } ?>
  191.  
  192.                 </div>
  193.  
  194.         <?php endif; ?>
  195.  
  196.     </div>-->
  197.         <div class="clear"></div>
  198.         <?php if ( ! dynamic_sidebar( 'text-widget-area' ) ) : ?>
  199.  
  200.         <?php endif; // end text widget area ?>
  201.  
  202.  
  203.  
  204.         <?php
  205.  
  206.         if (of_get_option("about_author")=="1"){
  207.  
  208.             if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries  ?>
  209.  
  210.  
  211.  
  212.                 <div id="entry_author_info">
  213.  
  214.                     <div id="author_avatar">
  215.  
  216.                         <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'Gooseo_author_bio_avatar_size', 68 ) ); ?>
  217.  
  218.                     </div><!-- #euthor_avatar -->
  219.  
  220.                     <div id="author_description">
  221.  
  222.                         <span class="fn"><?php printf( esc_attr__( '%s', 'Gooseo' ), get_the_author() ); ?></span>
  223.  
  224.                         <p><?php the_author_meta( 'description' ); ?></p>
  225.  
  226.                     </div><!-- #author_description -->
  227.  
  228.                     <div class="clear"></div>
  229.  
  230.                 </div><!-- #entry_author_info -->
  231.  
  232.             <?php endif; }?>
  233.  
  234.         <div class="clear"></div>
  235.  
  236.         <div id="comments_frame">
  237.  
  238.             <?php comments_template( '', true ); ?>
  239.  
  240.         </div>
  241.  
  242.     </div><!--END TEXT CONTENT --> <?php
  243. endwhile;
  244.  
  245.     get_sidebar();
  246.  
  247.     get_footer();
  248.  
  249.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement