SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | /** | |
3 | * @author madars.bitenieks | |
4 | * @copyright 2011 | |
5 | */ | |
6 | ||
7 | - | get_header(); |
7 | + | get_header(); |
8 | ||
9 | ||
10 | ||
11 | ||
12 | - | $post_types=get_post_types('','names'); |
12 | + | $post_types=get_post_types('','names'); |
13 | foreach ($post_types as $post_type ) { | |
14 | - | } |
14 | + | } |
15 | ||
16 | $slides = get_post_meta($post->ID,'slides', true); | |
17 | - | $sidebar=get_post_meta($post->ID, "madza_sidebar_type", true); |
17 | + | $sidebar=get_post_meta($post->ID, "madza_sidebar_type", true); |
18 | $single_thumb=get_post_meta($post->ID, "madza_post_single_thumb_size", true); | |
19 | ||
20 | ||
21 | ||
22 | - | $image_type = get_post_meta(get_the_ID(), 'tz_post_thumb_single', TRUE); |
22 | + | $image_type = get_post_meta(get_the_ID(), 'tz_post_thumb_single', TRUE); |
23 | - | $height = get_post_meta(get_the_ID(), 'tz_post_image_height', TRUE); |
23 | + | |
24 | - | $height2 = get_post_meta(get_the_ID(), 'tz_post_image_height2', TRUE); |
24 | + | $height2 = get_post_meta(get_the_ID(), 'tz_post_image_height2', TRUE); |
25 | - | $height3 = get_post_meta(get_the_ID(), 'tz_post_image_height3', TRUE); |
25 | + | $height3 = get_post_meta(get_the_ID(), 'tz_post_image_height3', TRUE); |
26 | - | $height4 = get_post_meta(get_the_ID(), 'tz_post_image_height4', TRUE); |
26 | + | $height4 = get_post_meta(get_the_ID(), 'tz_post_image_height4', TRUE); |
27 | - | $height5 = get_post_meta(get_the_ID(), 'tz_post_image_height5', TRUE); |
27 | + | $height5 = get_post_meta(get_the_ID(), 'tz_post_image_height5', TRUE); |
28 | - | $image1 = get_post_meta(get_the_ID(), 'tz_post_image', TRUE); |
28 | + | $image1 = get_post_meta(get_the_ID(), 'tz_post_image', TRUE); |
29 | - | $image2 = get_post_meta(get_the_ID(), 'tz_post_image2', TRUE); |
29 | + | $image2 = get_post_meta(get_the_ID(), 'tz_post_image2', TRUE); |
30 | - | $image3 = get_post_meta(get_the_ID(), 'tz_post_image3', TRUE); |
30 | + | $image3 = get_post_meta(get_the_ID(), 'tz_post_image3', TRUE); |
31 | - | $image4 = get_post_meta(get_the_ID(), 'tz_post_image4', TRUE); |
31 | + | $image4 = get_post_meta(get_the_ID(), 'tz_post_image4', TRUE); |
32 | $image5 = get_post_meta(get_the_ID(), 'tz_post_image5', TRUE); | |
33 | $height = get_post_meta(get_the_ID(), 'tz_post_image_height', TRUE); | |
34 | $embed = get_post_meta(get_the_ID(), 'tz_post_embed_code', TRUE); | |
35 | $heightSingle = get_post_meta(get_the_ID(), 'tz_video_height_single', TRUE); | |
36 | $mp4 = get_post_meta(get_the_ID(), 'tz_video_m4v', TRUE); | |
37 | $webm = get_post_meta(get_the_ID(), 'tz_video_webm', TRUE); | |
38 | $ogv = get_post_meta(get_the_ID(), 'tz_video_ogv', TRUE); | |
39 | $image_prew = get_post_meta(get_the_ID(), 'tz_video_poster', TRUE); | |
40 | ||
41 | ||
42 | - | if ( have_posts() ) while ( have_posts() ) : the_post(); |
42 | + | if ( have_posts() ) while ( have_posts() ) : the_post(); |
43 | ?> | |
44 | ||
45 | <!--TEXT CONTENT --> | |
46 | - | ?> |
46 | + | <div class="<?php $sidebar=get_post_meta($post->ID, "madza_sidebar_type", true); if($sidebar=="Left") { echo "right-content"; } else { echo "left-content"; } ?>"> |
47 | ||
48 | <?php | |
49 | ||
50 | if ($heightSingle == '' AND $embed == '' AND $image1 == '' AND $image2 == '' AND $image3 == '' AND $image4 == '' AND $image5 == '' AND has_post_thumbnail() ) { | |
51 | - | <!--TEXT CONTENT --> |
51 | + | |
52 | - | <div class="<?php $sidebar=get_post_meta($post->ID, "madza_sidebar_type", true); if($sidebar=="Left") { echo "right-content"; } else { echo "left-content"; } ?>"> |
52 | + | the_post_thumbnail("post-670"); |
53 | ||
54 | - | <?php |
54 | + | } else if ($image1 != '') { ?> |
55 | <?php if($image2 != '' or $image3 != '' or $image4 != '' or $image5 != '') {?><div id="single-slider"><?php } ?> | |
56 | - | if ($heightSingle == '' AND $embed == '' AND $image1 == '' AND $image2 == '' AND $image3 == '' AND $image4 == '' AND $image5 == '' AND has_post_thumbnail() ) { |
56 | + | <ul style="margin-top:0px;" class="slider-ul-single" id="circle-slidrer"> |
57 | ||
58 | - | the_post_thumbnail("post-670"); |
58 | + | <?php if($image1 != '') : ?> |
59 | - | |
59 | + | <li><img height="<?php echo $height; ?>" width="670" src="<?php echo $image1; ?>" alt="<?php the_title(); ?>" /></li> |
60 | - | } else if ($image1 != '') { ?> |
60 | + | <?php endif; ?> |
61 | - | <?php if($image2 != '' or $image3 != '' or $image4 != '' or $image5 != '') {?><div id="single-slider"><?php } ?> |
61 | + | |
62 | - | <ul style="margin-top:0px;" class="slider-ul-single" id="circle-slidrer"> |
62 | + | <?php if($image2 != '') : ?> |
63 | - | |
63 | + | <li><img height="<?php echo $height2; ?>" width="670" src="<?php echo $image2; ?>" alt="<?php the_title(); ?>" /></li> |
64 | - | <?php if($image1 != '') : ?> |
64 | + | <?php endif; ?> |
65 | - | <li><img height="<?php echo $height; ?>" width="670" src="<?php echo $image1; ?>" alt="<?php the_title(); ?>" /></li> |
65 | + | |
66 | <?php if($image3 != '') : ?> | |
67 | - | |
67 | + | <li><img height="<?php echo $height3; ?>" width="670" src="<?php echo $image3; ?>" alt="<?php the_title(); ?>" /></li> |
68 | - | <?php if($image2 != '') : ?> |
68 | + | <?php endif; ?> |
69 | - | <li><img height="<?php echo $height2; ?>" width="670" src="<?php echo $image2; ?>" alt="<?php the_title(); ?>" /></li> |
69 | + | |
70 | <?php if($image4 != '') : ?> | |
71 | - | |
71 | + | <li><img height="<?php echo $height4; ?>" width="670" src="<?php echo $image4; ?>" alt="<?php the_title(); ?>" /></li> |
72 | - | <?php if($image3 != '') : ?> |
72 | + | <?php endif; ?> |
73 | - | <li><img height="<?php echo $height3; ?>" width="670" src="<?php echo $image3; ?>" alt="<?php the_title(); ?>" /></li> |
73 | + | |
74 | <?php if($image5 != '') : ?> | |
75 | - | |
75 | + | <li><img height="<?php echo $height5; ?>" width="670" src="<?php echo $image5; ?>" alt="<?php the_title(); ?>" /></li> |
76 | - | <?php if($image4 != '') : ?> |
76 | + | <?php endif; ?> |
77 | - | <li><img height="<?php echo $height4; ?>" width="670" src="<?php echo $image4; ?>" alt="<?php the_title(); ?>" /></li> |
77 | + | |
78 | ||
79 | - | |
79 | + | |
80 | - | <?php if($image5 != '') : ?> |
80 | + | </ul> |
81 | - | <li><img height="<?php echo $height5; ?>" width="670" src="<?php echo $image5; ?>" alt="<?php the_title(); ?>" /></li> |
81 | + | <?php if($image2 != '' or $image3 != '' or $image4 != '' or $image5 != '') {?> |
82 | ||
83 | <div class="single-blog-nav"> | |
84 | <div id="next2"></div> | |
85 | - | |
85 | + | <div id="prev2"></div> |
86 | - | </ul> |
86 | + | <div class="clear"></div> |
87 | - | <?php if($image2 != '' or $image3 != '' or $image4 != '' or $image5 != '') {?> |
87 | + | </div> |
88 | - | |
88 | + | |
89 | - | <div class="single-blog-nav"> |
89 | + | <script type="text/javascript"> |
90 | - | <div id="next2"></div> |
90 | + | var $j = jQuery.noConflict(); |
91 | - | <div id="prev2"></div> |
91 | + | $j(document).ready(function(){ |
92 | - | <div class="clear"></div> |
92 | + | $j('#circle-slidrer').cycle({ |
93 | - | </div> |
93 | + | fx: 'scrollHorz', |
94 | - | |
94 | + | speed: 1000, |
95 | - | <script type="text/javascript"> |
95 | + | before: onBefore, |
96 | - | var $j = jQuery.noConflict(); |
96 | + | timeout: 0, |
97 | - | $j(document).ready(function(){ |
97 | + | after: onAfter, |
98 | - | $j('#circle-slidrer').cycle({ |
98 | + | next: '#next2', |
99 | - | fx: 'scrollHorz', |
99 | + | prev: '#prev2', |
100 | - | speed: 1000, |
100 | + | easing: 'easeInOutExpo', |
101 | - | before: onBefore, |
101 | + | sync: true |
102 | - | timeout: 0, |
102 | + | }); |
103 | - | after: onAfter, |
103 | + | function onAfter(curr, next, opts, fwd) { |
104 | - | next: '#next2', |
104 | + | var $ht = $j(this).height(); |
105 | - | prev: '#prev2', |
105 | + | |
106 | - | easing: 'easeInOutExpo', |
106 | + | $j(this).parent().animate({height: $ht}); |
107 | - | sync: true |
107 | + | }; |
108 | - | }); |
108 | + | function onBefore(curr, next, opts, fwd) { |
109 | - | function onAfter(curr, next, opts, fwd) { |
109 | + | var $ht = $j(this).height(); |
110 | - | var $ht = $j(this).height(); |
110 | + | |
111 | - | |
111 | + | $j(this).parent().animate({height: $ht}); |
112 | - | $j(this).parent().animate({height: $ht}); |
112 | + | }; |
113 | - | }; |
113 | + | }); |
114 | - | function onBefore(curr, next, opts, fwd) { |
114 | + | </script> |
115 | - | var $ht = $j(this).height(); |
115 | + | </div> |
116 | - | |
116 | + | <?php } |
117 | - | $j(this).parent().animate({height: $ht}); |
117 | + | |
118 | - | }; |
118 | + | } else if($heightSingle != '') { ?> |
119 | - | }); |
119 | + | |
120 | - | </script> |
120 | + | |
121 | - | </div> |
121 | + | <script type="text/javascript" charset="utf-8"> VideoJS.setupAllWhenReady(); </script> |
122 | - | <?php } |
122 | + | |
123 | - | |
123 | + | <!-- Begin VideoJS --> |
124 | - | } else if($heightSingle != '') { ?> |
124 | + | <div class="video-js-box"> |
125 | - | |
125 | + | <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody --> |
126 | - | |
126 | + | <video class="video-js" width="670" height="<?php echo $heightSingle; ?>" controls preload poster="<?php echo $image_prew; ?>"> |
127 | - | <script type="text/javascript" charset="utf-8"> VideoJS.setupAllWhenReady(); </script> |
127 | + | <source src="<?php echo $mp4; ?>" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> |
128 | - | |
128 | + | <source src="<?php echo $webm; ?>" type='video/webm; codecs="vp8, vorbis"' /> |
129 | - | <!-- Begin VideoJS --> |
129 | + | <source src="<?php echo $ogv; ?>" type='video/ogg; codecs="theora, vorbis"' /> |
130 | - | <div class="video-js-box"> |
130 | + | <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. --> |
131 | - | <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody --> |
131 | + | <object class="vjs-flash-fallback" width="670" height="<?php echo $heightSingle; ?>" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"> |
132 | - | <video class="video-js" width="670" height="<?php echo $heightSingle; ?>" controls preload poster="<?php echo $image_prew; ?>"> |
132 | + | <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /> |
133 | - | <source src="<?php echo $mp4; ?>" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> |
133 | + | <param name="allowfullscreen" value="true" /> |
134 | - | <source src="<?php echo $webm; ?>" type='video/webm; codecs="vp8, vorbis"' /> |
134 | + | <param name="flashvars" value='config={"playlist":["<?php echo $image_prew; ?>", {"url": "<?php echo $mp4; ?>","autoPlay":false,"autoBuffering":true}]}' /> |
135 | - | <source src="<?php echo $ogv; ?>" type='video/ogg; codecs="theora, vorbis"' /> |
135 | + | <!-- Image Fallback. Typically the same as the poster image. --> |
136 | - | <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. --> |
136 | + | <img src="<?php echo $image_prew; ?>" width="670" height="<?php echo $heightSingle; ?>" alt="Poster Image" title="No video playback capabilities." /> |
137 | - | <object class="vjs-flash-fallback" width="670" height="<?php echo $heightSingle; ?>" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"> |
137 | + | </object> |
138 | - | <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /> |
138 | + | </video> |
139 | - | <param name="allowfullscreen" value="true" /> |
139 | + | |
140 | - | <param name="flashvars" value='config={"playlist":["<?php echo $image_prew; ?>", {"url": "<?php echo $mp4; ?>","autoPlay":false,"autoBuffering":true}]}' /> |
140 | + | </div> |
141 | - | <!-- Image Fallback. Typically the same as the poster image. --> |
141 | + | <!-- End VideoJS --> |
142 | - | <img src="<?php echo $image_prew; ?>" width="670" height="<?php echo $heightSingle; ?>" alt="Poster Image" title="No video playback capabilities." /> |
142 | + | <?php |
143 | - | </object> |
143 | + | } else if ( $embed!="" ) { |
144 | - | </video> |
144 | + | |
145 | - | |
145 | + | ?><?php echo stripslashes(htmlspecialchars_decode($embed)); ?><?php |
146 | - | </div> |
146 | + | |
147 | - | <!-- End VideoJS --> |
147 | + | } |
148 | - | <?php |
148 | + | |
149 | - | } else if ( $embed!="" ) { |
149 | + | ?> |
150 | ||
151 | - | ?><?php echo stripslashes(htmlspecialchars_decode($embed)); ?><?php |
151 | + | |
152 | - | |
152 | + | |
153 | - | } |
153 | + | <!-- <h1 style="margin-bottom:0px;"><?php the_title(); ?></h1> --> |
154 | ||
155 | - | ?> |
155 | + | |
156 | <div id="single-content-div"><?php the_content(); ?> </div> | |
157 | ||
158 | ||
159 | - | <!-- <h1 style="margin-bottom:0px;"><?php the_title(); ?></h1> --> |
159 | + | |
160 | - | |
160 | + | |
161 | <p class="callme2" style="margin: 0 0 0 11px;"><a href="tel:014130636">Click this button</a></p> | |
162 | - | <div id="single-content-div"><?php the_content(); ?> </div> |
162 | + | |
163 | <!--<div class="single-meta-frame"> | |
164 | ||
165 | <?php if ( count( get_the_category() ) ) : ?> | |
166 | <div class="cat-links"> | |
167 | - | <p class="callme2" style="margin: 0 0 0 11px;"><a href="tel:014130636">Click this button</a></p> |
167 | + | |
168 | - | |
168 | + | <?php if (of_get_option("meta_date")=="1") { |
169 | - | <!--<div class="single-meta-frame"> |
169 | + | |
170 | ?><div class="meta-date-blog"><?php the_time('F jS, Y'); ?></div><?php | |
171 | ||
172 | } | |
173 | - | |
173 | + | |
174 | - | <?php if (of_get_option("meta_date")=="1") { |
174 | + | if (of_get_option("meta_category")=="1") { |
175 | - | |
175 | + | |
176 | ?><div class="meta-category-blog"><?php _e( 'In: ', "madza_translate" ); printf( __( '%2$s' , 'madza_translate'), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?></div><?php | |
177 | - | |
177 | + | |
178 | } ?> | |
179 | - | |
179 | + | |
180 | - | if (of_get_option("meta_category")=="1") { |
180 | + | <?php if (of_get_option("meta_author")=="1") { |
181 | - | |
181 | + | |
182 | ?><div class="meta-author-blog"><?php _e( 'By: ', "madza_translate" ); the_author_posts_link(); ?></div><?php | |
183 | - | |
183 | + | |
184 | } ?> | |
185 | - | |
185 | + | |
186 | - | <?php if (of_get_option("meta_author")=="1") { |
186 | + | <?php if (of_get_option("meta_comment")=="1") { |
187 | - | |
187 | + | |
188 | ?><div class="meta-comment-blog"><?php comments_popup_link( __( ' Comments: 0', "madza_translate"), __( ' Comment: 1', "madza_translate" ), __( ' Comments: %', "madza_translate"), '0', '0' ); ?></div><?php | |
189 | - | |
189 | + | |
190 | } ?> | |
191 | - | |
191 | + | |
192 | - | <?php if (of_get_option("meta_comment")=="1") { |
192 | + | |
193 | - | |
193 | + | |
194 | - | ?><div class="meta-comment-blog"><?php comments_popup_link( __( ' Comments: 0', "madza_translate"), __( ' Comment: 1', "madza_translate" ), __( ' Comments: %', "madza_translate"), '0', '0' ); ?></div><?php |
194 | + | |
195 | - | |
195 | + | |
196 | </div>--> | |
197 | - | |
197 | + | <div class="clear"></div> |
198 | <?php if ( ! dynamic_sidebar( 'text-widget-area' ) ) : ?> | |
199 | - | |
199 | + | |
200 | - | <?php endif; ?> |
200 | + | <?php endif; // end text widget area ?> |
201 | - | |
201 | + | |
202 | - | </div>--> |
202 | + | |
203 | - | <div class="clear"></div> |
203 | + | |
204 | - | <?php if ( ! dynamic_sidebar( 'text-widget-area' ) ) : ?> |
204 | + | <?php |
205 | - | |
205 | + | |
206 | - | <?php endif; // end text widget area ?> |
206 | + | if (of_get_option("about_author")=="1"){ |
207 | - | |
207 | + | |
208 | - | |
208 | + | if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?> |
209 | - | |
209 | + | |
210 | - | <?php |
210 | + | |
211 | - | |
211 | + | |
212 | - | if (of_get_option("about_author")=="1"){ |
212 | + | <div id="entry_author_info"> |
213 | - | |
213 | + | |
214 | - | if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?> |
214 | + | <div id="author_avatar"> |
215 | - | |
215 | + | |
216 | - | |
216 | + | <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'Gooseo_author_bio_avatar_size', 68 ) ); ?> |
217 | - | |
217 | + | |
218 | - | <div id="entry_author_info"> |
218 | + | </div><!-- #euthor_avatar --> |
219 | - | |
219 | + | |
220 | - | <div id="author_avatar"> |
220 | + | <div id="author_description"> |
221 | - | |
221 | + | |
222 | - | <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'Gooseo_author_bio_avatar_size', 68 ) ); ?> |
222 | + | <span class="fn"><?php printf( esc_attr__( '%s', 'Gooseo' ), get_the_author() ); ?></span> |
223 | - | |
223 | + | |
224 | - | </div><!-- #euthor_avatar --> |
224 | + | <p><?php the_author_meta( 'description' ); ?></p> |
225 | - | |
225 | + | |
226 | - | <div id="author_description"> |
226 | + | </div><!-- #author_description --> |
227 | - | |
227 | + | |
228 | - | <span class="fn"><?php printf( esc_attr__( '%s', 'Gooseo' ), get_the_author() ); ?></span> |
228 | + | <div class="clear"></div> |
229 | - | |
229 | + | |
230 | - | <p><?php the_author_meta( 'description' ); ?></p> |
230 | + | </div><!-- #entry_author_info --> |
231 | - | |
231 | + | |
232 | - | </div><!-- #author_description --> |
232 | + | <?php endif; }?> |
233 | - | |
233 | + | |
234 | - | <div class="clear"></div> |
234 | + | <div class="clear"></div> |
235 | - | |
235 | + | |
236 | - | </div><!-- #entry_author_info --> |
236 | + | <div id="comments_frame"> |
237 | - | |
237 | + | |
238 | - | <?php endif; }?> |
238 | + | <?php comments_template( '', true ); ?> |
239 | - | |
239 | + | |
240 | - | <div class="clear"></div> |
240 | + | </div> |
241 | - | |
241 | + | |
242 | - | <div id="comments_frame"> |
242 | + | </div><!--END TEXT CONTENT --> <?php |
243 | - | |
243 | + | endwhile; |
244 | - | <?php comments_template( '', true ); ?> |
244 | + | |
245 | - | |
245 | + | get_sidebar(); |
246 | - | </div> |
246 | + | |
247 | - | |
247 | + | get_footer(); |
248 | - | </div><!--END TEXT CONTENT --> <?php |
248 | + | |
249 | ?> |