Advertisement
Guest User

joe blog

a guest
Jan 27th, 2012
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.01 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Delight
  5. */
  6.  
  7. get_header(); ?>
  8.  
  9.  
  10. <?php
  11. /*---------------------------------------------------------------------- if POSTS --------------------------------------------------------------------*/
  12. if (get_pix_option('pix_frontpage_posttype')=='posts'){ ?>
  13.  
  14.  
  15. <section>
  16. <?php
  17. global $custom_options;
  18. global $custom_payoff;
  19. global $page, $paged;
  20. if ( get_query_var('paged') ) {
  21. $paged = get_query_var('paged');
  22. } else if ( get_query_var('page') ) {
  23. $paged = get_query_var('page');
  24. } else {
  25. $paged = 1;
  26. }
  27.  
  28. if (get_pix_option('pix_sliding_frontpage')== 'open') {
  29. $class = 'open_toggle';
  30. } elseif (get_pix_option('pix_sliding_frontpage')== 'default' && get_pix_option('pix_sliding_page')=='open') {
  31. $class = 'open_toggle';
  32. } elseif (get_pix_option('pix_sliding_frontpage')== 'always') {
  33. $class = 'open_toggle always_open';
  34. } elseif (get_pix_option('pix_sliding_frontpage')== 'default' && get_pix_option('pix_sliding_page')=='always') {
  35. $class = 'open_toggle always_open';
  36. }
  37.  
  38. if((get_pix_option('pix_sidebar_frontpage_layout')=='nosidebar' && get_pix_option('pix_front_page_layout') == 'right')||get_pix_option('pix_sidebar_frontpage_layout')== 'leftsidebar'){
  39. $left = 'margin-right';
  40. $classside = 'leftsidebar';
  41. } elseif (get_pix_option('pix_sidebar_frontpage_layout')=='default' && (get_pix_option('pix_general_sidebar')=='leftsidebar' || (get_pix_option('pix_general_sidebar')=='nosidebar' && get_pix_option('pix_general_template')=='right'))) {
  42. $left = 'margin-right';
  43. }
  44.  
  45. if (get_pix_option('pix_sidebar_frontpage_layout')== 'leftsidebar'|| (get_pix_option('pix_sidebar_frontpage_layout')=='default' && get_pix_option('pix_general_sidebar')=='leftsidebar')) {
  46. ?>
  47. <aside class="<?php echo $classside.' '.$class; ?>">
  48. <div>
  49. <?php dynamic_sidebar(get_pix_option('pix_sidebar_frontpage')); ?>
  50. </div>
  51. </aside>
  52. <?php }
  53. wp_reset_query();
  54. ?>
  55.  
  56. <?php
  57.  
  58. if(get_pix_option('pix_sidebar_frontpage_layout')=='nosidebar' && get_pix_option('pix_front_page_layout') == 'wide'){ $width = 'seveneighty'; $size_th = 'wideCol'; $sizes = '&amp;h=399&amp;w=708'; $new_size= ' style="width:708px; height:399px;"'; } else { $size_th = 'narrowCol'; $sizes = '&amp;h=240&amp;w=427'; $new_size= ' style="width:427px; height:240px;"'; }
  59. ?>
  60. <article class="<?php echo $class.' '.$left.' '.$width; ?>">
  61. <div>
  62. <?php
  63. $my_query = null;
  64. if(is_array(get_pix_option('pix_frontpage_posttype_categories')) && !in_array('all',get_pix_option('pix_frontpage_posttype_categories'))){
  65. $cat_selected = implode(',',get_pix_option('pix_frontpage_posttype_categories'));
  66. $my_query = new WP_Query('cat='.$cat_selected.'&paged=' . $paged.'&posts_per_page='.get_pix_option('pix_frontpage_galleries_ppp'));
  67. $my2_query = new WP_Query('cat='.$cat_selected.'&posts_per_page=-1');
  68. } else {
  69. $my_query = new WP_Query('paged=' . $paged.'&posts_per_page='.get_pix_option('pix_frontpage_galleries_ppp'));
  70. $my2_query = new WP_Query('posts_per_page=-1');
  71. }
  72. ?>
  73. <?php if ($my_query->have_posts()) : ?>
  74. <h2 class="entry-title"><?php echo stripslashes(get_pix_option( 'pix_front_page_title' )); ?></h2>
  75. <?php global $paged; if($paged==1) { echo do_shortcode(wpautop(stripslashes(get_pix_option( 'pix_front_page_content' )))); } ?>
  76. <?php while ( $my_query->have_posts() ) : $my_query->the_post();
  77. $meta_options = get_post_meta(get_the_ID(), $custom_options->get_the_id(), TRUE);
  78. $meta_title = get_post_meta(get_the_ID(), $custom_payoff->get_the_id(), TRUE);
  79.  
  80. if($meta_title['payoff']!='') {
  81. $the_title = $meta_title['payoff'];
  82. } else {
  83. $the_title = get_the_title();
  84. }
  85. ?>
  86.  
  87. <div id="post-<?php the_ID(); ?>" <?php post_class('hentry'); ?>>
  88. <h3><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php echo get_the_title(); ?>"><?php echo $the_title; ?></a></h3>
  89. <?php if(get_pix_option('pix_archive_show_postmetadata')=='show') { ?>
  90. <div class="postmetadata">
  91. <span>
  92. <?php echo get_the_date(); ?>
  93. </span>
  94. <?php delight_posted_on(); ?>
  95. </div><!-- .postmetadata -->
  96. <?php }// show postmetadata ?>
  97.  
  98. <?php if($meta_title['subtitle']!=''){?><p class="subtitle"><?php echo $meta_title['subtitle']; ?></p><?php } ?>
  99. <?php if(has_post_thumbnail()) {
  100. $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), $size_th );
  101. ?><div class="imgHentry"><img src="<?php echo get_bloginfo('stylesheet_directory'); ?>/scripts/timthumb.php?src=<?php echo $imgdata[0].$sizes; ?>" style="display:block" alt=""><div class="linkIcon"<?php echo $new_size; ?>><a href="<?php the_permalink(); ?>" class="goto-icon"<?php echo $new_size; ?>></a></div></div><!-- .imgHentry --><?php
  102. } ?>
  103. <?php custom_the_excerpt(get_pix_option('pix_frontpage_length_excerpt'), __('Read more','delight')); ?>
  104. <div class="clear"></div>
  105. </div>
  106. <?php endwhile; ?>
  107. <?php if(function_exists('pix_pagenavi')) { pix_pagenavi($my2_query->post_count);} wp_reset_query(); ?>
  108. </div>
  109. <?php endif; ?>
  110. </article>
  111.  
  112. <?php
  113.  
  114. if (get_pix_option('pix_sidebar_frontpage_layout')== 'rightsidebar' || (get_pix_option('pix_sidebar_frontpage_layout')=='default' && get_pix_option('pix_general_sidebar')=='rightsidebar')) {?>
  115. <aside class="<?php echo $classside.' '.$class; ?>">
  116. <div>
  117. <?php dynamic_sidebar(get_pix_option('pix_sidebar_frontpage')); ?>
  118. </div>
  119. </aside>
  120. <?php }
  121. wp_reset_query();
  122. ?>
  123.  
  124. </section>
  125. <?php get_footer(); ?>
  126.  
  127.  
  128. <?php } /*---------------------------------------------------------------------- if PORTFOLIO --------------------------------------------------------------------*/
  129. elseif (get_pix_option('pix_frontpage_posttype')=='portfolio'){ ?>
  130.  
  131.  
  132. <?php
  133. /**
  134. * @package WordPress
  135. * @subpackage Delight
  136. */
  137.  
  138. get_header();
  139.  
  140. global $custom_options;
  141. global $custom_payoff;
  142.  
  143.  
  144. if(is_array(get_pix_option('pix_frontpage_posttype_galleries')) && !in_array('all',get_pix_option('pix_frontpage_posttype_galleries'))){
  145. $cat_selected = implode(',',get_pix_option('pix_frontpage_posttype_galleries'));
  146. } else {
  147. $cat_selected = '';
  148. }
  149.  
  150. $size_th = 'narrowCol';
  151. $size_page = 429;
  152.  
  153. function getInfScroll() {
  154. global $page, $paged;
  155. if ( get_query_var('paged') ) {
  156. $paged = get_query_var('paged');
  157. } else if ( get_query_var('page') ) {
  158. $paged = get_query_var('page');
  159. } else {
  160. $paged = 1;
  161. }
  162. 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>';
  163. }
  164.  
  165. function tooltip_info($the_action){
  166. switch (get_pix_option('pix_frontpage_galleries_tooltip')){
  167. case 'title':
  168. return 'data-title="'.get_the_title().'" ';
  169. break;
  170. case 'titlecontent':
  171. return 'data-title="'.get_the_title().'" data-content="'.get_the_content().'" ';
  172. break;
  173. case 'titleaction':
  174. return 'data-title="'.get_the_title().'" data-action="'.$the_action.'" ';
  175. break;
  176. case 'titlecontentaction':
  177. return 'data-title="'.get_the_title().'" data-content="'.get_the_content().'" data-action="'.$the_action.'" ';
  178. break;
  179. case 'action':
  180. return 'data-action="'.$the_action.'" ';
  181. break;
  182. case 'hide':
  183. return 'data-hide="hide" ';
  184. break;
  185. }
  186. }
  187. ?>
  188.  
  189.  
  190. <section<?php if(get_pix_option('pix_frontpage_galleries_template')=='widepage'){ echo ' class="widepagePortfolio"'; } else { echo ' class="pagePortfolio"'; } ?>>
  191. <?php
  192.  
  193. if (get_pix_option('pix_frontpage_galleries_template')!='widepage' && (get_pix_option('pix_sidebar_frontpage_layout')== 'leftsidebar'|| (get_pix_option('pix_sidebar_frontpage_layout')=='default' && get_pix_option('pix_general_sidebar')=='leftsidebar' ) ) ) {
  194.  
  195.  
  196. get_sidebar();
  197. }
  198. wp_reset_query();
  199. ?>
  200.  
  201. <?php
  202. if (get_pix_option('pix_frontpage_galleries_filterable') == 'show' || get_pix_option('pix_frontpage_galleries_scrolling') == 'show' ) {
  203. $class = 'open_toggle always_open';
  204. } else {
  205. if (get_pix_option('pix_sliding_frontpage')== 'open') {
  206. $class = 'open_toggle';
  207. } elseif (get_pix_option('pix_sliding_frontpage')== 'default' && get_pix_option('pix_sliding_page')=='open') {
  208. $class = 'open_toggle';
  209. } elseif (get_pix_option('pix_sliding_frontpage')== 'always') {
  210. $class = 'open_toggle always_open';
  211. } elseif (get_pix_option('pix_sliding_frontpage')== 'default' && get_pix_option('pix_sliding_page')=='always') {
  212. $class = 'open_toggle always_open';
  213. }
  214. }
  215.  
  216. if((get_pix_option('pix_sidebar_frontpage_layout')=='nosidebar' && get_pix_option('pix_front_page_layout') == 'right')||get_pix_option('pix_sidebar_frontpage_layout')== 'leftsidebar'){
  217. $left = 'margin-right';
  218. $classside = 'leftsidebar';
  219. } elseif (get_pix_option('pix_sidebar_frontpage_layout')=='default' && (get_pix_option('pix_general_sidebar')=='leftsidebar' || (get_pix_option('pix_general_sidebar')=='nosidebar' && get_pix_option('pix_general_template')=='right'))) {
  220. $left = 'margin-right';
  221. }
  222.  
  223. if(get_pix_option('pix_sidebar_frontpage_layout')=='nosidebar' && get_pix_option('pix_front_page_layout') == 'wide'){ $width = 'seveneighty'; $size_th = 'wideCol'; $size_page = 710; }
  224.  
  225.  
  226.  
  227. if(get_pix_option('pix_frontpage_galleries_template')=='widepage') { $size_th = 'floatPort';
  228. $code_array = array();
  229. $code_array2 = array();
  230. global $page, $paged;
  231. if ( get_query_var('paged') ) {
  232. $paged = get_query_var('paged');
  233. } else if ( get_query_var('page') ) {
  234. $paged = get_query_var('page');
  235. } else {
  236. $paged = 1;
  237. }
  238. $args=array(
  239. 'gallery' => $cat_selected,
  240. 'post_type' => 'portfolio',
  241. 'posts_per_page' => -1,
  242. 'paged' => $paged
  243. );
  244. $my_query = null;
  245. $my_query = new WP_Query($args);
  246. $numposts = $my_query->post_count;
  247. while ( $my_query->have_posts() ) : $my_query->the_post();
  248. $terms_ar = get_the_terms( get_the_id(), 'image_tag' );
  249. if($terms_ar){
  250. foreach( $terms_ar as $term ) {
  251. if(!in_array($term->slug,$code_array)){
  252. $code_array[] = $term->slug;
  253. }
  254. if(!in_array($term->name,$code_array2)){
  255. $code_array2[] = $term->name;
  256. }
  257. unset($term);
  258. }
  259. }
  260. endwhile;
  261. if(count($code_array)!=0 && count($code_array2)!=0) {
  262. $code_array3 = array_combine($code_array, $code_array2);
  263. echo '<span id="filtering-nav"><a href="#filter" data-filter="*" class="selected">'. __('All','delight') .'</a>';
  264.  
  265. foreach( $code_array3 as $key => $value ) {
  266. echo '<a href="#filter" data-filter=".'.$key.'">'.$value.'</a>';
  267. }
  268. echo '</span>';
  269. } else {
  270. echo '<span>You must have at least one image tag (better two tags at least) to use the filter option</span>';
  271. }
  272.  
  273. wp_reset_query();
  274. ?>
  275. <div class="isoFilter">
  276. <?php
  277. $args=array(
  278. 'gallery' => $cat_selected,
  279. 'post_type' => 'portfolio',
  280. 'posts_per_page' => $posts_per_page,
  281. 'paged' => $paged
  282. );
  283. $my_query = null;
  284. $my_query = new WP_Query($args);
  285.  
  286. $i=0; while ( $my_query->have_posts() ) : $my_query->the_post();
  287. $meta_options = get_post_meta(get_the_ID(), $custom_options->get_the_id(), TRUE);
  288. $meta_destination = get_post_meta(get_the_ID(), $custom_destination->get_the_id(), TRUE);
  289. $meta_title = get_post_meta(get_the_ID(), $custom_payoff->get_the_id(), TRUE);
  290.  
  291. if($meta_title['payoff']!='') {
  292. $the_title = $meta_title['payoff'];
  293. } else {
  294. $the_title = get_the_title();
  295. }
  296. ?>
  297.  
  298. <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 ); ?>>
  299. <?php if(has_post_thumbnail()) {
  300. $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), $size_th );
  301. $imgwidth = $imgdata[1];
  302. $imgheight = $imgdata[2];
  303.  
  304. ?>
  305. <div class="imgHentry" style="width:<?php echo $imgwidth+2; ?>px; height:<?php echo $imgheight+2; ?>px; margin-top:0">
  306. <?php the_post_thumbnail($size_th); ?>
  307.  
  308. <?php
  309. $links = array();
  310. if(get_pix_option('pix_frontpage_galleries_colorbox')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_colorbox')); }
  311. if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_gotopage')); }
  312. $result = count($links);
  313. if ($result!=0) {
  314. $imgwidth2 = $imgwidth/$result;
  315. }
  316.  
  317. if(has_post_thumbnail()) {
  318. $image_id = get_post_thumbnail_id();
  319. $image_url = wp_get_attachment_image_src($image_id,'full');
  320. $image_url = $image_url[0];
  321. if($meta_destination['featured_video']!=''){
  322. if(strpos($meta_destination['featured_video'],'wp-content')==true){
  323. $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.urlencode(get_the_title());
  324. } else {
  325. $image_url = $meta_destination['featured_video'];
  326. }
  327. }
  328. }
  329. ?>
  330. <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  331. <?php if(get_pix_option('pix_frontpage_galleries_colorbox')=='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(__('Play video','delight')); } else { echo tooltip_info(__('Enlarge picture','delight')); } ?> <?php if(get_pix_option('pix_frontpage_galleries_slideshow')=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  332. <?php if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?php echo tooltip_info(__('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  333. </div>
  334. </div><!-- .imgHentry -->
  335. <?php } ?>
  336. <div class="clear"></div>
  337. </div>
  338. <?php $i++; endwhile; wp_reset_query(); ?>
  339.  
  340. </div><!-- .isoFilter -->
  341. <?php
  342. if(get_pix_option('pix_frontpage_galleries_scrolling')=='show') {
  343. getInfScroll();
  344. } else {
  345. if(function_exists('pix_pagenavi')) { pix_pagenavi( $numposts );}
  346. }
  347. ?>
  348. <?php } else { //if get_pix_option('pix_frontpage_galleries_template')!='widepage' ?>
  349. <article class="<?php echo $class.' '.$left.' '.$width; ?>">
  350. <div>
  351. <h2 class="entry-title"><?php echo stripslashes(get_pix_option( 'pix_front_page_title' )); ?></h2>
  352. <?php echo do_shortcode(wpautop(stripslashes(get_pix_option( 'pix_front_page_content' )))); ?>
  353. <?php if(get_pix_option('pix_frontpage_galleries_filterable')=='show') {
  354. $code_array = array();
  355. $code_array2 = array();
  356. global $page, $paged;
  357. if ( get_query_var('paged') ) {
  358. $paged = get_query_var('paged');
  359. } else if ( get_query_var('page') ) {
  360. $paged = get_query_var('page');
  361. } else {
  362. $paged = 1;
  363. }
  364. $args=array(
  365. 'gallery' => $cat_selected,
  366. 'post_type' => 'portfolio',
  367. 'posts_per_page' => -1,
  368. 'paged' => $paged
  369. );
  370. $my_query = null;
  371. $my_query = new WP_Query($args);
  372. while ( $my_query->have_posts() ) : $my_query->the_post();
  373. $terms_ar = get_the_terms( get_the_id(), 'image_tag' );
  374. if($terms_ar){
  375. foreach( $terms_ar as $term ) {
  376. if(!in_array($term->slug,$code_array)){
  377. $code_array[] = $term->slug;
  378. }
  379. if(!in_array($term->name,$code_array2)){
  380. $code_array2[] = $term->name;
  381. }
  382. unset($term);
  383. }
  384. }
  385. endwhile;
  386. if(count($code_array)!=0 && count($code_array2)!=0) {
  387. $code_array3 = array_combine($code_array, $code_array2);
  388. echo '<span id="filtering-nav"><a href="#filter" data-filter="*" class="selected">'. __('All','delight') .'</a>';
  389.  
  390. foreach( $code_array3 as $key => $value ) {
  391. echo '<a href="#filter" data-filter=".'.$key.'">'.$value.'</a>';
  392. }
  393. echo '</span>';
  394. } else {
  395. echo '<span>You must have at least one image tag (better two tags at least) to use the filter option</span>';
  396. }
  397.  
  398. wp_reset_query();
  399. } ?>
  400.  
  401. <?php
  402. if($size_page == 710) {
  403. switch (get_pix_option('pix_frontpage_galleries_template')) {
  404. case 'twocolumns':
  405. $isoWidth = 30;
  406. break;
  407. case 'threecolumns':
  408. $isoWidth = 7;
  409. break;
  410. case 'fourcolumns':
  411. $isoWidth = 6;
  412. break;
  413. case 'fivecolumns':
  414. $isoWidth = 0;
  415. break;
  416. }
  417. } else {
  418. switch (get_pix_option('pix_frontpage_galleries_template')) {
  419. case 'twocolumns':
  420. $isoWidth = 19;
  421. break;
  422. case 'threecolumns':
  423. $isoWidth = 6;
  424. break;
  425. case 'fourcolumns':
  426. $isoWidth = 7;
  427. break;
  428. case 'fivecolumns':
  429. $isoWidth = 1;
  430. break;
  431. }
  432. }
  433. ?>
  434.  
  435. <div class="isoFilter" style="width:<?php echo ($size_page+$isoWidth); ?>px; margin-left:-<?php echo $isoWidth; ?>px">
  436. <?php
  437. $args=array(
  438. 'gallery' => $cat_selected,
  439. 'post_type' => 'portfolio',
  440. 'posts_per_page' => $posts_per_page,
  441. 'paged' => $paged
  442. );
  443. $args2=array(
  444. 'gallery' => $cat_selected,
  445. 'post_type' => 'portfolio',
  446. 'posts_per_page' => -1,
  447. 'paged' => $paged
  448. );
  449. $my_query = null;
  450. $my_query2 = null;
  451. $my_query = new WP_Query($args);
  452. $my_query2 = new WP_Query($args2);
  453. $numposts = $my_query2->post_count;
  454.  
  455. $i=0; while ( $my_query->have_posts() ) : $my_query->the_post();
  456. $meta_options = get_post_meta(get_the_ID(), $custom_options->get_the_id(), TRUE);
  457. $meta_destination = get_post_meta(get_the_ID(), $custom_destination->get_the_id(), TRUE);
  458. $meta_title = get_post_meta(get_the_ID(), $custom_payoff->get_the_id(), TRUE);
  459.  
  460.  
  461. if($meta_title['payoff']!='') {
  462. $the_title = $meta_title['payoff'];
  463. } else {
  464. $the_title = get_the_title();
  465. }
  466. ?>
  467.  
  468. <?php if(get_pix_option('pix_frontpage_galleries_template')=='onecolumn') { ?>
  469.  
  470. <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 ); ?>>
  471. <?php if(has_post_thumbnail()) {
  472. $imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), $size_th );
  473. $imgwidth = $imgdata[1];
  474. $imgheight = $imgdata[2];
  475. ?>
  476. <div class="imgHentry" style="width:<?php echo $imgwidth+2; ?>px; height:<?php echo $imgheight+2; ?>px;">
  477. <?php the_post_thumbnail($size_th); ?>
  478. <?php
  479. $links = array();
  480. if(get_pix_option('pix_frontpage_galleries_colorbox')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_colorbox')); }
  481. if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_gotopage')); }
  482. $result = count($links);
  483. if ($result!=0) {
  484. $imgwidth2 = $imgwidth/$result;
  485. }
  486.  
  487. if(has_post_thumbnail()) {
  488. $image_id = get_post_thumbnail_id();
  489. $image_url = wp_get_attachment_image_src($image_id,'full');
  490. $image_url = $image_url[0];
  491. if($meta_destination['featured_video']!=''){
  492. if(strpos($meta_destination['featured_video'],'wp-content')==true){
  493. $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  494. } else {
  495. $image_url = $meta_destination['featured_video'];
  496. }
  497. }
  498. }
  499. ?>
  500. <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  501. <?php if(get_pix_option('pix_frontpage_galleries_colorbox')=='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(__('Play video','delight')); } else { echo tooltip_info(__('Enlarge picture','delight')); } ?> <?php if(get_pix_option('pix_frontpage_galleries_slideshow')=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  502. <?php if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?php echo tooltip_info(__('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  503. </div>
  504. </div><!-- .imgHentry -->
  505. <?php } ?>
  506. <div class="clear"></div>
  507. </div>
  508.  
  509.  
  510. <?php } elseif(get_pix_option('pix_frontpage_galleries_template')=='twocolumns') { ?>
  511.  
  512. <?php
  513. $attachment_id = get_post_thumbnail_id($post->ID);
  514. $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  515. if($size_page == 710) {
  516. $lessmargin = 30;
  517. $marginleft = 30;
  518. $imgwidth = 338;
  519. $imgheight = 191;
  520. } else {
  521. $lessmargin = 19;
  522. $marginleft = 19;
  523. $imgwidth = 203;
  524. $imgheight = 115;
  525. }
  526.  
  527. $links = array();
  528. if(get_pix_option('pix_frontpage_galleries_colorbox')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_colorbox')); }
  529. if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_gotopage')); }
  530. $result = count($links);
  531. if ($result!=0) {
  532. $imgwidth2 = $imgwidth/$result;
  533. }
  534.  
  535. if(has_post_thumbnail()) {
  536. $image_id = get_post_thumbnail_id();
  537. $image_url = wp_get_attachment_image_src($image_id,'full');
  538. $image_url = $image_url[0];
  539. if($meta_destination['featured_video']!=''){
  540. if(strpos($meta_destination['featured_video'],'wp-content')==true){
  541. $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  542. } else {
  543. $image_url = $meta_destination['featured_video'];
  544. }
  545. }
  546. }
  547. ?>
  548. <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">
  549. <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  550.  
  551. <?php if(has_post_thumbnail()) { ?>
  552. <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="">
  553. <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  554. <?php if(get_pix_option('pix_frontpage_galleries_colorbox')=='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(__('Play video','delight')); } else { echo tooltip_info(__('Enlarge picture','delight')); } ?> <?php if(get_pix_option('pix_frontpage_galleries_slideshow')=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  555. <?php if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?php echo tooltip_info(__('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  556. </div>
  557. <?php } ?>
  558. </div><!-- .imgHentry -->
  559. </div>
  560.  
  561. <?php if(($i+1)%2==0) { echo '<div class="clear"></div>'; } ?>
  562.  
  563.  
  564. <?php } elseif(get_pix_option('pix_frontpage_galleries_template')=='threecolumns') { ?>
  565.  
  566. <?php
  567. $attachment_id = get_post_thumbnail_id($post->ID);
  568. $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  569. if($size_page == 710) {
  570. $lessmargin = 14;
  571. $marginleft = 7;
  572. $imgwidth = 230;
  573. $imgheight = 130;
  574. } else {
  575. $lessmargin = 12;
  576. $marginleft = 6;
  577. $imgwidth = 137;
  578. $imgheight = 78;
  579. }
  580.  
  581. $links = array();
  582. if(get_pix_option('pix_frontpage_galleries_colorbox')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_colorbox')); }
  583. if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_gotopage')); }
  584. $result = count($links);
  585. if ($result!=0) {
  586. $imgwidth2 = $imgwidth/$result;
  587. }
  588.  
  589. if(has_post_thumbnail()) {
  590. $image_id = get_post_thumbnail_id();
  591. $image_url = wp_get_attachment_image_src($image_id,'full');
  592. $image_url = $image_url[0];
  593. if($meta_destination['featured_video']!=''){
  594. if(strpos($meta_destination['featured_video'],'wp-content')==true){
  595. $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  596. } else {
  597. $image_url = $meta_destination['featured_video'];
  598. }
  599. }
  600. }
  601. ?>
  602. <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">
  603. <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  604.  
  605. <?php if(has_post_thumbnail()) { ?>
  606. <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="">
  607. <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  608. <?php if(get_pix_option('pix_frontpage_galleries_colorbox')=='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(__('Play video','delight')); } else { echo tooltip_info(__('Enlarge picture','delight')); } ?> <?php if(get_pix_option('pix_frontpage_galleries_slideshow')=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  609. <?php if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?php echo tooltip_info(__('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  610. </div>
  611. <?php } ?>
  612. </div><!-- .imgHentry -->
  613. </div>
  614.  
  615. <?php if(($i+1)%3==0) { echo '<div class="clear"></div>'; } ?>
  616.  
  617.  
  618. <?php } elseif(get_pix_option('pix_frontpage_galleries_template')=='fourcolumns') { ?>
  619.  
  620. <?php
  621. $attachment_id = get_post_thumbnail_id($post->ID);
  622. $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  623. if($size_page == 710) {
  624. $lessmargin = 18;
  625. $marginleft = 6;
  626. $imgwidth = 171;
  627. $imgheight = 98;
  628. } else {
  629. $lessmargin = 21;
  630. $marginleft = 7;
  631. $imgwidth = 100;
  632. $imgheight = 57;
  633. }
  634.  
  635. $links = array();
  636. if(get_pix_option('pix_frontpage_galleries_colorbox')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_colorbox')); }
  637. if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_gotopage')); }
  638. $result = count($links);
  639. if ($result!=0) {
  640. $imgwidth2 = $imgwidth/$result;
  641. }
  642.  
  643. if(has_post_thumbnail()) {
  644. $image_id = get_post_thumbnail_id();
  645. $image_url = wp_get_attachment_image_src($image_id,'full');
  646. $image_url = $image_url[0];
  647. if($meta_destination['featured_video']!=''){
  648. if(strpos($meta_destination['featured_video'],'wp-content')==true){
  649. $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  650. } else {
  651. $image_url = $meta_destination['featured_video'];
  652. }
  653. }
  654. }
  655. ?>
  656. <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">
  657. <div class="imgHentry" style="width:<?php echo ($imgwidth+2); ?>px; height:<?php echo ($imgheight+2); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  658.  
  659. <?php if(has_post_thumbnail()) { ?>
  660. <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="">
  661. <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  662. <?php if(get_pix_option('pix_frontpage_galleries_colorbox')=='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(__('Play video','delight')); } else { echo tooltip_info(__('Enlarge picture','delight')); } ?> <?php if(get_pix_option('pix_frontpage_galleries_slideshow')=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  663. <?php if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?php echo tooltip_info(__('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  664. </div>
  665. <?php } ?>
  666. </div><!-- .imgHentry -->
  667. </div>
  668.  
  669. <?php if(($i+1)%4==0) { echo '<div class="clear"></div>'; } ?>
  670.  
  671.  
  672. <?php } elseif(get_pix_option('pix_frontpage_galleries_template')=='fivecolumns') { ?>
  673.  
  674. <?php
  675. $attachment_id = get_post_thumbnail_id($post->ID);
  676. $thumb_src = wp_get_attachment_image_src( $attachment_id, $size_th );
  677. if($size_page == 710) {
  678. $lessmargin = 0;
  679. $marginleft = 0;
  680. $imgwidth = 142;
  681. $imgheight = 80;
  682. } else {
  683. $lessmargin = 4;
  684. $marginleft = 1;
  685. $imgwidth = 85;
  686. $imgheight = 48;
  687. }
  688.  
  689. $links = array();
  690. if(get_pix_option('pix_frontpage_galleries_colorbox')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_colorbox')); }
  691. if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { array_push($links, get_pix_option('pix_frontpage_galleries_gotopage')); }
  692. $result = count($links);
  693. if ($result!=0) {
  694. $imgwidth2 = $imgwidth/$result;
  695. }
  696.  
  697. if(has_post_thumbnail()) {
  698. $image_id = get_post_thumbnail_id();
  699. $image_url = wp_get_attachment_image_src($image_id,'full');
  700. $image_url = $image_url[0];
  701. if($meta_destination['featured_video']!=''){
  702. if(strpos($meta_destination['featured_video'],'wp-content')==true){
  703. $image_url = get_bloginfo('stylesheet_directory').'/scripts/flowplayer.php?movie='.$meta_destination['featured_video'].'&amp;title='.get_the_title();
  704. } else {
  705. $image_url = $meta_destination['featured_video'];
  706. }
  707. }
  708. }
  709. ?>
  710. <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">
  711. <div class="imgHentry" style="width:<?php echo ($imgwidth); ?>px; height:<?php echo ($imgheight); ?>px; margin-top:<?php echo ($marginleft); ?>px">
  712.  
  713. <?php if(has_post_thumbnail()) { ?>
  714. <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; ?>">
  715. <div class="linkIcon" style="width:<?php echo $imgwidth; ?>px; height:<?php echo $imgheight; ?>px;"><?php $the_id = get_the_ID(); ?>
  716. <?php if(get_pix_option('pix_frontpage_galleries_colorbox')=='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(__('Play video','delight')); } else { echo tooltip_info(__('Enlarge picture','delight')); } ?> <?php if(get_pix_option('pix_frontpage_galleries_slideshow')=='show') { ?> data-rel="portfolio"<?php } ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  717. <?php if(get_pix_option('pix_frontpage_galleries_gotopage')=='show') { ?><a href="<?php the_permalink(); ?>" class="goto-icon" <?php echo tooltip_info(__('Go to the attachment page','delight')); ?> style="width:<?php echo $imgwidth2; ?>px; height:<?php echo $imgheight; ?>px;">&nbsp;</a><?php } ?>
  718. </div>
  719. <?php } ?>
  720. </div><!-- .imgHentry -->
  721. </div>
  722.  
  723.  
  724. <?php } ?>
  725. <?php $i++; endwhile; ?>
  726. </div><!-- .isoFilter -->
  727. <?php
  728. if(get_pix_option('pix_frontpage_galleries_scrolling')=='show') {
  729. getInfScroll();
  730. } else {
  731. if(function_exists('pix_pagenavi')) { pix_pagenavi( $numposts );}
  732. }
  733. ?>
  734. </div>
  735. </article>
  736.  
  737. <?php }//if get_pix_option('pix_frontpage_galleries_template')=='widepage'
  738.  
  739. if (get_pix_option('pix_frontpage_galleries_template')!='widepage' && (get_pix_option('pix_sidebar_frontpage_layout')== 'rightsidebar' || (get_pix_option('pix_sidebar_frontpage_layout')=='default' && get_pix_option('pix_general_sidebar')=='rightsidebar' ) ) ) { ?>
  740. <aside class="<?php echo $classside.' '.$class; ?>">
  741. <div>
  742. <?php dynamic_sidebar(get_pix_option('pix_sidebar_frontpage')); ?>
  743. </div>
  744. </aside>
  745. <?php }
  746. wp_reset_query();
  747. ?>
  748.  
  749. </section>
  750. <?php get_footer(); ?>
  751. <?php } else { ?>
  752. <section>
  753. </section>
  754. <?php get_footer(); ?>
  755. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement