|
1 <!--grab theme option variables--> |
|
2 <?php |
|
3 global $options; |
|
4 foreach ($options as $value) { |
|
5 if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } |
|
6 } |
|
7 ?> |
|
8 <!--slider javascript settings--> |
|
9 <script type="text/javascript"> |
|
10 function startGallery() { |
|
11 var myGallery = new gallery($('myGallery'), { |
|
12 timed: <?php if ($apa_auto_slide_show == '') {echo 'true';}else{echo 'false';} ?>, |
|
13 textShowCarousel: '<?php if ($apa_feature_cat_name == '') {echo 'latest posts';}else{echo $apa_feature_cat_name;} ?>' |
|
14 }); |
|
15 } |
|
16 window.addEvent('domready',startGallery); |
|
17 </script> |
|
18 <!--start gallery--> |
|
19 <div class="content" <?php if (is_paged()){echo 'style="display:none;"';} ?>> |
|
20 <div id="myGallery"> |
|
21 <!--the loop--> |
|
22 <?php query_posts(array('showposts' => 5, 'orderby'=> date, 'order' => DES, 'category_name' => $apa_feature_cat_name)); |
|
23 $saved_ids = array(); |
|
24 while (have_posts()) : the_post(); |
|
25 $saved_ids[] = get_the_ID(); |
|
26 $values = get_post_custom_values("image"); ?> |
|
27 <!--custom images conditional statements--> |
|
28 |
|
29 <!--first, check if there's post thumbnail - wp 2.9--> |
|
30 <?php if ( has_post_thumbnail() ) { ?> |
|
31 <div class="imageElement"> |
|
32 <h3><?php the_title(); ?></h3> |
|
33 <?php the_excerpt(); ?> |
|
34 <a href="<?php the_permalink() ?>" title="Go to Article" class="open"></a> |
|
35 <?php the_post_thumbnail(array( 590, 278 ), array( 'class' => 'full' )); ?> |
|
36 <?php the_post_thumbnail(array( 100, 75 ), array( 'class' => 'thumbnail' )); ?> |
|
37 </div> |
|
38 |
|
39 <!--define a gallery element if theres a custom image pictrue--> |
|
40 <?php }elseif(isset($values[0])) {?> |
|
41 <div class="imageElement"> |
|
42 <h3><?php the_title(); ?></h3> |
|
43 <?php the_excerpt(); ?> |
|
44 <a href="<?php the_permalink() ?>" title="Go to Article" class="open"></a> |
|
45 <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $values[0]; ?>&h=278&w=590&zc=1&q=100" class="full" alt="<?php the_title(); ?>"/> |
|
46 <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $values[0]; ?>&h=75&w=100&zc=1&q=100" class="thumbnail" alt="<?php the_title(); ?>"/> |
|
47 </div> |
|
48 <?php }else{?> |
|
49 |
|
50 <!--if none - assign the temp image--> |
|
51 <div class="imageElement"> |
|
52 <h3><?php the_title(); ?></h3> |
|
53 <?php the_excerpt(); ?> |
|
54 <a href="<?php the_permalink() ?>" title="Go to Article" class="open"></a> |
|
55 <img src="<?php bloginfo('template_directory'); ?>/images/temp-image-large.jpg" class="full" alt="<?php the_title(); ?>"/> |
|
56 <img src="<?php bloginfo('template_directory'); ?>/images/temp-image-small.jpg" class="thumbnail" alt="<?php the_title(); ?>"/> |
|
57 </div> |
|
58 <?php } ?> |
|
59 |
|
60 <?php endwhile; wp_reset_query(); ?> |
|
61 </div><!--myGallery--> |
|
62 </div><!--content--> |