Advertisement
pixedelic

taxonomy.3.3.6.php

Feb 6th, 2012
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 29.93 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @package WordPress
  4.  * @subpackage Delight
  5.  */
  6.  
  7. get_header();
  8.  
  9. global $custom_options;
  10. global $custom_payoff;
  11. global $print_isotope;
  12. global $current_user;
  13.  
  14. $print_isotope=true;
  15.    
  16.     get_currentuserinfo();
  17.  
  18. $size_th = 'narrowCol';
  19. $size_page = 429;
  20.  
  21. $the_term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
  22. $the_term = $the_term->term_id;
  23. $the_post_type = get_post_type();
  24. $taxonomy = get_query_var( 'taxonomy' );
  25. $pix_array_term = get_pix_option('pix_array_term_'.$the_term);
  26.  
  27. function getInfScroll() {
  28.     global $paged, $print_infinite; if($paged==0) $paged=1; $print_infinite = true;
  29.     echo '<span id="page_nav_span"><a id="page_nav" class="button medium alignleft" href="'. esc_url(get_pagenum_link($paged+1)).'">'.__( 'More items', 'delight' ).'</a></span>';
  30. }
  31.  
  32. function tooltip_info($the_term, $the_action){
  33.     switch (get_pix_option('pix_array_term_tooltip_'.$the_term)){
  34.         case 'title':
  35.             return  'data-title="'.get_the_title().'" ';
  36.             break;
  37.         case 'titleexcerpt':
  38.             return 'data-title="'.get_the_title().'" data-excerpt="'.get_the_excerpt().'" ';
  39.             break;
  40.         case 'titleaction':
  41.             return 'data-title="'.get_the_title().'" data-action="'.$the_action.'" ';
  42.             break;
  43.         case 'titleexcerptaction':
  44.             return 'data-title="'.get_the_title().'" data-excerpt="'.get_the_excerpt().'" data-action="'.$the_action.'" ';
  45.             break;
  46.         case 'action':
  47.             return 'data-action="'.$the_action.'" ';
  48.             break;
  49.         case 'hide':
  50.             return 'data-hide="hide" ';
  51.             break;
  52.     }
  53. }
  54. ?>
  55.  
  56. <section<?php if($pix_array_term[4]=='widepage'){ echo ' class="widepagePortfolio"'; } else { echo ' class="pagePortfolio"'; } ?>>
  57. <?php
  58.  
  59. if ($pix_array_term[4]!='widepage' && ($pix_array_term[1]== 'leftsidebar'|| ($pix_array_term[1]=='default' && get_pix_option('pix_general_sidebar')=='leftsidebar' ) ) ) {
  60.  
  61.  
  62. get_sidebar();
  63. }
  64. wp_reset_query();
  65. ?>
  66.  
  67. <?php
  68. if ($pix_array_term[5]== 'show' || $pix_array_term[6]== 'show' ) {
  69.     $class = 'open_toggle always_open';
  70. } else {
  71.     if ($pix_array_term[0]== 'open') {
  72.         $class = 'open_toggle';
  73.     } elseif ($pix_array_term[0]== 'default' && get_pix_option('pix_sliding_page')=='open') {
  74.         $class = 'open_toggle';
  75.     } elseif ($pix_array_term[0]== 'always') {
  76.         $class = 'open_toggle always_open';
  77.     } elseif ($pix_array_term[0]== 'default' && get_pix_option('pix_sliding_page')=='always') {
  78.         $class = 'open_toggle always_open';
  79.     }
  80. }
  81.  
  82. if(($pix_array_term[1]=='nosidebar' && $pix_array_term[2] == 'right')||$pix_array_term[1]== 'leftsidebar'){
  83.     $left = 'margin-right';
  84. } elseif ($pix_array_term[1]=='default'  && (get_pix_option('pix_general_sidebar')=='leftsidebar' || (get_pix_option('pix_general_sidebar')=='nosidebar' && get_pix_option('pix_general_template')=='right'))) {
  85.     $left = 'margin-right';
  86. }
  87.  
  88. if($pix_array_term[1]=='nosidebar' && $pix_array_term[2] == 'wide'){ $width = 'seveneighty'; $size_th = 'wideCol'; $size_page = 710; }
  89.  
  90.  
  91.  
  92. if($pix_array_term[4]=='widepage') { $size_th = 'floatPort';
  93.  
  94. if($pix_array_term[5]=='show') {
  95.     $code_array = array();
  96.     $code_array2 = array();
  97.     query_posts( 'posts_per_page=-1&post_type='.$the_post_type ); while ( have_posts() ) : the_post();
  98.         $terms_ar = get_the_terms( $post->ID, 'image_tag' );
  99.         if($terms_ar){
  100.             foreach( $terms_ar as $term ) {
  101.                 if(!in_array($term->slug,$code_array)){
  102.                     $code_array[] = $term->slug;
  103.                 }
  104.                 if(!in_array($term->name,$code_array2)){
  105.                     $code_array2[] = $term->name;
  106.                 }
  107.                 unset($term);
  108.             }
  109.     }
  110.     endwhile;
  111.     if(count($code_array)!=0 && count($code_array2)!=0) {
  112.         $code_array3 = array_combine($code_array, $code_array2);
  113.         echo '<span id="filtering-nav"><a href="#filter" data-filter="*" class="selected">'. __('All','delight') .'</a>';
  114.    
  115.         foreach( $code_array3 as $key => $value ) {
  116.             echo '<a href="#filter" data-filter=".'.$key.'">'.$value.'</a>';
  117.         }
  118.         echo '</span>';
  119.     } else {
  120.         echo '<span>You must have at least one image tag (better two tags at least) to use the filter option</span>';
  121.     }
  122.     wp_reset_query();
  123.        
  124. }
  125. ?>
  126. <div class="isoFilter">
  127.             <?php $i=0; while ( have_posts() ) : the_post();
  128.     $meta_options = get_post_meta(get_the_ID(), $custom_options->get_the_id(), TRUE);
  129.     $meta_destination = get_post_meta(get_the_ID(), $custom_destination->get_the_id(), TRUE);
  130.     $meta_url = get_post_meta(get_the_ID(), $custom_url->get_the_id(), TRUE);
  131.     $meta_title = get_post_meta(get_the_ID(), $custom_payoff->get_the_id(), TRUE);
  132.    
  133.     if($meta_title['payoff']!='') {
  134.         $the_title = $meta_title['payoff'];
  135.     } else {
  136.         $the_title = get_the_title();
  137.     }
  138.              ?>
  139.    
  140.             <div id="post-<?php the_ID(); ?>" <?php $postid = $post->ID; $postClass = 'all '; $terms_ar = get_the_terms( $postid, 'image_tag' ); if($terms_ar){foreach ($terms_ar as $term) { $postClass .= $term->slug.' '; }} post_class( $postClass );  ?>>                
  141.                 <?php if(has_post_thumbnail()) {
  142.                     $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), $size_th );
  143.                     $imgwidth = $imgdata[1];
  144.                     $imgheight = $imgdata[2];
  145.    
  146.                 ?>
  147.                     <div class="imgHentry" style="width:<?php echo $imgwidth+2; ?>px; height:<?php echo $imgheight+2; ?>px; margin-top:0">
  148.                         <?php the_post_thumbnail($size_th); ?>
  149.  
  150.                         <?php
  151.                             $links = array();
  152.                             if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  153.                             if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  154.                             $result = count($links);
  155.                             if ($result!=0) {
  156.                                 $imgwidth2 = $imgwidth/$result;
  157.                             }
  158.                            
  159.                             if(has_post_thumbnail()) {
  160.                                 $image_id = get_post_thumbnail_id();  
  161.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  162.                                 $image_url = $image_url[0];
  163.                                 if($meta_destination['featured_video']!=''){
  164.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  165.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.urlencode(get_the_title());
  166.                                     } else {
  167.                                         $image_url = $meta_destination['featured_video'];
  168.                                     }
  169.                                 }
  170.                             }
  171.                            
  172.                             if($meta_url['featured_url']!='' && $meta_url['featured_target']!='colorbox' ){
  173.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  174.                                 $featured_cb = '';
  175.                             } elseif($meta_url['featured_url']!='' && $meta_url['featured_target']=='colorbox' ){
  176.                                 $featured_href = 'href='.$meta_url['featured_url'].' ';
  177.                                 $featured_cb = ' iframe';
  178.                             } else {
  179.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  180.                                 $featured_cb = '';
  181.                             }
  182.                         ?>
  183.                         <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  184.                             <?php if($pix_array_term[7]=='show') { ?><a href="<?php echo $image_url; ?>" class="<?php if($meta_destination['featured_video']!=''){ ?>play-icon<?php } else { ?>enlarge-icon<?php } ?>" <?php if($meta_destination['featured_video']!=''){ echo tooltip_info($the_term, __('Play video','delight')); } else { echo tooltip_info($the_term, __('Enlarge picture','delight')); } ?> <?php if($pix_array_term[9]=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  185.                             <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href; ?> class="goto-icon <?php echo $featured_cb; ?>" <?php echo tooltip_info($the_term, __('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  186.                         </div>
  187.                     </div><!-- .imgHentry -->
  188.                 <?php } ?>
  189.                 <div class="clear"></div>
  190.             </div>
  191.         <?php $i++; endwhile; ?>
  192.        
  193. </div><!-- .isoFilter -->        
  194. <?php
  195.     if($pix_array_term[6]=='show') {
  196.         getInfScroll();
  197.     } else {
  198.         if(function_exists('pix_pagenavi')) { pix_pagenavi();}
  199.     }
  200. ?>
  201. <?php } else { //if $pix_array_term[4]!='widepage' ?>
  202.     <article class="<?php echo $class.' '.$left.' '.$width; ?>">
  203.         <div><div>
  204. <?php  if (have_posts()) : ?>
  205.             <h1 class="entry-title"><?php single_cat_title(); ?></h1>
  206.             <div id="breadcrumb">
  207.                 <?php pix_breadcrumbs(); ?>
  208.             </div><!-- #breadcrumb -->
  209. <?php if($paged==0){ echo term_description(); }?>
  210. <?php if($pix_array_term[5]=='show') {
  211.     $code_array = array();
  212.     $code_array2 = array();
  213.     query_posts( 'posts_per_page=-1&post_type='.$the_post_type ); while ( have_posts() ) : the_post();
  214.         $terms_ar = get_the_terms( $post->ID, 'image_tag' );
  215.         if($terms_ar){
  216.             foreach( $terms_ar as $term ) {
  217.                 if(!in_array($term->slug,$code_array)){
  218.                     $code_array[] = $term->slug;
  219.                 }
  220.                 if(!in_array($term->name,$code_array2)){
  221.                     $code_array2[] = $term->name;
  222.                 }
  223.                 unset($term);
  224.             }
  225.     }
  226.     endwhile;
  227.     if(count($code_array)!=0 && count($code_array2)!=0) {
  228.         $code_array3 = array_combine($code_array, $code_array2);
  229.         echo '<span id="filtering-nav"><a href="#filter" data-filter="*" class="selected">'. __('All','delight') .'</a>';
  230.    
  231.         foreach( $code_array3 as $key => $value ) {
  232.             echo '<a href="#filter" data-filter=".'.$key.'">'.$value.'</a>';
  233.         }
  234.         echo '</span>';
  235.     } else {
  236.         echo '<span>You must have at least one image tag (better two tags at least) to use the filter option</span>';
  237.     }
  238.     wp_reset_query();
  239.  
  240. } ?>
  241.  
  242. <?php
  243. if($size_page == 710) {
  244.     switch ($pix_array_term[4]) {
  245.         case 'twocolumns':
  246.             $isoWidth = 30;
  247.             break;
  248.         case 'threecolumns':
  249.             $isoWidth = 7;
  250.             break;
  251.         case 'fourcolumns':
  252.             $isoWidth = 6;
  253.             break;
  254.         case 'fivecolumns':
  255.             $isoWidth = 0;
  256.             break;
  257.     }
  258. } else {
  259.     switch ($pix_array_term[4]) {
  260.         case 'twocolumns':
  261.             $isoWidth = 19;
  262.             break;
  263.         case 'threecolumns':
  264.             $isoWidth = 6;
  265.             break;
  266.         case 'fourcolumns':
  267.             $isoWidth = 7;
  268.             break;
  269.         case 'fivecolumns':
  270.             $isoWidth = 1;
  271.             break;
  272.     }
  273. }
  274. ?>
  275.  
  276.         <div class="isoFilter" style="width:<?php echo ($size_page+$isoWidth); ?>px; margin-left:-<?php echo $isoWidth; ?>px">
  277.             <?php $i=0; while ( have_posts() ) : the_post();
  278.     $meta_options = get_post_meta(get_the_ID(), $custom_options->get_the_id(), TRUE);
  279.     $meta_destination = get_post_meta(get_the_ID(), $custom_destination->get_the_id(), TRUE);
  280.     $meta_url = get_post_meta(get_the_ID(), $custom_url->get_the_id(), TRUE);
  281.     $meta_title = get_post_meta(get_the_ID(), $custom_payoff->get_the_id(), TRUE);
  282.    
  283.    
  284.     if($meta_title['payoff']!='') {
  285.         $the_title = $meta_title['payoff'];
  286.     } else {
  287.         $the_title = get_the_title();
  288.     }
  289.              ?>
  290.    
  291. <?php if($pix_array_term[4]=='onecolumn') { ?>
  292.  
  293.             <div id="post-<?php the_ID(); ?>" <?php $postid = $post->ID; $postClass = 'all '; $terms_ar = get_the_terms( $postid, 'image_tag' ); if($terms_ar){foreach ($terms_ar as $term) { $postClass .= $term->slug.' '; }} post_class( $postClass );  ?>>                
  294.                 <?php if(has_post_thumbnail()) {
  295.                     $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), $size_th );
  296.                     $imgwidth = $imgdata[1];
  297.                     $imgheight = $imgdata[2];
  298.                 ?>
  299.                     <div class="imgHentry" style="width:<?php echo $imgwidth+2; ?>px; height:<?php echo $imgheight+2; ?>px;">
  300.                         <?php the_post_thumbnail($size_th); ?>
  301.                         <?php
  302.                             $links = array();
  303.                             if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  304.                             if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  305.                             $result = count($links);
  306.                             if ($result!=0) {
  307.                                 $imgwidth2 = $imgwidth/$result;
  308.                             }
  309.                            
  310.                             if(has_post_thumbnail()) {
  311.                                 $image_id = get_post_thumbnail_id();  
  312.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  313.                                 $image_url = $image_url[0];
  314.                                 if($meta_destination['featured_video']!=''){
  315.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  316.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  317.                                     } else {
  318.                                         $image_url = $meta_destination['featured_video'];
  319.                                     }
  320.                                 }
  321.                             }
  322.                            
  323.                             if($meta_url['featured_url']!='' && $meta_url['featured_target']!='colorbox' ){
  324.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  325.                                 $featured_cb = '';
  326.                             } elseif($meta_url['featured_url']!='' && $meta_url['featured_target']=='colorbox' ){
  327.                                 $featured_href = 'href='.$meta_url['featured_url'].' ';
  328.                                 $featured_cb = ' iframe';
  329.                             } else {
  330.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  331.                                 $featured_cb = '';
  332.                             }
  333.                         ?>
  334.                         <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  335.                             <?php if($pix_array_term[7]=='show') { ?><a href="<?php echo $image_url; ?>" class="<?php if($meta_destination['featured_video']!=''){ ?>play-icon<?php } else { ?>enlarge-icon<?php } ?>" <?php if($meta_destination['featured_video']!=''){ echo tooltip_info($the_term, __('Play video','delight')); } else { echo tooltip_info($the_term, __('Enlarge picture','delight')); } ?> <?php if($pix_array_term[9]=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  336.                             <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href ; ?> class="goto-icon <?php echo $featured_cb; ?>" <?php echo tooltip_info($the_term, __('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  337.                         </div>
  338.                     </div><!-- .imgHentry -->
  339.                 <?php } ?>
  340.                 <div class="clear"></div>
  341.             </div>
  342.  
  343.  
  344. <?php } elseif($pix_array_term[4]=='twocolumns') { ?>
  345.  
  346.             <?php
  347.                 $attachment_id = get_post_thumbnail_id($post->ID);
  348.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  349.                 if($size_page == 710) {
  350.                     $lessmargin = 30;
  351.                     $marginleft = 30;
  352.                     $imgwidth = 338;
  353.                     $imgheight = 191;
  354.                 } else {
  355.                     $lessmargin = 19;
  356.                     $marginleft = 19;
  357.                     $imgwidth = 203;
  358.                     $imgheight = 115;
  359.                 }
  360.  
  361.                 $links = array();
  362.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  363.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  364.                 $result = count($links);
  365.                 if ($result!=0) {
  366.                     $imgwidth2 = $imgwidth/$result;
  367.                 }
  368.  
  369.                             if(has_post_thumbnail()) {
  370.                                 $image_id = get_post_thumbnail_id();  
  371.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  372.                                 $image_url = $image_url[0];
  373.                                 if($meta_destination['featured_video']!=''){
  374.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  375.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  376.                                     } else {
  377.                                         $image_url = $meta_destination['featured_video'];
  378.                                     }
  379.                                 }
  380.                             }
  381.  
  382.                             if($meta_url['featured_url']!='' && $meta_url['featured_target']!='colorbox' ){
  383.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  384.                             } elseif($meta_url['featured_url']!='' && $meta_url['featured_target']=='colorbox' ){
  385.                                 $featured_href = 'href='.$meta_url['featured_url'].' ';
  386.                                 $featured_cb = ' iframe';
  387.                             } else {
  388.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  389.                             }
  390.             ?>
  391.             <div id="post-<?php the_ID(); ?>" <?php $postid = $post->ID; $postClass = 'all '; $terms_ar = get_the_terms( $postid, 'image_tag' ); if($terms_ar){foreach ($terms_ar as $term) { $postClass .= $term->slug.' '; }} post_class( $postClass );  ?> style="width: <?php echo ($imgwidth+2); ?>px; margin-left:<?php echo $marginleft; ?>px">                
  392.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  393.                
  394.                 <?php if(has_post_thumbnail()) { ?>
  395.                     <img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo pix_image_path($thumb_src[0]); ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>" alt="">
  396.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px;">
  397.                             <?php if($pix_array_term[7]=='show') { ?><a href="<?php echo $image_url; ?>" class="<?php if($meta_destination['featured_video']!=''){ ?>play-icon<?php } else { ?>enlarge-icon<?php } ?>" <?php if($meta_destination['featured_video']!=''){ echo tooltip_info($the_term, __('Play video','delight')); } else { echo tooltip_info($the_term, __('Enlarge picture','delight')); } ?> <?php if($pix_array_term[9]=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  398.                         <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href; ?> class="goto-icon <?php echo $featured_cb; ?>" <?php echo tooltip_info($the_term, __('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  399.                     </div>
  400.                 <?php } ?>
  401.                 </div><!-- .imgHentry -->
  402.             </div>
  403.            
  404.             <?php if(($i+1)%2==0) { echo '<div class="clear"></div>'; } ?>
  405.  
  406.  
  407. <?php } elseif($pix_array_term[4]=='threecolumns') { ?>
  408.  
  409.             <?php
  410.                 $attachment_id = get_post_thumbnail_id($post->ID);
  411.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  412.                 if($size_page == 710) {
  413.                     $lessmargin = 14;
  414.                     $marginleft = 7;
  415.                     $imgwidth = 230;
  416.                     $imgheight = 130;
  417.                 } else {
  418.                     $lessmargin = 12;
  419.                     $marginleft = 6;
  420.                     $imgwidth = 137;
  421.                     $imgheight = 78;
  422.                 }
  423.  
  424.                 $links = array();
  425.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  426.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  427.                 $result = count($links);
  428.                 if ($result!=0) {
  429.                     $imgwidth2 = $imgwidth/$result;
  430.                 }
  431.  
  432.                             if(has_post_thumbnail()) {
  433.                                 $image_id = get_post_thumbnail_id();  
  434.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  435.                                 $image_url = $image_url[0];
  436.                                 if($meta_destination['featured_video']!=''){
  437.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  438.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  439.                                     } else {
  440.                                         $image_url = $meta_destination['featured_video'];
  441.                                     }
  442.                                 }
  443.                             }
  444.  
  445.                             if($meta_url['featured_url']!='' && $meta_url['featured_target']!='colorbox' ){
  446.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  447.                                 $featured_cb = '';
  448.                             } elseif($meta_url['featured_url']!='' && $meta_url['featured_target']=='colorbox' ){
  449.                                 $featured_href = 'href='.$meta_url['featured_url'].' ';
  450.                                 $featured_cb = ' iframe';
  451.                             } else {
  452.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  453.                                 $featured_cb = '';
  454.                             }
  455.             ?>
  456.             <div id="post-<?php the_ID(); ?>" <?php $postid = $post->ID; $postClass = 'all '; $terms_ar = get_the_terms( $postid, 'image_tag' ); if($terms_ar){foreach ($terms_ar as $term) { $postClass .= $term->slug.' '; }} post_class( $postClass );  ?> style="width: <?php echo ($imgwidth+2); ?>px; margin-left:<?php echo $marginleft; ?>px">                
  457.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  458.                
  459.                 <?php if(has_post_thumbnail()) { ?>
  460.                     <img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo pix_image_path($thumb_src[0]); ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>" alt="">
  461.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px;">
  462. <?php if($pix_array_term[7]=='show') { ?><a href="<?php echo $image_url; ?>" class="<?php if($meta_destination['featured_video']!=''){ ?>play-icon<?php } else { ?>enlarge-icon<?php } ?>" <?php if($meta_destination['featured_video']!=''){ echo tooltip_info($the_term, __('Play video','delight')); } else { echo tooltip_info($the_term, __('Enlarge picture','delight')); } ?> <?php if($pix_array_term[9]=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  463.                         <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href; ?> class="goto-icon <?php echo $featured_cb; ?>" <?php echo tooltip_info($the_term, __('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  464.                     </div>
  465.                 <?php } ?>
  466.                 </div><!-- .imgHentry -->
  467.             </div>
  468.            
  469.             <?php if(($i+1)%3==0) { echo '<div class="clear"></div>'; } ?>
  470.  
  471.  
  472. <?php } elseif($pix_array_term[4]=='fourcolumns') { ?>
  473.  
  474.             <?php
  475.                 $attachment_id = get_post_thumbnail_id($post->ID);
  476.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  477.                 if($size_page == 710) {
  478.                     $lessmargin = 18;
  479.                     $marginleft = 6;
  480.                     $imgwidth = 171;
  481.                     $imgheight = 98;
  482.                 } else {
  483.                     $lessmargin = 21;
  484.                     $marginleft = 7;
  485.                     $imgwidth = 100;
  486.                     $imgheight = 57;
  487.                 }
  488.  
  489.                 $links = array();
  490.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  491.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  492.                 $result = count($links);
  493.                 if ($result!=0) {
  494.                     $imgwidth2 = $imgwidth/$result;
  495.                 }
  496.  
  497.                             if(has_post_thumbnail()) {
  498.                                 $image_id = get_post_thumbnail_id();  
  499.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  500.                                 $image_url = $image_url[0];
  501.                                 if($meta_destination['featured_video']!=''){
  502.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  503.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  504.                                     } else {
  505.                                         $image_url = $meta_destination['featured_video'];
  506.                                     }
  507.                                 }
  508.                             }
  509.  
  510.                             if($meta_url['featured_url']!='' && $meta_url['featured_target']!='colorbox' ){
  511.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  512.                                 $featured_cb = '';
  513.                             } elseif($meta_url['featured_url']!='' && $meta_url['featured_target']=='colorbox' ){
  514.                                 $featured_href = 'href='.$meta_url['featured_url'].' ';
  515.                                 $featured_cb = ' iframe';
  516.                             } else {
  517.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  518.                                 $featured_cb = '';
  519.                             }
  520.             ?>
  521.             <div id="post-<?php the_ID(); ?>" <?php $postid = $post->ID; $postClass = 'all '; $terms_ar = get_the_terms( $postid, 'image_tag' ); if($terms_ar){foreach ($terms_ar as $term) { $postClass .= $term->slug.' '; }} post_class( $postClass );  ?> style="width: <?php echo ($imgwidth+2); ?>px; margin-left:<?php echo $marginleft; ?>px">                
  522.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  523.                
  524.                 <?php if(has_post_thumbnail()) { ?>
  525.                     <img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo pix_image_path($thumb_src[0]); ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>" alt="">
  526.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; display:none">
  527.                             <?php if($pix_array_term[7]=='show') { ?><a href="<?php echo $image_url; ?>" class="<?php if($meta_destination['featured_video']!=''){ ?>play-icon<?php } else { ?>enlarge-icon<?php } ?>" <?php if($meta_destination['featured_video']!=''){ echo tooltip_info($the_term, __('Play video','delight')); } else { echo tooltip_info($the_term, __('Enlarge picture','delight')); } ?> <?php if($pix_array_term[9]=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  528.                         <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href; ?> class="goto-icon <?php echo $featured_cb; ?>" <?php echo tooltip_info($the_term, __('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  529.                     </div>
  530.                 <?php } ?>
  531.                 </div><!-- .imgHentry -->
  532.             </div>
  533.            
  534.             <?php if(($i+1)%4==0) { echo '<div class="clear"></div>'; } ?>
  535.  
  536.  
  537. <?php } elseif($pix_array_term[4]=='fivecolumns') { ?>
  538.  
  539.             <?php
  540.                 $attachment_id = get_post_thumbnail_id($post->ID);
  541.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  542.                 if($size_page == 710) {
  543.                     $lessmargin = 0;
  544.                     $marginleft = 0;
  545.                     $imgwidth = 142;
  546.                     $imgheight = 80;
  547.                 } else {
  548.                     $lessmargin = 4;
  549.                     $marginleft = 1;
  550.                     $imgwidth = 85;
  551.                     $imgheight = 48;
  552.                 }
  553.  
  554.                 $links = array();
  555.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  556.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  557.                 $result = count($links);
  558.                 if ($result!=0) {
  559.                     $imgwidth2 = $imgwidth/$result;
  560.                 }
  561.  
  562.                             if(has_post_thumbnail()) {
  563.                                 $image_id = get_post_thumbnail_id();  
  564.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  565.                                 $image_url = $image_url[0];
  566.                                 if($meta_destination['featured_video']!=''){
  567.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  568.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  569.                                     } else {
  570.                                         $image_url = $meta_destination['featured_video'];
  571.                                     }
  572.                                 }
  573.                             }
  574.  
  575.                             if($meta_url['featured_url']!='' && $meta_url['featured_target']!='colorbox' ){
  576.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  577.                                 $featured_cb = '';
  578.                             } elseif($meta_url['featured_url']!='' && $meta_url['featured_target']=='colorbox' ){
  579.                                 $featured_href = 'href='.$meta_url['featured_url'].' ';
  580.                                 $featured_cb = ' iframe';
  581.                             } else {
  582.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  583.                                 $featured_cb = '';
  584.                             }
  585.             ?>
  586.             <div id="post-<?php the_ID(); ?>" <?php $postid = $post->ID; $postClass = 'all '; $terms_ar = get_the_terms( $postid, 'image_tag' ); if($terms_ar){foreach ($terms_ar as $term) { $postClass .= $term->slug.' '; }} post_class( $postClass );  ?> style="width: <?php echo ($imgwidth); ?>px; margin-left:<?php echo $marginleft; ?>px">                
  587.                 <div class="imgHentry" style="width:<?php echo ($imgwidth); ?>px; height:<?php echo ($imgheight); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  588.                
  589.                 <?php if(has_post_thumbnail()) { ?>
  590.                     <img style="border:0!important" src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo pix_image_path($thumb_src[0]); ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>">
  591.                     <div class="linkIcon" style="width:<?php echo ($imgwidth); ?>px; height:<?php echo ($imgheight); ?>px; display:none">
  592.                             <?php if($pix_array_term[7]=='show') { ?><a href="<?php echo $image_url; ?>" class="<?php if($meta_destination['featured_video']!=''){ ?>play-icon<?php } else { ?>enlarge-icon<?php } ?>" <?php if($meta_destination['featured_video']!=''){ echo tooltip_info($the_term, __('Play video','delight')); } else { echo tooltip_info($the_term, __('Enlarge picture','delight')); } ?> <?php if($pix_array_term[9]=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  593.                         <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href; ?> class="goto-icon <?php echo $featured_cb; ?>" <?php echo tooltip_info($the_term, __('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  594.                     </div>
  595.                 <?php } ?>
  596.                 </div><!-- .imgHentry -->
  597.             </div>
  598.            
  599.  
  600. <?php } ?>
  601.         <?php $i++; endwhile; ?>
  602.         </div><!-- .isoFilter -->
  603. <?php
  604.     if($pix_array_term[6]=='show') {
  605.         getInfScroll();
  606.     } else {
  607.         if(function_exists('pix_pagenavi')) { pix_pagenavi();}
  608.     }
  609. ?>
  610.         </div></div>
  611. <?php endif; ?>
  612.     </article>
  613.  
  614. <?php }//if $pix_array_term[4]=='widepage'
  615.  
  616. if ($pix_array_term[4]!='widepage' && ($pix_array_term[1]== 'rightsidebar' || ($pix_array_term[1]=='default' && get_pix_option('pix_general_sidebar')=='rightsidebar' ) ) ) {
  617. get_sidebar();
  618. }
  619. wp_reset_query();
  620. ?>
  621.  
  622. </section>
  623. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement