-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpage-leaderboard.php
316 lines (198 loc) · 8.89 KB
/
page-leaderboard.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<?php
/* Template Name: Leaderboard */
?>
<?php get_header(); ?>
<!-- Top
================================================== -->
<div id="myTop" class="myTopcontainer">
<div class="myTopcontainer-inner">
<div class="bigitem active">
<img src="<?php header_image(); ?>" alt="" class="jumbo-tron" />
<div class="container">
<div class="row">
<div class="span6">
<div class="carousel-caption">
<h1>WordCamp San Francisco</h1>
<p class="lead">Watch the action on July 26-28th, 2013.</p>
<form method="get" action="/" class="form-inline" >
<a href="http://2013.sf.wordcamp.org/" target="_blank" class="btn btn-large">Visit Official Site</a>
</form>
</div>
</div>
<div class="span5 offset0">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<?php
// get last featured post
$counter = 1;
$args = array(
'post_type' => array ( 'wpgtp_tweets', 'wpgip_instagrams', 'wpgfp_flickrs', 'post' ),
'orderby' => 'post_date',
'order' => 'DESC',
'posts_per_page' => 3,
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'wpgtp_tweet_types',
'field' => 'slug',
'terms' => 'featured'
),
array(
'taxonomy' => 'wpgip_instagram_types',
'field' => 'slug',
'terms' => 'featured'
),
array(
'taxonomy' => 'wpgfp_flickr_types',
'field' => 'slug',
'terms' => 'featured'
),
array(
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'featured'
)
)
);
$the_query = new WP_Query( $args );
// The Loop
while ( $the_query->have_posts() ) :
$the_query->the_post();
if ($counter == 1) {
echo '<div class="item active">';
} else {
echo '<div class="item">';
}
wpann_process_post_display ( $post, 'media-item col2 featured', 'featured' );
echo '</div>';
$counter++;
endwhile;
?>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- /.carousel -->
<div class="container how-to">
<div class="row">
<div class="span12">
<div class="row">
<div class="span2"> </div>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-picture"></i> Photos</h3>
<p>Post a public picture to <i class="icon-camera-retro"></i> Instagram, <i class="icon-twitter"></i> Twitter, or <i class="icon-camera"></i> Flickr & tag it <strong>#wcsf</strong>.</p>
</div>
</div>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-twitter"></i> Tweets</h3>
<p>Use the hashtag <strong>#wcsf</strong> on Twitter and we'll grab your tweets.</p>
</div>
</div>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-facetime-video"></i> Video</h3>
<p>Share your <i class="icon-twitter"></i> Vine & <i class="icon-camera-retro"></i> Instagram <span class="label label-success">new</span> videos with the hashtag <strong>#wcsf</strong>. </p>
</div>
</div>
<div class="span2">
<div class="well well-small">
<h3><i class="icon-upload"></i> Submit</h3>
<p>Submit your own photo to us directly via the <a href="<?php echo home_url('submit-photo'); ?>">WordPress mobile app</a>. </p>
</div>
</div>
<div class="span2"> </div>
</div>
</div>
</div>
</div>
<div class="container video-container"></div>
<div id="fullscreen_container">
<div class="container no-padding" id="notice_div">
<p style="text-align: center;">
<a class="has-spinner">
<span class="spinner"><i class="icon-spin icon-refresh"></i></span>
<span class="notice-message">Just chilling out for a few seconds.</span>
</a>
</p>
<p class="message"> Why not go <a href="#" id="fullscreen_trigger">fullscreen</a> or
<?php if ($_GET['allimages'] != "true") { ?>
<a href="<?php home_url(); ?>/?allimages=true">view only photos</a>
<?php } else { ?>
<a href="<?php home_url(); ?>/">see everything</a>
<?php } ?>
?</p>
</div>
<div class="container" id="roundup-container">
<h2>Blog Posts & Roundups</h2>
<div class="thumbnail thumbnail-normal span2">
<div class="caption">
<p>Mickey Kay - <a href="http://twitter.com/McGuive7">@McGuive7</a></p>
<p><a href="http://www.mightyminnow.com/2013/07/wordcamp-san-francisco-edition/">WordCamp: San Francisco Edition</a></p>
</div>
</div>
<div class="thumbnail thumbnail-normal span2">
<div class="caption">
<p>Devin Reams - <a href="http://twitter.com/devinreams">@devinreams</a></p>
<p><a href="http://devin.reams.me/2013/lessons-from-wordcamp-san-francisco-2013/">My Biggest Take-Aways from WordCamp San Francisco 2013</a></p>
</div>
</div>
<div class="thumbnail thumbnail-normal span2">
<div class="caption">
<p>WPSpeak - <a href="http://twitter.com/wpspeak">@wpspeak</a></p>
<p><a href="http://wpspeak.com/summary-wordcamp-san-francisco-2013/">Quick Summary of WordCamp San Francisco 2013</a></p>
</div>
</div>
<div class="thumbnail thumbnail-normal span2">
<div class="caption">
<p>Konstantin Kovshenin - <a href="http://twitter.com/kovshenin">@kovshenin</a></p>
<p><a href="http://kovshenin.com/2013/wordcamp-san-francisco-2013-recap/">WordCamp San Francisco 2013 Recap</a></p>
</div>
</div>
<div class="thumbnail thumbnail-normal span2">
<div class="caption">
<p>Greg Taylor - <a href="http://twitter.com/GRTaylor2">@GRTaylor2</a></p>
<p><a href="http://mktgpress.com/wordcamp-sf-wrap-up/">WordCamp SF Wrap Up</a></p>
</div>
</div>
</div>
<div class="container" id="media-container">
<?php
$args = array(
'post_type' => 'any',
'numberposts' => $number,
'meta_key' => '_li_love_count',
'orderby' => 'meta_value_num',
'order' => 'DESC'
);
$custom_query = new WP_Query( $args );
if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?>
<?php wpann_process_post_display ( $post ); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no media posts exist.'); ?></p>
<?php endif; ?>
</div> <!-- #container -->
<div id="push"></div>
</div>
</div> <!-- fullscreen container -->
<div class="container" id="loadmore_div">
<p style="text-align: center;">
<a class="btn btn-large has-spinner">
<span class="spinner"><i class="icon-spin icon-refresh"></i></span>
<span class="loadmore-message">Load More</span>
</a>
</p>
</div>
<p> </p>
<?php get_footer(); ?>