Advertisement
pixedelic

taxonomy_2.7.2.php

Aug 30th, 2011
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 27.04 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' ).'</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']!=''){
  173.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  174.                             } else {
  175.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  176.                             }
  177.                         ?>
  178.                         <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  179.                             <?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 } ?>
  180.                             <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href; ?> class="goto-icon" <?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 } ?>
  181.                         </div>
  182.                     </div><!-- .imgHentry -->
  183.                 <?php } ?>
  184.                 <div class="clear"></div>
  185.             </div>
  186.         <?php $i++; endwhile; ?>
  187.        
  188. </div><!-- .isoFilter -->        
  189. <?php
  190.     if($pix_array_term[6]=='show') {
  191.         getInfScroll();
  192.     } else {
  193.         if(function_exists('pix_pagenavi')) { pix_pagenavi();}
  194.     }
  195. ?>
  196. <?php } else { //if $pix_array_term[4]!='widepage' ?>
  197.     <article class="<?php echo $class.' '.$left.' '.$width; ?>">
  198.         <div>
  199. <?php  if (have_posts()) : ?>
  200.             <h1 class="entry-title"><?php single_cat_title(); ?></h1>
  201.             <div id="breadcrumb">
  202.                 <?php pix_breadcrumbs(); ?>
  203.             </div><!-- #breadcrumb -->
  204. <?php if($paged==0){ echo term_description(); }?>
  205. <?php if($pix_array_term[5]=='show') {
  206.     $code_array = array();
  207.     $code_array2 = array();
  208.     query_posts( 'posts_per_page=-1&post_type='.$the_post_type ); while ( have_posts() ) : the_post();
  209.         $terms_ar = get_the_terms( $post->ID, 'image_tag' );
  210.         if($terms_ar){
  211.             foreach( $terms_ar as $term ) {
  212.                 if(!in_array($term->slug,$code_array)){
  213.                     $code_array[] = $term->slug;
  214.                 }
  215.                 if(!in_array($term->name,$code_array2)){
  216.                     $code_array2[] = $term->name;
  217.                 }
  218.                 unset($term);
  219.             }
  220.     }
  221.     endwhile;
  222.     if(count($code_array)!=0 && count($code_array2)!=0) {
  223.         $code_array3 = array_combine($code_array, $code_array2);
  224.         echo '<span id="filtering-nav"><a href="#filter" data-filter="*" class="selected">'. __('All','delight') .'</a>';
  225.    
  226.         foreach( $code_array3 as $key => $value ) {
  227.             echo '<a href="#filter" data-filter=".'.$key.'">'.$value.'</a>';
  228.         }
  229.         echo '</span>';
  230.     } else {
  231.         echo '<span>You must have at least one image tag (better two tags at least) to use the filter option</span>';
  232.     }
  233.     wp_reset_query();
  234. } ?>
  235.  
  236. <?php
  237. if($size_page == 710) {
  238.     switch ($pix_array_term[4]) {
  239.         case 'twocolumns':
  240.             $isoWidth = 30;
  241.             break;
  242.         case 'threecolumns':
  243.             $isoWidth = 7;
  244.             break;
  245.         case 'fourcolumns':
  246.             $isoWidth = 6;
  247.             break;
  248.         case 'fivecolumns':
  249.             $isoWidth = 0;
  250.             break;
  251.     }
  252. } else {
  253.     switch ($pix_array_term[4]) {
  254.         case 'twocolumns':
  255.             $isoWidth = 19;
  256.             break;
  257.         case 'threecolumns':
  258.             $isoWidth = 6;
  259.             break;
  260.         case 'fourcolumns':
  261.             $isoWidth = 7;
  262.             break;
  263.         case 'fivecolumns':
  264.             $isoWidth = 1;
  265.             break;
  266.     }
  267. }
  268. ?>
  269.  
  270.         <div class="isoFilter" style="width:<?php echo ($size_page+$isoWidth); ?>px; margin-left:-<?php echo $isoWidth; ?>px">
  271.             <?php $i=0; while ( have_posts() ) : the_post();
  272.     $meta_options = get_post_meta(get_the_ID(), $custom_options->get_the_id(), TRUE);
  273.     $meta_destination = get_post_meta(get_the_ID(), $custom_destination->get_the_id(), TRUE);
  274.     $meta_url = get_post_meta(get_the_ID(), $custom_url->get_the_id(), TRUE);
  275.     $meta_title = get_post_meta(get_the_ID(), $custom_payoff->get_the_id(), TRUE);
  276.    
  277.    
  278.     if($meta_title['payoff']!='') {
  279.         $the_title = $meta_title['payoff'];
  280.     } else {
  281.         $the_title = get_the_title();
  282.     }
  283.              ?>
  284.    
  285. <?php if($pix_array_term[4]=='onecolumn') { ?>
  286.  
  287.             <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 );  ?>>                
  288.                 <?php if(has_post_thumbnail()) {
  289.                     $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), $size_th );
  290.                     $imgwidth = $imgdata[1];
  291.                     $imgheight = $imgdata[2];
  292.                 ?>
  293.                     <div class="imgHentry" style="width:<?php echo $imgwidth+2; ?>px; height:<?php echo $imgheight+2; ?>px;">
  294.                         <?php the_post_thumbnail($size_th); ?>
  295.                         <?php
  296.                             $links = array();
  297.                             if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  298.                             if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  299.                             $result = count($links);
  300.                             if ($result!=0) {
  301.                                 $imgwidth2 = $imgwidth/$result;
  302.                             }
  303.                            
  304.                             if(has_post_thumbnail()) {
  305.                                 $image_id = get_post_thumbnail_id();  
  306.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  307.                                 $image_url = $image_url[0];
  308.                                 if($meta_destination['featured_video']!=''){
  309.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  310.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  311.                                     } else {
  312.                                         $image_url = $meta_destination['featured_video'];
  313.                                     }
  314.                                 }
  315.                             }
  316.                            
  317.                             if($meta_url['featured_url']!=''){
  318.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  319.                             } else {
  320.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  321.                             }
  322.                         ?>
  323.                         <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  324.                             <?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 } ?>
  325.                             <?php if($pix_array_term[8]=='show') { ?><a <?php echo $featured_href ; ?> class="goto-icon" <?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 } ?>
  326.                         </div>
  327.                     </div><!-- .imgHentry -->
  328.                 <?php } ?>
  329.                 <div class="clear"></div>
  330.             </div>
  331.  
  332.  
  333. <?php } elseif($pix_array_term[4]=='twocolumns') { ?>
  334.  
  335.             <?php
  336.                 $attachment_id = get_post_thumbnail_id($post->ID);
  337.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  338.                 if($size_page == 710) {
  339.                     $lessmargin = 30;
  340.                     $marginleft = 30;
  341.                     $imgwidth = 338;
  342.                     $imgheight = 191;
  343.                 } else {
  344.                     $lessmargin = 19;
  345.                     $marginleft = 19;
  346.                     $imgwidth = 203;
  347.                     $imgheight = 115;
  348.                 }
  349.  
  350.                 $links = array();
  351.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  352.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  353.                 $result = count($links);
  354.                 if ($result!=0) {
  355.                     $imgwidth2 = $imgwidth/$result;
  356.                 }
  357.  
  358.                             if(has_post_thumbnail()) {
  359.                                 $image_id = get_post_thumbnail_id();  
  360.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  361.                                 $image_url = $image_url[0];
  362.                                 if($meta_destination['featured_video']!=''){
  363.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  364.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  365.                                     } else {
  366.                                         $image_url = $meta_destination['featured_video'];
  367.                                     }
  368.                                 }
  369.                             }
  370.             ?>
  371.             <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">                
  372.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  373.                
  374.                 <?php if(has_post_thumbnail()) { ?>
  375.                     <img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo $thumb_src[0]; ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>" alt="">
  376.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px;">
  377.                             <?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 } ?>
  378.                         <?php if($pix_array_term[8]=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?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 } ?>
  379.                     </div>
  380.                 <?php } ?>
  381.                 </div><!-- .imgHentry -->
  382.             </div>
  383.            
  384.             <?php if(($i+1)%2==0) { echo '<div class="clear"></div>'; } ?>
  385.  
  386.  
  387. <?php } elseif($pix_array_term[4]=='threecolumns') { ?>
  388.  
  389.             <?php
  390.                 $attachment_id = get_post_thumbnail_id($post->ID);
  391.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  392.                 if($size_page == 710) {
  393.                     $lessmargin = 14;
  394.                     $marginleft = 7;
  395.                     $imgwidth = 230;
  396.                     $imgheight = 130;
  397.                 } else {
  398.                     $lessmargin = 12;
  399.                     $marginleft = 6;
  400.                     $imgwidth = 137;
  401.                     $imgheight = 78;
  402.                 }
  403.  
  404.                 $links = array();
  405.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  406.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  407.                 $result = count($links);
  408.                 if ($result!=0) {
  409.                     $imgwidth2 = $imgwidth/$result;
  410.                 }
  411.  
  412.                             if(has_post_thumbnail()) {
  413.                                 $image_id = get_post_thumbnail_id();  
  414.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  415.                                 $image_url = $image_url[0];
  416.                                 if($meta_destination['featured_video']!=''){
  417.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  418.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  419.                                     } else {
  420.                                         $image_url = $meta_destination['featured_video'];
  421.                                     }
  422.                                 }
  423.                             }
  424.             ?>
  425.             <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">                
  426.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  427.                
  428.                 <?php if(has_post_thumbnail()) { ?>
  429.                     <img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo $thumb_src[0]; ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>" alt="">
  430.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px;">
  431. <?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 } ?>
  432.                             <?php if($pix_array_term[8]=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?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 } ?>                    </div>
  433.                 <?php } ?>
  434.                 </div><!-- .imgHentry -->
  435.             </div>
  436.            
  437.             <?php if(($i+1)%3==0) { echo '<div class="clear"></div>'; } ?>
  438.  
  439.  
  440. <?php } elseif($pix_array_term[4]=='fourcolumns') { ?>
  441.  
  442.             <?php
  443.                 $attachment_id = get_post_thumbnail_id($post->ID);
  444.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  445.                 if($size_page == 710) {
  446.                     $lessmargin = 18;
  447.                     $marginleft = 6;
  448.                     $imgwidth = 171;
  449.                     $imgheight = 98;
  450.                 } else {
  451.                     $lessmargin = 21;
  452.                     $marginleft = 7;
  453.                     $imgwidth = 100;
  454.                     $imgheight = 57;
  455.                 }
  456.  
  457.                 $links = array();
  458.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  459.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  460.                 $result = count($links);
  461.                 if ($result!=0) {
  462.                     $imgwidth2 = $imgwidth/$result;
  463.                 }
  464.  
  465.                             if(has_post_thumbnail()) {
  466.                                 $image_id = get_post_thumbnail_id();  
  467.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  468.                                 $image_url = $image_url[0];
  469.                                 if($meta_destination['featured_video']!=''){
  470.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  471.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  472.                                     } else {
  473.                                         $image_url = $meta_destination['featured_video'];
  474.                                     }
  475.                                 }
  476.                             }
  477.             ?>
  478.             <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">                
  479.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  480.                
  481.                 <?php if(has_post_thumbnail()) { ?>
  482.                     <img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo $thumb_src[0]; ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>" alt="">
  483.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; display:none">
  484.                             <?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 } ?>
  485.                         <?php if($pix_array_term[8]=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?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 } ?>
  486.                     </div>
  487.                 <?php } ?>
  488.                 </div><!-- .imgHentry -->
  489.             </div>
  490.            
  491.             <?php if(($i+1)%4==0) { echo '<div class="clear"></div>'; } ?>
  492.  
  493.  
  494. <?php } elseif($pix_array_term[4]=='fivecolumns') { ?>
  495.  
  496.             <?php
  497.                 $attachment_id = get_post_thumbnail_id($post->ID);
  498.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  499.                 if($size_page == 710) {
  500.                     $lessmargin = 0;
  501.                     $marginleft = 0;
  502.                     $imgwidth = 142;
  503.                     $imgheight = 80;
  504.                 } else {
  505.                     $lessmargin = 4;
  506.                     $marginleft = 1;
  507.                     $imgwidth = 85;
  508.                     $imgheight = 48;
  509.                 }
  510.  
  511.                 $links = array();
  512.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  513.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  514.                 $result = count($links);
  515.                 if ($result!=0) {
  516.                     $imgwidth2 = $imgwidth/$result;
  517.                 }
  518.  
  519.                             if(has_post_thumbnail()) {
  520.                                 $image_id = get_post_thumbnail_id();  
  521.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  522.                                 $image_url = $image_url[0];
  523.                                 if($meta_destination['featured_video']!=''){
  524.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  525.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  526.                                     } else {
  527.                                         $image_url = $meta_destination['featured_video'];
  528.                                     }
  529.                                 }
  530.                             }
  531.             ?>
  532.             <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">                
  533.                 <div class="imgHentry" style="width:<?php echo ($imgwidth); ?>px; height:<?php echo ($imgheight); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  534.                
  535.                 <?php if(has_post_thumbnail()) { ?>
  536.                     <img style="border:0!important" src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo $thumb_src[0]; ?>&amp;h=<?php echo $imgheight; ?>&amp;w=<?php echo $imgwidth; ?>">
  537.                     <div class="linkIcon" style="width:<?php echo ($imgwidth); ?>px; height:<?php echo ($imgheight); ?>px; display:none">
  538.                             <?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 } ?>
  539.                         <?php if($pix_array_term[8]=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?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 } ?>
  540.                     </div>
  541.                 <?php } ?>
  542.                 </div><!-- .imgHentry -->
  543.             </div>
  544.            
  545.  
  546. <?php } ?>
  547.         <?php $i++; endwhile; ?>
  548.         </div><!-- .isoFilter -->
  549. <?php
  550.     if($pix_array_term[6]=='show') {
  551.         getInfScroll();
  552.     } else {
  553.         if(function_exists('pix_pagenavi')) { pix_pagenavi();}
  554.     }
  555. ?>
  556.         </div>
  557. <?php endif; ?>
  558.     </article>
  559.  
  560. <?php }//if $pix_array_term[4]=='widepage'
  561.  
  562. if ($pix_array_term[4]!='widepage' && ($pix_array_term[1]== 'rightsidebar' || ($pix_array_term[1]=='default' && get_pix_option('pix_general_sidebar')=='rightsidebar' ) ) ) {
  563. get_sidebar();
  564. }
  565. wp_reset_query();
  566. ?>
  567.  
  568. </section>
  569. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement