-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-playerprofiles.php
218 lines (208 loc) · 11.6 KB
/
single-playerprofiles.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
<?php get_header(); ?>
<?php
$image_id = get_post_meta( $post->ID, 'image_id', true);
$image_url_large = wp_get_attachment_image_src( $image_id, 'large' );
$image_url_large = $image_url_large[0];
$image_url_original = wp_get_attachment_image_src( $image_id, 'original' );
$image_url_original = $image_url_original[0];
?>
<div id="wrapper">
<div id="pagecol">
<div class='page'>
<?php if ( isset ( $GLOBALS['bisons_flash_message'] ) ) : ?>
<p id="flashmessage"><?php echo $GLOBALS['bisons_flash_message'] ?></p>
<?php endif ?>
<?php if ( have_posts() ) : ?>
<?php while (have_posts() ) : the_post(); ?>
<header>
<h2><?php the_title(); ?></h2>
<?php if ( current_user_can('edit_post', get_the_id()) ) { ?>
<ul class='pageMenu'>
<li><a class='fa fa-plus-square fa-lg' href='<?php echo $GLOBALS['blog_info']['url']; ?>/wp-admin/post-new.php?post_type=page'>New Page</a></li>
<li><?php edit_post_link( 'Edit'); ?></li>
</ul>
<?php } ?>
</header>
<?php if ( $stats = total_stat_per_user($post->post_author)) : ?>
<div class='metaBox'>
<?php endif ?>
<?php
if ( has_post_thumbnail() ) {
$thumbnailAtributes = array(
'itemprop' => 'photo',
'class' => 'alignright'
);
the_post_thumbnail( 'full');
}
?>
<?php if ($stats) :
$stats = array_count_values( $stats );
?>
<div class='eventMeta'>
<h3>Statistics</h3>
<ul>
<?php foreach ( $stats as $key => $stat) : ?>
<li class='fa fa-flag'><em><?php global $match_events; echo $match_events[$key][0]. ' - <strong>' . $stat?></strong></em></li>
<?php endforeach ?>
</ul>
<div class='clear'></div>
</div>
</div>
<?php endif ?>
<?php if (get_post_meta( $post->ID, 'name', true) ) : ?>
<h4>Name</h4>
<p><?php echo get_post_meta( $post->ID, 'name', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'nickname', true) ) : ?>
<h4>Nickname</h4>
<p><?php echo get_post_meta( $post->ID, 'nickname', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'age', true) ) : ?>
<h4>Age</h4>
<p><?php echo get_post_meta( $post->ID, 'age', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'living', true) ) : ?>
<h4>Do you work or study? If so, what?</h4>
<p><?php echo get_post_meta( $post->ID, 'living', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'position', true) ) : ?>
<h4>What position are you on (or off) the pitch?</h4>
<p><?php echo get_post_meta( $post->ID, 'position', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'followed', true) ) : ?>
<h4>What club or team do you follow?</h4>
<p><?php echo get_post_meta( $post->ID, 'followed', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'exp', true) ) : ?>
<h4>How long have you been playing?</h4>
<p><?php echo get_post_meta( $post->ID, 'exp', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'jexp', true) ) : ?>
<h4>How much did you know about rugby when you joined?</h4>
<p><?php echo get_post_meta( $post->ID, 'jexp', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'whydoyouplay', true) ) : ?>
<h4>Why do you play for the Bisons?</h4>
<p><?php echo get_post_meta( $post->ID, 'whydoyouplay', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'proplayerasp', true) ) : ?>
<h4>Which professional player would you like to perform like, and why?</h4>
<p><?php echo get_post_meta( $post->ID, 'proplayerasp', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'proplayer', true) ) : ?>
<h4>Which professional player <em>do</em> you perform like, and why?</h4>
<p><?php echo get_post_meta( $post->ID, 'proplayer', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'chatup', true) ) : ?>
<h4>What is your best chat up line?</h4>
<p><?php echo get_post_meta( $post->ID, 'chatup', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'growingup', true) ) : ?>
<h4>When you were growing up, what did you want to be?</h4>
<p><?php echo get_post_meta( $post->ID, 'growingup', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'superst', true) ) : ?>
<h4>Do you have any prematch superstitions/routines?</h4>
<p><?php echo get_post_meta( $post->ID, 'superst', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'possessions', true) ) : ?>
<h4>Your most treasured possession/s:</h4>
<p><?php echo get_post_meta( $post->ID, 'possessions', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'breakfast', true) ) : ?>
<h4>What do you normally eat for breakfast?</h4>
<p><?php echo get_post_meta( $post->ID, 'breakfast', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'bestmem', true) ) : ?>
<h4>Best achievement/memory of being in the club?</h4>
<p><?php echo get_post_meta( $post->ID, 'bestmem', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'notholiday', true) ) : ?>
<h4>Where is the one place you'd never go on holiday?</h4>
<p><?php echo get_post_meta( $post->ID, 'notholiday', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'movielife', true) ) : ?>
<h4>In the movie of your life, who would you be played by?</h4>
<p><?php echo get_post_meta( $post->ID, 'movielife', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'cartoon', true) ) : ?>
<h4>Favourite cartoon as a kid?</h4>
<p><?php echo get_post_meta( $post->ID, 'cartoon', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'eventfromhistory', true) ) : ?>
<h4>If you could turn back time and witness one event from history, what would it be?</h4>
<p><?php echo get_post_meta( $post->ID, 'eventfromhistory', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'sigdish', true) ) : ?>
<h4>What is your signature dish?</h4>
<p><?php echo get_post_meta( $post->ID, 'sigdish', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'lastmeal', true) ) : ?>
<h4>What would your last meal be?</h4>
<p><?php echo get_post_meta( $post->ID, 'lastmeal', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'desertisland', true) ) : ?>
<h4>Stranded on a desert island, what are your three essential items?</h4>
<p><?php echo get_post_meta( $post->ID, 'desertisland', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'lastfifty', true) ) : ?>
<h4>What would you buy with your last fifty pounds?</h4>
<p><?php echo get_post_meta( $post->ID, 'lastfifty', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'bestplayer', true) ||
get_post_meta( $post->ID, 'fastestplayer', true) ||
get_post_meta( $post->ID, 'longestshower', true) ||
get_post_meta( $post->ID, 'biggestmoaner', true) ||
get_post_meta( $post->ID, 'dresssense', true) ||
get_post_meta( $post->ID, 'lasttobar', true) ||
get_post_meta( $post->ID, 'worstdancer', true) ||
get_post_meta( $post->ID, 'badinfluence', true) ||
get_post_meta( $post->ID, 'cheesegrindr', true) ) : ?>
<p><em>Out of the current team, who would you say...</em></p>
<?php if (get_post_meta( $post->ID, 'bestplayer', true) ) : ?>
<h4>Is the best player?</h4>
<p><?php echo get_post_meta( $post->ID, 'bestplayer', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'fastestplayer', true) ) : ?>
<h4>Is the fastest player?</h4>
<p><?php echo get_post_meta( $post->ID, 'fastestplayer', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'longestshower', true) ) : ?>
<h4>Takes the longest to shower?</h4>
<p><?php echo get_post_meta( $post->ID, 'longestshower', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'biggestmoaner', true) ) : ?>
<h4>Is the biggest moaner?</h4>
<p><?php echo get_post_meta( $post->ID, 'biggestmoaner', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'dresssense', true) ) : ?>
<h4>Has the worst dress sense?</h4>
<p><?php echo get_post_meta( $post->ID, 'dresssense', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'lasttobar', true) ) : ?>
<h4>Is always last to the bar?</h4>
<p><?php echo get_post_meta( $post->ID, 'lasttobar', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'worstdancer', true) ) : ?>
<h4>Is the worst Dancer?</h4>
<p><?php echo get_post_meta( $post->ID, 'worstdancer', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'badinfluence', true) ) : ?>
<h4>Is the worst influence on others?</h4>
<p><?php echo get_post_meta( $post->ID, 'badinfluence', true); ?></p>
<?php endif; ?>
<?php if (get_post_meta( $post->ID, 'cheesegrindr', true) ) : ?>
<h4>Has the cheesiest Grindr profile?</h4>
<p><?php echo get_post_meta( $post->ID, 'cheesegrindr', true); ?></p>
<?php endif; ?>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<h2>Nothing Found</h2>
<p>Sorry, but the content you are looking for isn't here...</p>
<p><a href="<?php echo get_option('home'); ?>">Return to the homepage</a></p>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>