Advertisement
pixedelic

taxonmy_text_bottom.php

Oct 12th, 2011
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 28.02 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($pix_array_term[5]=='show') {
  205.     $code_array = array();
  206.     $code_array2 = array();
  207.     query_posts( 'posts_per_page=-1&post_type='.$the_post_type ); while ( have_posts() ) : the_post();
  208.         $terms_ar = get_the_terms( $post->ID, 'image_tag' );
  209.         if($terms_ar){
  210.             foreach( $terms_ar as $term ) {
  211.                 if(!in_array($term->slug,$code_array)){
  212.                     $code_array[] = $term->slug;
  213.                 }
  214.                 if(!in_array($term->name,$code_array2)){
  215.                     $code_array2[] = $term->name;
  216.                 }
  217.                 unset($term);
  218.             }
  219.     }
  220.     endwhile;
  221.     if(count($code_array)!=0 && count($code_array2)!=0) {
  222.         $code_array3 = array_combine($code_array, $code_array2);
  223.         echo '<span id="filtering-nav"><a href="#filter" data-filter="*" class="selected">'. __('All','delight') .'</a>';
  224.    
  225.         foreach( $code_array3 as $key => $value ) {
  226.             echo '<a href="#filter" data-filter=".'.$key.'">'.$value.'</a>';
  227.         }
  228.         echo '</span>';
  229.     } else {
  230.         echo '<span>You must have at least one image tag (better two tags at least) to use the filter option</span>';
  231.     }
  232.     wp_reset_query();
  233.  
  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.                             if($meta_url['featured_url']!=''){
  372.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  373.                             } else {
  374.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  375.                             }
  376.             ?>
  377.             <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">                
  378.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  379.                
  380.                 <?php if(has_post_thumbnail()) { ?>
  381.                     <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="">
  382.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px;">
  383.                             <?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 } ?>
  384.                         <?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 (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  385.                     </div>
  386.                 <?php } ?>
  387.                 </div><!-- .imgHentry -->
  388.             </div>
  389.            
  390.             <?php if(($i+1)%2==0) { echo '<div class="clear"></div>'; } ?>
  391.  
  392.  
  393. <?php } elseif($pix_array_term[4]=='threecolumns') { ?>
  394.  
  395.             <?php
  396.                 $attachment_id = get_post_thumbnail_id($post->ID);
  397.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  398.                 if($size_page == 710) {
  399.                     $lessmargin = 14;
  400.                     $marginleft = 7;
  401.                     $imgwidth = 230;
  402.                     $imgheight = 130;
  403.                 } else {
  404.                     $lessmargin = 12;
  405.                     $marginleft = 6;
  406.                     $imgwidth = 137;
  407.                     $imgheight = 78;
  408.                 }
  409.  
  410.                 $links = array();
  411.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  412.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  413.                 $result = count($links);
  414.                 if ($result!=0) {
  415.                     $imgwidth2 = $imgwidth/$result;
  416.                 }
  417.  
  418.                             if(has_post_thumbnail()) {
  419.                                 $image_id = get_post_thumbnail_id();  
  420.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  421.                                 $image_url = $image_url[0];
  422.                                 if($meta_destination['featured_video']!=''){
  423.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  424.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  425.                                     } else {
  426.                                         $image_url = $meta_destination['featured_video'];
  427.                                     }
  428.                                 }
  429.                             }
  430.  
  431.                             if($meta_url['featured_url']!=''){
  432.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  433.                             } else {
  434.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  435.                             }
  436.             ?>
  437.             <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">                
  438.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  439.                
  440.                 <?php if(has_post_thumbnail()) { ?>
  441.                     <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="">
  442.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px;">
  443. <?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 } ?>
  444.                         <?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 (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  445.                     </div>
  446.                 <?php } ?>
  447.                 </div><!-- .imgHentry -->
  448.             </div>
  449.            
  450.             <?php if(($i+1)%3==0) { echo '<div class="clear"></div>'; } ?>
  451.  
  452.  
  453. <?php } elseif($pix_array_term[4]=='fourcolumns') { ?>
  454.  
  455.             <?php
  456.                 $attachment_id = get_post_thumbnail_id($post->ID);
  457.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  458.                 if($size_page == 710) {
  459.                     $lessmargin = 18;
  460.                     $marginleft = 6;
  461.                     $imgwidth = 171;
  462.                     $imgheight = 98;
  463.                 } else {
  464.                     $lessmargin = 21;
  465.                     $marginleft = 7;
  466.                     $imgwidth = 100;
  467.                     $imgheight = 57;
  468.                 }
  469.  
  470.                 $links = array();
  471.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  472.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  473.                 $result = count($links);
  474.                 if ($result!=0) {
  475.                     $imgwidth2 = $imgwidth/$result;
  476.                 }
  477.  
  478.                             if(has_post_thumbnail()) {
  479.                                 $image_id = get_post_thumbnail_id();  
  480.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  481.                                 $image_url = $image_url[0];
  482.                                 if($meta_destination['featured_video']!=''){
  483.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  484.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  485.                                     } else {
  486.                                         $image_url = $meta_destination['featured_video'];
  487.                                     }
  488.                                 }
  489.                             }
  490.  
  491.                             if($meta_url['featured_url']!=''){
  492.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  493.                             } else {
  494.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  495.                             }
  496.             ?>
  497.             <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">                
  498.                 <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  499.                
  500.                 <?php if(has_post_thumbnail()) { ?>
  501.                     <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="">
  502.                     <div class="linkIcon" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; display:none">
  503.                             <?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 } ?>
  504.                         <?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 (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  505.                     </div>
  506.                 <?php } ?>
  507.                 </div><!-- .imgHentry -->
  508.             </div>
  509.            
  510.             <?php if(($i+1)%4==0) { echo '<div class="clear"></div>'; } ?>
  511.  
  512.  
  513. <?php } elseif($pix_array_term[4]=='fivecolumns') { ?>
  514.  
  515.             <?php
  516.                 $attachment_id = get_post_thumbnail_id($post->ID);
  517.                 $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  518.                 if($size_page == 710) {
  519.                     $lessmargin = 0;
  520.                     $marginleft = 0;
  521.                     $imgwidth = 142;
  522.                     $imgheight = 80;
  523.                 } else {
  524.                     $lessmargin = 4;
  525.                     $marginleft = 1;
  526.                     $imgwidth = 85;
  527.                     $imgheight = 48;
  528.                 }
  529.  
  530.                 $links = array();
  531.                 if($pix_array_term[7]=='show') { array_push($links, $pix_array_term[7]); }
  532.                 if($pix_array_term[8]=='show') { array_push($links, $pix_array_term[8]); }
  533.                 $result = count($links);
  534.                 if ($result!=0) {
  535.                     $imgwidth2 = $imgwidth/$result;
  536.                 }
  537.  
  538.                             if(has_post_thumbnail()) {
  539.                                 $image_id = get_post_thumbnail_id();  
  540.                                 $image_url = wp_get_attachment_image_src($image_id,'full');  
  541.                                 $image_url = $image_url[0];
  542.                                 if($meta_destination['featured_video']!=''){
  543.                                     if(strpos($meta_destination['featured_video'],'wp-content')==true){
  544.                                         $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  545.                                     } else {
  546.                                         $image_url = $meta_destination['featured_video'];
  547.                                     }
  548.                                 }
  549.                             }
  550.  
  551.                             if($meta_url['featured_url']!=''){
  552.                                 $featured_href = 'href='.$meta_url['featured_url'].' target="'.$meta_url['featured_target'].'" ';
  553.                             } else {
  554.                                 $featured_href = 'href='.get_permalink().' target="_self" ';
  555.                             }
  556.             ?>
  557.             <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">                
  558.                 <div class="imgHentry" style="width:<?php echo ($imgwidth); ?>px; height:<?php echo ($imgheight); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  559.                
  560.                 <?php if(has_post_thumbnail()) { ?>
  561.                     <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; ?>">
  562.                     <div class="linkIcon" style="width:<?php echo ($imgwidth); ?>px; height:<?php echo ($imgheight); ?>px; display:none">
  563.                             <?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 } ?>
  564.                         <?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 (2+$imgheight); ?>px;">&nbsp;</a><?php } ?>
  565.                     </div>
  566.                 <?php } ?>
  567.                 </div><!-- .imgHentry -->
  568.             </div>
  569.            
  570.  
  571. <?php } ?>
  572.         <?php $i++; endwhile; ?>
  573.         </div><!-- .isoFilter -->
  574. <?php global $paged; if($paged==0){ echo term_description(); }?>
  575. <?php
  576.     if($pix_array_term[6]=='show') {
  577.         getInfScroll();
  578.     } else {
  579.         if(function_exists('pix_pagenavi')) { pix_pagenavi();}
  580.     }
  581. ?>
  582.         </div>
  583. <?php endif; ?>
  584.     </article>
  585.  
  586. <?php }//if $pix_array_term[4]=='widepage'
  587.  
  588. if ($pix_array_term[4]!='widepage' && ($pix_array_term[1]== 'rightsidebar' || ($pix_array_term[1]=='default' && get_pix_option('pix_general_sidebar')=='rightsidebar' ) ) ) {
  589. get_sidebar();
  590. }
  591. wp_reset_query();
  592. ?>
  593.  
  594. </section>
  595. <?php get_footer(); ?>
  596.  
  597.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement