136
|
1 |
<?php global $is_ajax; $is_ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']); if (!$is_ajax) get_header(); ?> |
|
2 |
<?php $wptouch_settings = bnc_wptouch_get_settings(); ?> |
|
3 |
|
|
4 |
<div class="content" id="content<?php echo md5($_SERVER['REQUEST_URI']); ?>"> |
|
5 |
|
|
6 |
<div class="result-text"><?php wptouch_core_body_result_text(); ?></div> |
|
7 |
|
|
8 |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> |
|
9 |
<div class="post" id="post-<?php the_ID(); ?>"> |
|
10 |
|
|
11 |
<?php if (!function_exists('dsq_comments_template') && !function_exists('id_comments_template')) { ?> |
|
12 |
<?php if (wp_touch_get_comment_count() > 0 && !is_archive() && !is_search()) { ?> |
|
13 |
<div <?php if ($wptouch_settings['post-cal-thumb'] == 'nothing-shown') { echo 'id="nothing-shown" ';} ?>class="comment-bubble<?php if (wp_touch_get_comment_count() > 99) echo('-big'); ?>"> |
|
14 |
<?php comments_number('0','1','%'); ?> |
|
15 |
</div> |
|
16 |
<?php } ?> |
|
17 |
<?php } ?> |
|
18 |
|
|
19 |
|
|
20 |
<?php if (is_archive() || is_search()) { ?> |
|
21 |
<div class="archive-top"> |
|
22 |
<div class="archive-top-right"> |
|
23 |
<?php if (bnc_excerpt_enabled()) { ?> |
|
24 |
<script type="text/javascript"> |
|
25 |
$wptouch(document).ready(function(){ |
|
26 |
$wptouch("a#arrow-<?php the_ID(); ?>").click(function(event) { |
|
27 |
$wptouch(this).toggleClass("post-arrow-down"); |
|
28 |
$wptouch('#entry-<?php the_ID(); ?>').fadeToggle(500); |
|
29 |
}); |
|
30 |
}); |
|
31 |
</script> |
|
32 |
<a class="post-arrow" id="arrow-<?php the_ID(); ?>" href="javascript: return false;"></a> |
|
33 |
<?php } ?> |
|
34 |
</div> |
|
35 |
<div id="arc-top" class="archive-top-left month-<?php echo get_the_time('m') ?>"> |
|
36 |
<?php echo get_the_time('M') ?> <?php echo get_the_time('j') ?>, <?php echo get_the_time('Y') ?> |
|
37 |
</div> |
|
38 |
</div> |
|
39 |
<?php } else { ?> |
|
40 |
<?php if (bnc_excerpt_enabled()) { ?> |
|
41 |
<script type="text/javascript"> |
|
42 |
$wptouch(document).ready(function(){ |
|
43 |
$wptouch("a#arrow-<?php the_ID(); ?>").click(function(event) { |
|
44 |
$wptouch(this).toggleClass("post-arrow-down"); |
|
45 |
$wptouch('#entry-<?php the_ID(); ?>').fadeToggle(500); |
|
46 |
}); |
|
47 |
}); |
|
48 |
</script> |
|
49 |
|
|
50 |
<a class="post-arrow" id="arrow-<?php the_ID(); ?>" href="javascript: return false;"></a> |
|
51 |
<?php } ?> |
|
52 |
|
|
53 |
|
|
54 |
<?php |
|
55 |
$version = bnc_get_wp_version(); |
|
56 |
if ($version >= 2.9 && $wptouch_settings['post-cal-thumb'] != 'calendar-icons' && $wptouch_settings['post-cal-thumb'] != 'nothing-shown') { ?> |
|
57 |
<div class="wptouch-post-thumb-wrap"> |
|
58 |
<div class="thumb-top-left"></div><div class="thumb-top-right"></div> |
|
59 |
<div class="wptouch-post-thumb"> |
|
60 |
<?php |
|
61 |
if (function_exists('p75GetThumbnail')) { |
|
62 |
if ( p75HasThumbnail($post->ID) ) { ?> |
|
63 |
|
|
64 |
<img src="<?php echo p75GetThumbnail($post->ID); ?>" alt="post thumbnail" /> |
|
65 |
|
|
66 |
<?php } else { ?> |
|
67 |
<?php |
|
68 |
$total = '24'; $file_type = '.jpg'; |
|
69 |
|
|
70 |
// Change to the location of the folder containing the images |
|
71 |
$image_folder = '' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/'; |
|
72 |
$start = '1'; $random = mt_rand($start, $total); $image_name = $random . $file_type; |
|
73 |
|
|
74 |
if ($wptouch_settings['post-cal-thumb'] == 'post-thumbnails-random') { |
|
75 |
echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />"; |
|
76 |
} else { |
|
77 |
echo '<img src="' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/thumb-empty.jpg" alt="thumbnail" />'; |
|
78 |
} |
|
79 |
?> |
|
80 |
<?php } ?> |
|
81 |
|
|
82 |
<?php } elseif (get_post_custom_values('Thumbnail') == true) { ?> |
|
83 |
|
|
84 |
<img src="<?php $custom_fields = get_post_custom($post_ID); $my_custom_field = $custom_fields['Thumbnail']; foreach ( $my_custom_field as $key => $value ) echo "$value"; ?>" alt="custom-thumbnail" /> |
|
85 |
|
|
86 |
<?php } elseif (function_exists('the_post_thumbnail') && !function_exists('p75GetThumbnail')) { ?> |
|
87 |
|
|
88 |
<?php if (has_post_thumbnail()) { ?> |
|
89 |
<?php the_post_thumbnail(); ?> |
|
90 |
|
|
91 |
<?php } else { ?> |
|
92 |
|
|
93 |
<?php |
|
94 |
$total = '24'; $file_type = '.jpg'; |
|
95 |
|
|
96 |
// Change to the location of the folder containing the images |
|
97 |
$image_folder = '' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/'; |
|
98 |
$start = '1'; $random = mt_rand($start, $total); $image_name = $random . $file_type; |
|
99 |
|
|
100 |
if ($wptouch_settings['post-cal-thumb'] == 'post-thumbnails-random') { |
|
101 |
echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />"; |
|
102 |
} else { |
|
103 |
echo '<img src="' . compat_get_plugin_url( 'wptouch' ) . '/themes/core/core-images/thumbs/thumb-empty.jpg" alt="thumbnail" />'; |
|
104 |
} |
|
105 |
?> |
|
106 |
<?php } } ?> |
|
107 |
</div> |
|
108 |
<div class="thumb-bottom-left"></div><div class="thumb-bottom-right"></div> |
|
109 |
</div> |
|
110 |
<?php } elseif ($wptouch_settings['post-cal-thumb'] == 'calendar-icons') { ?> |
|
111 |
<div class="calendar"> |
|
112 |
<div class="cal-month month-<?php echo get_the_time('m') ?>"><?php echo get_the_time('M') ?></div> |
|
113 |
<div class="cal-date"><?php echo get_the_time('j') ?></div> |
|
114 |
</div> |
|
115 |
<?php } elseif ($wptouch_settings['post-cal-thumb'] == 'nothing-shown') { } else { ?> |
|
116 |
<div class="calendar"> |
|
117 |
<div class="cal-month month-<?php echo get_the_time('m') ?>"><?php echo get_the_time('M') ?></div> |
|
118 |
<div class="cal-date"><?php echo get_the_time('j') ?></div> |
|
119 |
</div> |
|
120 |
<?php } ?> |
|
121 |
|
|
122 |
<?php } ?> |
|
123 |
|
|
124 |
<a class="h2" href="<?php the_permalink(); ?>"><?php the_title(); ?></a> |
|
125 |
<div class="post-author"> |
|
126 |
<?php if ($wptouch_settings['post-cal-thumb'] != 'calendar-icons') { ?><span class="lead"><?php _e("Written on", "wptouch"); ?></span> <?php echo get_the_time('M') ?> <?php echo get_the_time('j') ?>, <?php echo get_the_time('Y') ?><?php if (!bnc_show_author()) { echo '<br />';} ?><?php } ?> |
|
127 |
<?php if (bnc_show_author()) { ?><span class="lead"><?php _e("By", "wptouch"); ?></span> <?php the_author(); ?><br /><?php } ?> |
|
128 |
<?php if (bnc_show_categories()) { echo('<span class="lead">' . __( 'Categories', 'wptouch' ) . ':</span> '); the_category(', '); echo('<br />'); } ?> |
|
129 |
<?php if (bnc_show_tags() && get_the_tags()) { the_tags('<span class="lead">' . __( 'Tags', 'wptouch' ) . ':</span> ', ', ', ''); } ?> |
|
130 |
</div> |
|
131 |
<div class="clearer"></div> |
|
132 |
<div id="entry-<?php the_ID(); ?>" <?php if (bnc_excerpt_enabled()) { ?>style="display:none"<?php } ?> class="mainentry <?php echo $wptouch_settings['style-text-size']; ?> <?php echo $wptouch_settings['style-text-justify']; ?>"> |
|
133 |
<?php the_excerpt(); ?> |
|
134 |
<a class="read-more" href="<?php the_permalink() ?>"><?php _e( "Read This Post", "wptouch" ); ?></a> |
|
135 |
</div> |
|
136 |
</div> |
|
137 |
|
|
138 |
<?php endwhile; ?> |
|
139 |
|
|
140 |
<?php if (!function_exists('dsq_comments_template') && !function_exists('id_comments_template')) { ?> |
|
141 |
|
|
142 |
<div id="call<?php echo md5($_SERVER['REQUEST_URI']); ?>" class="ajax-load-more"> |
|
143 |
<div id="spinner<?php echo md5($_SERVER['REQUEST_URI']); ?>" class="spin" style="display:none"></div> |
|
144 |
<a class="ajax" href="#" onclick="$wptouch('#spinner<?php echo md5($_SERVER['REQUEST_URI']); ?>').fadeIn(200); $wptouch('#ajaxentries<?php echo md5($_SERVER['REQUEST_URI']); ?>').load('<?php echo get_next_posts_page_link(); ?>', {}, function(){ $wptouch('#call<?php echo md5($_SERVER['REQUEST_URI']); ?>').fadeOut();}); return false;"> |
|
145 |
<?php _e( "Load more entries...", "wptouch" ); ?> |
|
146 |
</a> |
|
147 |
</div> |
|
148 |
<div id="ajaxentries<?php echo md5($_SERVER['REQUEST_URI']); ?>"></div> |
|
149 |
|
|
150 |
<?php } else { ?> |
|
151 |
<div class="main-navigation"> |
|
152 |
<div class="alignleft"> |
|
153 |
<?php previous_posts_link( __( 'Newer Entries', 'wptouch') ) ?> |
|
154 |
</div> |
|
155 |
<div class="alignright"> |
|
156 |
<?php next_posts_link( __('Older Entries', 'wptouch')) ?> |
|
157 |
</div> |
|
158 |
</div> |
|
159 |
<?php } ?> |
|
160 |
</div><!-- #End post --> |
|
161 |
|
|
162 |
<?php else : ?> |
|
163 |
|
|
164 |
<div class="result-text-footer"> |
|
165 |
<?php wptouch_core_else_text(); ?> |
|
166 |
</div> |
|
167 |
|
|
168 |
<?php endif; ?> |
|
169 |
|
|
170 |
<!-- Here we're establishing whether the page was loaded via Ajax or not, for dynamic purposes. If it's ajax, we're not bringing in footer.php --> |
|
171 |
<?php global $is_ajax; if (!$is_ajax) get_footer(); ?> |