@@ -121,9 +121,10 @@ discard block |
||
121 | 121 | <h3 class="catbg">', $txt['attachment_transfer'], '</h3> |
122 | 122 | </div>'; |
123 | 123 | |
124 | - if (!empty($context['results'])) |
|
125 | - echo ' |
|
124 | + if (!empty($context['results'])) { |
|
125 | + echo ' |
|
126 | 126 | <div class="noticebox">', $context['results'], '</div>'; |
127 | + } |
|
127 | 128 | |
128 | 129 | echo ' |
129 | 130 | <div class="windowbg2 noup"> |
@@ -135,9 +136,10 @@ discard block |
||
135 | 136 | <select name="from"> |
136 | 137 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
137 | 138 | |
138 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
139 | - echo ' |
|
139 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
140 | + echo ' |
|
140 | 141 | <option value="', $id, '">', $dir, '</option>'; |
142 | + } |
|
141 | 143 | |
142 | 144 | echo ' |
143 | 145 | </select> |
@@ -148,13 +150,14 @@ discard block |
||
148 | 150 | <option value="0">', $txt['attachment_transfer_auto_select'], '</option> |
149 | 151 | <option value="-1">', $txt['attachment_transfer_forum_root'], '</option>'; |
150 | 152 | |
151 | - if (!empty($context['base_dirs'])) |
|
152 | - foreach ($context['base_dirs'] as $id => $dir) |
|
153 | + if (!empty($context['base_dirs'])) { |
|
154 | + foreach ($context['base_dirs'] as $id => $dir) |
|
153 | 155 | echo ' |
154 | 156 | <option value="', $id, '">', $dir, '</option>'; |
155 | - else |
|
156 | - echo ' |
|
157 | + } else { |
|
158 | + echo ' |
|
157 | 159 | <option value="0" disabled>', $txt['attachment_transfer_no_base'], '</option>'; |
160 | + } |
|
158 | 161 | |
159 | 162 | echo ' |
160 | 163 | </select> |
@@ -164,18 +167,20 @@ discard block |
||
164 | 167 | <select name="to"> |
165 | 168 | <option value="0">', $txt['attachment_transfer_select'], '</option>'; |
166 | 169 | |
167 | - foreach ($context['attach_dirs'] as $id => $dir) |
|
168 | - echo ' |
|
170 | + foreach ($context['attach_dirs'] as $id => $dir) { |
|
171 | + echo ' |
|
169 | 172 | <option value="', $id, '">', $dir, '</option>'; |
173 | + } |
|
170 | 174 | |
171 | 175 | echo ' |
172 | 176 | </select> |
173 | 177 | </dd>'; |
174 | 178 | |
175 | - if (!empty($modSettings['attachmentDirFileLimit'])) |
|
176 | - echo ' |
|
179 | + if (!empty($modSettings['attachmentDirFileLimit'])) { |
|
180 | + echo ' |
|
177 | 181 | <dt>', $txt['attachment_transfer_empty'], '</dt> |
178 | 182 | <dd><input type="checkbox" name="empty_it"', $context['checked'] ? ' checked' : '', '></dd>'; |
183 | + } |
|
179 | 184 | |
180 | 185 | echo ' |
181 | 186 | </dl> |
@@ -211,8 +216,8 @@ discard block |
||
211 | 216 | global $context, $txt, $scripturl; |
212 | 217 | |
213 | 218 | // If we've completed just let them know! |
214 | - if ($context['completed']) |
|
215 | - echo ' |
|
219 | + if ($context['completed']) { |
|
220 | + echo ' |
|
216 | 221 | <div id="manage_attachments"> |
217 | 222 | <div class="cat_bar"> |
218 | 223 | <h3 class="catbg">', $txt['repair_attachments_complete'], '</h3> |
@@ -221,10 +226,11 @@ discard block |
||
221 | 226 | ', $txt['repair_attachments_complete_desc'], ' |
222 | 227 | </div> |
223 | 228 | </div>'; |
229 | + } |
|
224 | 230 | |
225 | 231 | // What about if no errors were even found? |
226 | - elseif (!$context['errors_found']) |
|
227 | - echo ' |
|
232 | + elseif (!$context['errors_found']) { |
|
233 | + echo ' |
|
228 | 234 | <div id="manage_attachments"> |
229 | 235 | <div class="cat_bar"> |
230 | 236 | <h3 class="catbg">', $txt['repair_attachments_complete'], '</h3> |
@@ -233,6 +239,7 @@ discard block |
||
233 | 239 | ', $txt['repair_attachments_no_errors'], ' |
234 | 240 | </div> |
235 | 241 | </div>'; |
242 | + } |
|
236 | 243 | |
237 | 244 | // Otherwise, I'm sad to say, we have a problem! |
238 | 245 | else |
@@ -247,11 +254,12 @@ discard block |
||
247 | 254 | <p>', $txt['repair_attachments_error_desc'], '</p>'; |
248 | 255 | |
249 | 256 | // Loop through each error reporting the status |
250 | - foreach ($context['repair_errors'] as $error => $number) |
|
251 | - if (!empty($number)) |
|
257 | + foreach ($context['repair_errors'] as $error => $number) { |
|
258 | + if (!empty($number)) |
|
252 | 259 | echo ' |
253 | 260 | <input type="checkbox" name="to_fix[]" id="', $error, '" value="', $error, '"> |
254 | 261 | <label for="', $error, '">', sprintf($txt['attach_repair_' . $error], $number), '</label><br>'; |
262 | + } |
|
255 | 263 | |
256 | 264 | echo ' |
257 | 265 | <br> |
@@ -270,8 +278,9 @@ discard block |
||
270 | 278 | { |
271 | 279 | global $modSettings; |
272 | 280 | |
273 | - if (!empty($modSettings['attachment_basedirectories'])) |
|
274 | - template_show_list('base_paths'); |
|
281 | + if (!empty($modSettings['attachment_basedirectories'])) { |
|
282 | + template_show_list('base_paths'); |
|
283 | + } |
|
275 | 284 | |
276 | 285 | template_show_list('attach_paths'); |
277 | 286 | } |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | <div class="windowbg"> |
32 | 32 | <ul id="likes">'; |
33 | 33 | |
34 | - foreach ($context['likers'] as $liker => $like_details) |
|
35 | - echo ' |
|
34 | + foreach ($context['likers'] as $liker => $like_details) { |
|
35 | + echo ' |
|
36 | 36 | <li> |
37 | 37 | ', $like_details['profile']['avatar']['image'], ' |
38 | 38 | <span> |
@@ -41,6 +41,7 @@ discard block |
||
41 | 41 | </span> |
42 | 42 | <span class="floatright">', $like_details['time'], '</span> |
43 | 43 | </li>'; |
44 | + } |
|
44 | 45 | |
45 | 46 | echo ' |
46 | 47 | </ul> |
@@ -61,11 +62,12 @@ discard block |
||
61 | 62 | echo ' |
62 | 63 | <ul class="floatleft">'; |
63 | 64 | |
64 | - if (!empty($context['data']['can_like'])) |
|
65 | - echo ' |
|
65 | + if (!empty($context['data']['can_like'])) { |
|
66 | + echo ' |
|
66 | 67 | <li class="like_button" id="', $context['data']['type'], '_', $context['data']['id_content'], '_likes"', '> |
67 | 68 | <a href="', $scripturl, '?action=likes;ltype=', $context['data']['type'], ';sa=like;like=', $context['data']['id_content'], ';', $context['session_var'], '=', $context['session_id'], '" class="', $context['data']['type'], '_like"><span class="generic_icons ', $context['data']['already_liked'] ? 'unlike' : 'like', '"></span> ', $context['data']['already_liked'] ? $txt['unlike'] : $txt['like'], '</a> |
68 | 69 | </li>'; |
70 | + } |
|
69 | 71 | |
70 | 72 | if (!empty($context['data']['count'])) |
71 | 73 | { |
@@ -26,9 +26,10 @@ discard block |
||
26 | 26 | </div> |
27 | 27 | <div class="pagesection">', $context['page_index'], '</div>'; |
28 | 28 | |
29 | - if (empty($context['posts'])) |
|
30 | - echo ' |
|
29 | + if (empty($context['posts'])) { |
|
30 | + echo ' |
|
31 | 31 | <div class="windowbg">', $txt['no_messages'], '</div>'; |
32 | + } |
|
32 | 33 | |
33 | 34 | foreach ($context['posts'] as $post) |
34 | 35 | { |
@@ -41,28 +42,33 @@ discard block |
||
41 | 42 | </div> |
42 | 43 | <div class="list_posts">', $post['message'], '</div>'; |
43 | 44 | |
44 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
45 | - echo ' |
|
45 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
46 | + echo ' |
|
46 | 47 | <ul class="quickbuttons">'; |
48 | + } |
|
47 | 49 | |
48 | 50 | // If they *can* reply? |
49 | - if ($post['can_reply']) |
|
50 | - echo ' |
|
51 | + if ($post['can_reply']) { |
|
52 | + echo ' |
|
51 | 53 | <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>'; |
54 | + } |
|
52 | 55 | |
53 | 56 | // If they *can* quote? |
54 | - if ($post['can_quote']) |
|
55 | - echo ' |
|
57 | + if ($post['can_quote']) { |
|
58 | + echo ' |
|
56 | 59 | <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>'; |
60 | + } |
|
57 | 61 | |
58 | 62 | // How about... even... remove it entirely?! |
59 | - if ($post['can_delete']) |
|
60 | - echo ' |
|
63 | + if ($post['can_delete']) { |
|
64 | + echo ' |
|
61 | 65 | <li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>'; |
66 | + } |
|
62 | 67 | |
63 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
64 | - echo ' |
|
68 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
69 | + echo ' |
|
65 | 70 | </ul>'; |
71 | + } |
|
66 | 72 | |
67 | 73 | echo ' |
68 | 74 | </div><!-- $post[css_class] -->'; |
@@ -84,12 +90,13 @@ discard block |
||
84 | 90 | echo ' |
85 | 91 | <div id="recent" class="main_content">'; |
86 | 92 | |
87 | - if ($context['showCheckboxes']) |
|
88 | - echo ' |
|
93 | + if ($context['showCheckboxes']) { |
|
94 | + echo ' |
|
89 | 95 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm"> |
90 | 96 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
91 | 97 | <input type="hidden" name="qaction" value="markread"> |
92 | 98 | <input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">'; |
99 | + } |
|
93 | 100 | |
94 | 101 | if (!empty($context['topics'])) |
95 | 102 | { |
@@ -118,11 +125,12 @@ discard block |
||
118 | 125 | </div>'; |
119 | 126 | |
120 | 127 | // Show a "select all" box for quick moderation? |
121 | - if ($context['showCheckboxes']) |
|
122 | - echo ' |
|
128 | + if ($context['showCheckboxes']) { |
|
129 | + echo ' |
|
123 | 130 | <div class="moderation"> |
124 | 131 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');"> |
125 | 132 | </div>'; |
133 | + } |
|
126 | 134 | |
127 | 135 | echo ' |
128 | 136 | </div><!-- #topic_header --> |
@@ -142,17 +150,20 @@ discard block |
||
142 | 150 | echo ' |
143 | 151 | <div class="icons floatright">'; |
144 | 152 | |
145 | - if ($topic['is_locked']) |
|
146 | - echo ' |
|
153 | + if ($topic['is_locked']) { |
|
154 | + echo ' |
|
147 | 155 | <span class="generic_icons lock"></span>'; |
156 | + } |
|
148 | 157 | |
149 | - if ($topic['is_sticky']) |
|
150 | - echo ' |
|
158 | + if ($topic['is_sticky']) { |
|
159 | + echo ' |
|
151 | 160 | <span class="generic_icons sticky"></span>'; |
161 | + } |
|
152 | 162 | |
153 | - if ($topic['is_poll']) |
|
154 | - echo ' |
|
163 | + if ($topic['is_poll']) { |
|
164 | + echo ' |
|
155 | 165 | <span class="generic_icons poll"></span>'; |
166 | + } |
|
156 | 167 | |
157 | 168 | echo ' |
158 | 169 | </div>'; |
@@ -178,19 +189,21 @@ discard block |
||
178 | 189 | ', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), ' |
179 | 190 | </div>'; |
180 | 191 | |
181 | - if ($context['showCheckboxes']) |
|
182 | - echo ' |
|
192 | + if ($context['showCheckboxes']) { |
|
193 | + echo ' |
|
183 | 194 | <div class="moderation"> |
184 | 195 | <input type="checkbox" name="topics[]" value="', $topic['id'], '"> |
185 | 196 | </div>'; |
197 | + } |
|
186 | 198 | |
187 | 199 | echo ' |
188 | 200 | </div><!-- $topic[css_class] -->'; |
189 | 201 | } |
190 | 202 | |
191 | - if (empty($context['topics'])) |
|
192 | - echo ' |
|
203 | + if (empty($context['topics'])) { |
|
204 | + echo ' |
|
193 | 205 | <div style="display: none;"></div>'; |
206 | + } |
|
194 | 207 | |
195 | 208 | echo ' |
196 | 209 | </div><!-- #topic_container --> |
@@ -205,25 +218,27 @@ discard block |
||
205 | 218 | ', $context['page_index'], ' |
206 | 219 | </div> |
207 | 220 | </div>'; |
208 | - } |
|
209 | - else |
|
210 | - echo ' |
|
221 | + } else { |
|
222 | + echo ' |
|
211 | 223 | <div class="cat_bar"> |
212 | 224 | <h3 class="catbg centertext"> |
213 | 225 | ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], ' |
214 | 226 | </h3> |
215 | 227 | </div>'; |
228 | + } |
|
216 | 229 | |
217 | - if ($context['showCheckboxes']) |
|
218 | - echo ' |
|
230 | + if ($context['showCheckboxes']) { |
|
231 | + echo ' |
|
219 | 232 | </form>'; |
233 | + } |
|
220 | 234 | |
221 | 235 | echo ' |
222 | 236 | </div><!-- #recent -->'; |
223 | 237 | |
224 | - if (empty($context['no_topic_listing'])) |
|
225 | - template_topic_legend(); |
|
226 | -} |
|
238 | + if (empty($context['no_topic_listing'])) { |
|
239 | + template_topic_legend(); |
|
240 | + } |
|
241 | + } |
|
227 | 242 | |
228 | 243 | /** |
229 | 244 | * Template for showing unread replies (eg new replies to topics you've posted in) |
@@ -235,12 +250,13 @@ discard block |
||
235 | 250 | echo ' |
236 | 251 | <div id="recent">'; |
237 | 252 | |
238 | - if ($context['showCheckboxes']) |
|
239 | - echo ' |
|
253 | + if ($context['showCheckboxes']) { |
|
254 | + echo ' |
|
240 | 255 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm"> |
241 | 256 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
242 | 257 | <input type="hidden" name="qaction" value="markread"> |
243 | 258 | <input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">'; |
259 | + } |
|
244 | 260 | |
245 | 261 | if (!empty($context['topics'])) |
246 | 262 | { |
@@ -269,11 +285,12 @@ discard block |
||
269 | 285 | </div>'; |
270 | 286 | |
271 | 287 | // Show a "select all" box for quick moderation? |
272 | - if ($context['showCheckboxes']) |
|
273 | - echo ' |
|
288 | + if ($context['showCheckboxes']) { |
|
289 | + echo ' |
|
274 | 290 | <div class="moderation"> |
275 | 291 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');"> |
276 | 292 | </div>'; |
293 | + } |
|
277 | 294 | |
278 | 295 | echo ' |
279 | 296 | </div><!-- #topic_header --> |
@@ -293,17 +310,20 @@ discard block |
||
293 | 310 | echo ' |
294 | 311 | <div class="icons floatright">'; |
295 | 312 | |
296 | - if ($topic['is_locked']) |
|
297 | - echo ' |
|
313 | + if ($topic['is_locked']) { |
|
314 | + echo ' |
|
298 | 315 | <span class="generic_icons lock"></span>'; |
316 | + } |
|
299 | 317 | |
300 | - if ($topic['is_sticky']) |
|
301 | - echo ' |
|
318 | + if ($topic['is_sticky']) { |
|
319 | + echo ' |
|
302 | 320 | <span class="generic_icons sticky"></span>'; |
321 | + } |
|
303 | 322 | |
304 | - if ($topic['is_poll']) |
|
305 | - echo ' |
|
323 | + if ($topic['is_poll']) { |
|
324 | + echo ' |
|
306 | 325 | <span class="generic_icons poll"></span>'; |
326 | + } |
|
307 | 327 | |
308 | 328 | echo ' |
309 | 329 | </div>'; |
@@ -329,11 +349,12 @@ discard block |
||
329 | 349 | ', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), ' |
330 | 350 | </div>'; |
331 | 351 | |
332 | - if ($context['showCheckboxes']) |
|
333 | - echo ' |
|
352 | + if ($context['showCheckboxes']) { |
|
353 | + echo ' |
|
334 | 354 | <div class="moderation"> |
335 | 355 | <input type="checkbox" name="topics[]" value="', $topic['id'], '"> |
336 | 356 | </div>'; |
357 | + } |
|
337 | 358 | |
338 | 359 | echo ' |
339 | 360 | </div><!-- $topic[css_class] -->'; |
@@ -350,24 +371,26 @@ discard block |
||
350 | 371 | ', $context['page_index'], ' |
351 | 372 | </div> |
352 | 373 | </div>'; |
353 | - } |
|
354 | - else |
|
355 | - echo ' |
|
374 | + } else { |
|
375 | + echo ' |
|
356 | 376 | <div class="cat_bar"> |
357 | 377 | <h3 class="catbg centertext"> |
358 | 378 | ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], ' |
359 | 379 | </h3> |
360 | 380 | </div>'; |
381 | + } |
|
361 | 382 | |
362 | - if ($context['showCheckboxes']) |
|
363 | - echo ' |
|
383 | + if ($context['showCheckboxes']) { |
|
384 | + echo ' |
|
364 | 385 | </form>'; |
386 | + } |
|
365 | 387 | |
366 | 388 | echo ' |
367 | 389 | </div><!-- #recent -->'; |
368 | 390 | |
369 | - if (empty($context['no_topic_listing'])) |
|
370 | - template_topic_legend(); |
|
371 | -} |
|
391 | + if (empty($context['no_topic_listing'])) { |
|
392 | + template_topic_legend(); |
|
393 | + } |
|
394 | + } |
|
372 | 395 | |
373 | 396 | ?> |
374 | 397 | \ No newline at end of file |
@@ -25,15 +25,17 @@ discard block |
||
25 | 25 | </h3> |
26 | 26 | </div>'; |
27 | 27 | |
28 | - if (!empty($context['search_errors'])) |
|
29 | - echo ' |
|
28 | + if (!empty($context['search_errors'])) { |
|
29 | + echo ' |
|
30 | 30 | <div class="errorbox">', implode('<br>', $context['search_errors']['messages']), '</div>'; |
31 | + } |
|
31 | 32 | |
32 | - if (!empty($context['search_ignored'])) |
|
33 | - echo ' |
|
33 | + if (!empty($context['search_ignored'])) { |
|
34 | + echo ' |
|
34 | 35 | <p class="noticebox"> |
35 | 36 | ', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), ' |
36 | 37 | </p>'; |
38 | + } |
|
37 | 39 | |
38 | 40 | echo ' |
39 | 41 | <div id="advanced_search" class="roundframe"> |
@@ -44,9 +46,10 @@ discard block |
||
44 | 46 | <dd> |
45 | 47 | <input type="search" name="search" id="searchfor" ', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40">'; |
46 | 48 | |
47 | - if (empty($modSettings['search_simple_fulltext'])) |
|
48 | - echo ' |
|
49 | + if (empty($modSettings['search_simple_fulltext'])) { |
|
50 | + echo ' |
|
49 | 51 | <br><em class="smalltext">', $txt['search_example'], '</em>'; |
52 | + } |
|
50 | 53 | |
51 | 54 | echo ' |
52 | 55 | </dd> |
@@ -110,21 +113,23 @@ discard block |
||
110 | 113 | <input type="hidden" name="advanced" value="1">'; |
111 | 114 | |
112 | 115 | // Require an image to be typed to save spamming? |
113 | - if ($context['require_verification']) |
|
114 | - echo ' |
|
116 | + if ($context['require_verification']) { |
|
117 | + echo ' |
|
115 | 118 | <p> |
116 | 119 | <strong>', $txt['verification'], ':</strong> |
117 | 120 | ', template_control_verification($context['visual_verification_id'], 'all'), ' |
118 | 121 | </p>'; |
122 | + } |
|
119 | 123 | |
120 | 124 | // If $context['search_params']['topic'] is set, that means we're searching just one topic. |
121 | - if (!empty($context['search_params']['topic'])) |
|
122 | - echo ' |
|
125 | + if (!empty($context['search_params']['topic'])) { |
|
126 | + echo ' |
|
123 | 127 | <p> |
124 | 128 | ', $txt['search_specific_topic'], ' "', $context['search_topic']['link'], '". |
125 | 129 | </p> |
126 | 130 | <input type="hidden" name="topic" value="', $context['search_topic']['id'], '"> |
127 | 131 | <input type="submit" name="b_search" value="', $txt['search'], '" class="button">'; |
132 | + } |
|
128 | 133 | |
129 | 134 | echo ' |
130 | 135 | </div>'; |
@@ -154,14 +159,15 @@ discard block |
||
154 | 159 | |
155 | 160 | foreach ($category['boards'] as $board) |
156 | 161 | { |
157 | - if ($i == $limit) |
|
158 | - echo ' |
|
162 | + if ($i == $limit) { |
|
163 | + echo ' |
|
159 | 164 | </ul> |
160 | 165 | </li> |
161 | 166 | </ul> |
162 | 167 | <ul class="ignoreboards floatright"> |
163 | 168 | <li class="category"> |
164 | 169 | <ul>'; |
170 | + } |
|
165 | 171 | |
166 | 172 | echo ' |
167 | 173 | <li class="board"> |
@@ -249,17 +255,19 @@ discard block |
||
249 | 255 | <div class="roundframe">'; |
250 | 256 | |
251 | 257 | // Did they make any typos or mistakes, perhaps? |
252 | - if (isset($context['did_you_mean'])) |
|
253 | - echo ' |
|
258 | + if (isset($context['did_you_mean'])) { |
|
259 | + echo ' |
|
254 | 260 | <p> |
255 | 261 | ', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search2;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>. |
256 | 262 | </p>'; |
263 | + } |
|
257 | 264 | |
258 | - if (!empty($context['search_ignored'])) |
|
259 | - echo ' |
|
265 | + if (!empty($context['search_ignored'])) { |
|
266 | + echo ' |
|
260 | 267 | <p> |
261 | 268 | ', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), ' |
262 | 269 | </p>'; |
270 | + } |
|
263 | 271 | |
264 | 272 | echo ' |
265 | 273 | <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '"> |
@@ -282,10 +290,11 @@ discard block |
||
282 | 290 | <input type="hidden" name="sort" value="', !empty($context['search_params']['sort']) ? $context['search_params']['sort'] : 'relevance', '"> |
283 | 291 | </div>'; |
284 | 292 | |
285 | - if (!empty($context['search_params']['brd'])) |
|
286 | - foreach ($context['search_params']['brd'] as $board_id) |
|
293 | + if (!empty($context['search_params']['brd'])) { |
|
294 | + foreach ($context['search_params']['brd'] as $board_id) |
|
287 | 295 | echo ' |
288 | 296 | <input type="hidden" name="brd[', $board_id, ']" value="', $board_id, '">'; |
297 | + } |
|
289 | 298 | |
290 | 299 | echo ' |
291 | 300 | </form> |
@@ -297,18 +306,20 @@ discard block |
||
297 | 306 | if ($context['compact']) |
298 | 307 | { |
299 | 308 | // Quick moderation set to checkboxes? Oh, how fun :/ |
300 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
301 | - echo ' |
|
309 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
310 | + echo ' |
|
302 | 311 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="topicForm">'; |
312 | + } |
|
303 | 313 | |
304 | 314 | echo ' |
305 | 315 | <div class="cat_bar"> |
306 | 316 | <h3 class="catbg"> |
307 | 317 | <span class="floatright">'; |
308 | 318 | |
309 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
310 | - echo ' |
|
319 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
320 | + echo ' |
|
311 | 321 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');">'; |
322 | + } |
|
312 | 323 | echo ' |
313 | 324 | </span> |
314 | 325 | <span class="generic_icons filter"></span> ', $txt['mlist_search_results'], ': ', $context['search_params']['search'], ' |
@@ -316,15 +327,15 @@ discard block |
||
316 | 327 | </div>'; |
317 | 328 | |
318 | 329 | // Was anything even found? |
319 | - if (!empty($context['topics'])) |
|
320 | - echo ' |
|
330 | + if (!empty($context['topics'])) { |
|
331 | + echo ' |
|
321 | 332 | <div class="pagesection"> |
322 | 333 | <span>', $context['page_index'], '</span> |
323 | 334 | </div>'; |
324 | - |
|
325 | - else |
|
326 | - echo ' |
|
335 | + } else { |
|
336 | + echo ' |
|
327 | 337 | <div class="roundframe">', $txt['find_no_results'], '</div>'; |
338 | + } |
|
328 | 339 | |
329 | 340 | // While we have results to show ... |
330 | 341 | while ($topic = $context['get_topics']()) |
@@ -347,41 +358,46 @@ discard block |
||
347 | 358 | echo ' |
348 | 359 | <div class="floatright">'; |
349 | 360 | |
350 | - if ($options['display_quick_mod'] == 1) |
|
351 | - echo ' |
|
361 | + if ($options['display_quick_mod'] == 1) { |
|
362 | + echo ' |
|
352 | 363 | <input type="checkbox" name="topics[]" value="', $topic['id'], '">'; |
353 | - |
|
354 | - else |
|
364 | + } else |
|
355 | 365 | { |
356 | - if ($topic['quick_mod']['remove']) |
|
357 | - echo ' |
|
366 | + if ($topic['quick_mod']['remove']) { |
|
367 | + echo ' |
|
358 | 368 | <a href="', $scripturl, '?action=quickmod;board=' . $topic['board']['id'] . '.0;actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons delete" title="', $txt['remove_topic'], '"></span></a>'; |
369 | + } |
|
359 | 370 | |
360 | - if ($topic['quick_mod']['lock']) |
|
361 | - echo ' |
|
371 | + if ($topic['quick_mod']['lock']) { |
|
372 | + echo ' |
|
362 | 373 | <a href="', $scripturl, '?action=quickmod;board=' . $topic['board']['id'] . '.0;actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons lock" title="', $topic['is_locked'] ? $txt['set_unlock'] : $txt['set_lock'], '"></span></a>'; |
374 | + } |
|
363 | 375 | |
364 | - if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
|
365 | - echo ' |
|
376 | + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) { |
|
377 | + echo ' |
|
366 | 378 | <br>'; |
379 | + } |
|
367 | 380 | |
368 | - if ($topic['quick_mod']['sticky']) |
|
369 | - echo ' |
|
381 | + if ($topic['quick_mod']['sticky']) { |
|
382 | + echo ' |
|
370 | 383 | <a href="', $scripturl, '?action=quickmod;board=' . $topic['board']['id'] . '.0;actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons sticky" title="', $topic['is_sticky'] ? $txt['set_nonsticky'] : $txt['set_sticky'], '"></span></a>'; |
384 | + } |
|
371 | 385 | |
372 | - if ($topic['quick_mod']['move']) |
|
373 | - echo ' |
|
386 | + if ($topic['quick_mod']['move']) { |
|
387 | + echo ' |
|
374 | 388 | <a href="', $scripturl, '?action=movetopic;topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>'; |
389 | + } |
|
375 | 390 | } |
376 | 391 | |
377 | 392 | echo ' |
378 | 393 | </div><!-- .floatright -->'; |
379 | 394 | } |
380 | 395 | |
381 | - if ($message['body_highlighted'] != '') |
|
382 | - echo ' |
|
396 | + if ($message['body_highlighted'] != '') { |
|
397 | + echo ' |
|
383 | 398 | <br class="clear"> |
384 | 399 | <div class="list_posts double_height">', $message['body_highlighted'], '</div>'; |
400 | + } |
|
385 | 401 | } |
386 | 402 | |
387 | 403 | echo ' |
@@ -389,11 +405,12 @@ discard block |
||
389 | 405 | </div><!-- $topic[css_class] -->'; |
390 | 406 | |
391 | 407 | } |
392 | - if (!empty($context['topics'])) |
|
393 | - echo ' |
|
408 | + if (!empty($context['topics'])) { |
|
409 | + echo ' |
|
394 | 410 | <div class="pagesection"> |
395 | 411 | <span>', $context['page_index'], '</span> |
396 | 412 | </div>'; |
413 | + } |
|
397 | 414 | |
398 | 415 | if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) |
399 | 416 | { |
@@ -402,17 +419,19 @@ discard block |
||
402 | 419 | <select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '> |
403 | 420 | <option value="">--------</option>'; |
404 | 421 | |
405 | - foreach ($context['qmod_actions'] as $qmod_action) |
|
406 | - if ($context['can_' . $qmod_action]) |
|
422 | + foreach ($context['qmod_actions'] as $qmod_action) { |
|
423 | + if ($context['can_' . $qmod_action]) |
|
407 | 424 | echo ' |
408 | 425 | <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
426 | + } |
|
409 | 427 | |
410 | 428 | echo ' |
411 | 429 | </select>'; |
412 | 430 | |
413 | - if ($context['can_move']) |
|
414 | - echo ' |
|
431 | + if ($context['can_move']) { |
|
432 | + echo ' |
|
415 | 433 | <span id="quick_mod_jump_to"></span>'; |
434 | + } |
|
416 | 435 | |
417 | 436 | echo ' |
418 | 437 | <input type="hidden" name="redirect_url" value="', $scripturl . '?action=search2;params=' . $context['params'], '"> |
@@ -421,13 +440,13 @@ discard block |
||
421 | 440 | } |
422 | 441 | |
423 | 442 | |
424 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) |
|
425 | - echo ' |
|
443 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) { |
|
444 | + echo ' |
|
426 | 445 | <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"> |
427 | 446 | </form>'; |
447 | + } |
|
428 | 448 | |
429 | - } |
|
430 | - else |
|
449 | + } else |
|
431 | 450 | { |
432 | 451 | echo ' |
433 | 452 | <div class="cat_bar"> |
@@ -439,9 +458,10 @@ discard block |
||
439 | 458 | <span>', $context['page_index'], '</span> |
440 | 459 | </div>'; |
441 | 460 | |
442 | - if (empty($context['topics'])) |
|
443 | - echo ' |
|
461 | + if (empty($context['topics'])) { |
|
462 | + echo ' |
|
444 | 463 | <div class="information">(', $txt['search_no_results'], ')</div>'; |
464 | + } |
|
445 | 465 | |
446 | 466 | while ($topic = $context['get_topics']()) |
447 | 467 | { |
@@ -458,23 +478,27 @@ discard block |
||
458 | 478 | </div> |
459 | 479 | <div class="list_posts">', $message['body_highlighted'], '</div>'; |
460 | 480 | |
461 | - if ($topic['can_reply']) |
|
462 | - echo ' |
|
481 | + if ($topic['can_reply']) { |
|
482 | + echo ' |
|
463 | 483 | <ul class="quickbuttons">'; |
484 | + } |
|
464 | 485 | |
465 | 486 | // If they *can* reply? |
466 | - if ($topic['can_reply']) |
|
467 | - echo ' |
|
487 | + if ($topic['can_reply']) { |
|
488 | + echo ' |
|
468 | 489 | <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>'; |
490 | + } |
|
469 | 491 | |
470 | 492 | // If they *can* quote? |
471 | - if ($topic['can_quote']) |
|
472 | - echo ' |
|
493 | + if ($topic['can_quote']) { |
|
494 | + echo ' |
|
473 | 495 | <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'] . ';quote=' . $message['id'] . '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>'; |
496 | + } |
|
474 | 497 | |
475 | - if ($topic['can_reply']) |
|
476 | - echo ' |
|
498 | + if ($topic['can_reply']) { |
|
499 | + echo ' |
|
477 | 500 | </ul>'; |
501 | + } |
|
478 | 502 | echo ' |
479 | 503 | <br class="clear"> |
480 | 504 | </div><!-- $topic[css_class] -->'; |
@@ -493,8 +517,8 @@ discard block |
||
493 | 517 | <div class="smalltext righttext" id="search_jump_to"></div> |
494 | 518 | <script>'; |
495 | 519 | |
496 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) |
|
497 | - echo ' |
|
520 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) { |
|
521 | + echo ' |
|
498 | 522 | if (typeof(window.XMLHttpRequest) != "undefined") |
499 | 523 | aJumpTo[aJumpTo.length] = new JumpTo({ |
500 | 524 | sContainerId: "quick_mod_jump_to", |
@@ -509,6 +533,7 @@ discard block |
||
509 | 533 | bDisabled: true, |
510 | 534 | sCustomName: "move_to" |
511 | 535 | });'; |
536 | + } |
|
512 | 537 | |
513 | 538 | echo ' |
514 | 539 | if (typeof(window.XMLHttpRequest) != "undefined") |
@@ -37,9 +37,10 @@ discard block |
||
37 | 37 | echo ' |
38 | 38 | <optgroup label="', $category['name'], '">'; |
39 | 39 | |
40 | - foreach ($category['boards'] as $board) |
|
41 | - echo ' |
|
40 | + foreach ($category['boards'] as $board) { |
|
41 | + echo ' |
|
42 | 42 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=> ' : '', $board['name'], '</option>'; |
43 | + } |
|
43 | 44 | echo ' |
44 | 45 | </optgroup>'; |
45 | 46 | } |
@@ -70,9 +71,10 @@ discard block |
||
70 | 71 | </div><!-- .move_topic --> |
71 | 72 | </div><!-- .windowbg -->'; |
72 | 73 | |
73 | - if ($context['back_to_topic']) |
|
74 | - echo ' |
|
74 | + if ($context['back_to_topic']) { |
|
75 | + echo ' |
|
75 | 76 | <input type="hidden" name="goback" value="1">'; |
77 | + } |
|
76 | 78 | |
77 | 79 | echo ' |
78 | 80 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -125,10 +127,10 @@ discard block |
||
125 | 127 | <option value="86400">', $txt['two_months'], '</option> |
126 | 128 | </select> |
127 | 129 | </dd>'; |
128 | - } |
|
129 | - else |
|
130 | - echo ' |
|
130 | + } else { |
|
131 | + echo ' |
|
131 | 132 | <input type="hidden" name="redirect_expires" value="0">'; |
133 | + } |
|
132 | 134 | |
133 | 135 | echo ' |
134 | 136 | </dl> |
@@ -207,9 +209,10 @@ discard block |
||
207 | 209 | echo ' |
208 | 210 | <optgroup label="', $cat['name'], '">'; |
209 | 211 | |
210 | - foreach ($cat['boards'] as $board) |
|
211 | - echo ' |
|
212 | + foreach ($cat['boards'] as $board) { |
|
213 | + echo ' |
|
212 | 214 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
215 | + } |
|
213 | 216 | |
214 | 217 | echo ' |
215 | 218 | </optgroup>'; |
@@ -220,9 +223,9 @@ discard block |
||
220 | 223 | <input type="submit" value="', $txt['go'], '" class="button"> |
221 | 224 | </form>'; |
222 | 225 | |
226 | + } else { |
|
227 | + echo $txt['target_below']; |
|
223 | 228 | } |
224 | - else |
|
225 | - echo $txt['target_below']; |
|
226 | 229 | |
227 | 230 | echo ' </h4> |
228 | 231 | </div><!-- .title_bar -->'; |
@@ -240,12 +243,13 @@ discard block |
||
240 | 243 | |
241 | 244 | $merge_button = create_button('merge', 'merge', ''); |
242 | 245 | |
243 | - foreach ($context['topics'] as $topic) |
|
244 | - echo ' |
|
246 | + foreach ($context['topics'] as $topic) { |
|
247 | + echo ' |
|
245 | 248 | <li> |
246 | 249 | <a href="', $scripturl, '?action=mergetopics;sa=options;board=', $context['current_board'], '.0;from=', $context['origin_topic'], ';to=', $topic['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $merge_button, '</a> |
247 | 250 | <a href="', $scripturl, '?topic=', $topic['id'], '.0" target="_blank">', $topic['subject'], '</a> ', $txt['started_by'], ' ', $topic['poster']['link'], ' |
248 | 251 | </li>'; |
252 | + } |
|
249 | 253 | |
250 | 254 | echo ' |
251 | 255 | </ul> |
@@ -256,9 +260,10 @@ discard block |
||
256 | 260 | </div>'; |
257 | 261 | } |
258 | 262 | // Just a nice "There aren't any topics" message |
259 | - else |
|
260 | - echo ' |
|
263 | + else { |
|
264 | + echo ' |
|
261 | 265 | <div class="windowbg2">', $txt['topic_alert_none'], '</div>'; |
266 | + } |
|
262 | 267 | |
263 | 268 | echo ' |
264 | 269 | <br> |
@@ -308,8 +313,8 @@ discard block |
||
308 | 313 | </thead> |
309 | 314 | <tbody>'; |
310 | 315 | |
311 | - foreach ($context['topics'] as $topic) |
|
312 | - echo ' |
|
316 | + foreach ($context['topics'] as $topic) { |
|
317 | + echo ' |
|
313 | 318 | <tr class="windowbg"> |
314 | 319 | <td> |
315 | 320 | <input type="checkbox" name="topics[]" value="' . $topic['id'] . '" checked> |
@@ -329,6 +334,7 @@ discard block |
||
329 | 334 | <input type="checkbox" name="notifications[]" value="' . $topic['id'] . '" checked> |
330 | 335 | </td> |
331 | 336 | </tr>'; |
337 | + } |
|
332 | 338 | echo ' |
333 | 339 | </tbody> |
334 | 340 | </table> |
@@ -338,9 +344,10 @@ discard block |
||
338 | 344 | <legend>', $txt['merge_select_subject'], '</legend> |
339 | 345 | <select name="subject" onchange="this.form.custom_subject.style.display = (this.options[this.selectedIndex].value != 0) ? \'none\': \'\' ;">'; |
340 | 346 | |
341 | - foreach ($context['topics'] as $topic) |
|
342 | - echo ' |
|
347 | + foreach ($context['topics'] as $topic) { |
|
348 | + echo ' |
|
343 | 349 | <option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected' : '') . '>', $topic['subject'], '</option>'; |
350 | + } |
|
344 | 351 | echo ' |
345 | 352 | <option value="0">', $txt['merge_custom_subject'], ':</option> |
346 | 353 | </select> |
@@ -359,11 +366,12 @@ discard block |
||
359 | 366 | <legend>', $txt['merge_select_target_board'], '</legend> |
360 | 367 | <ul>'; |
361 | 368 | |
362 | - foreach ($context['boards'] as $board) |
|
363 | - echo ' |
|
369 | + foreach ($context['boards'] as $board) { |
|
370 | + echo ' |
|
364 | 371 | <li> |
365 | 372 | <input type="radio" name="board" value="' . $board['id'] . '"' . ($board['selected'] ? ' checked' : '') . '> ' . $board['name'] . ' |
366 | 373 | </li>'; |
374 | + } |
|
367 | 375 | echo ' |
368 | 376 | </ul> |
369 | 377 | </fieldset>'; |
@@ -375,11 +383,12 @@ discard block |
||
375 | 383 | <legend>' . $txt['merge_select_poll'] . '</legend> |
376 | 384 | <ul>'; |
377 | 385 | |
378 | - foreach ($context['polls'] as $poll) |
|
379 | - echo ' |
|
386 | + foreach ($context['polls'] as $poll) { |
|
387 | + echo ' |
|
380 | 388 | <li> |
381 | 389 | <input type="radio" name="poll" value="' . $poll['id'] . '"' . ($poll['selected'] ? ' checked' : '') . '> ' . $poll['question'] . ' (' . $txt['topic'] . ': <a href="' . $scripturl . '?topic=' . $poll['topic']['id'] . '.0" target="_blank">' . $poll['topic']['subject'] . '</a>) |
382 | 390 | </li>'; |
391 | + } |
|
383 | 392 | echo ' |
384 | 393 | <li> |
385 | 394 | <input type="radio" name="poll" value="-1"> (' . $txt['merge_no_poll'] . ') |
@@ -62,16 +62,17 @@ |
||
62 | 62 | <div id="error_box" class="errorbox"> |
63 | 63 | <ul id="error_list">'; |
64 | 64 | |
65 | - foreach ($context['post_errors'] as $key => $error) |
|
66 | - echo ' |
|
65 | + foreach ($context['post_errors'] as $key => $error) { |
|
66 | + echo ' |
|
67 | 67 | <li id="error_', $key, '" class="error">', $error, '</li>'; |
68 | + } |
|
68 | 69 | |
69 | 70 | echo ' |
70 | 71 | </ul>'; |
71 | - } |
|
72 | - else |
|
73 | - echo ' |
|
72 | + } else { |
|
73 | + echo ' |
|
74 | 74 | <div style="display:none" id="error_box" class="errorbox">'; |
75 | + } |
|
75 | 76 | |
76 | 77 | echo ' |
77 | 78 | </div>'; |
@@ -18,11 +18,12 @@ discard block |
||
18 | 18 | global $context, $txt, $scripturl; |
19 | 19 | |
20 | 20 | // Let them know the action was a success. |
21 | - if (!empty($context['report_post_action'])) |
|
22 | - echo ' |
|
21 | + if (!empty($context['report_post_action'])) { |
|
22 | + echo ' |
|
23 | 23 | <div class="infobox"> |
24 | 24 | ', $txt['report_action_' . $context['report_post_action']], ' |
25 | 25 | </div>'; |
26 | + } |
|
26 | 27 | |
27 | 28 | echo ' |
28 | 29 | <form id="reported_posts" action="', $scripturl, '?action=moderate;area=reportedposts;sa=show', $context['view_closed'] ? ';closed' : '', ';start=', $context['start'], '" method="post" accept-charset="', $context['character_set'], '"> |
@@ -52,8 +53,9 @@ discard block |
||
52 | 53 | |
53 | 54 | // Prepare the comments... |
54 | 55 | $comments = array(); |
55 | - foreach ($report['comments'] as $comment) |
|
56 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
56 | + foreach ($report['comments'] as $comment) { |
|
57 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
58 | + } |
|
57 | 59 | |
58 | 60 | echo ' |
59 | 61 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -69,18 +71,21 @@ discard block |
||
69 | 71 | <li><a href="', $scripturl, '?action=moderate;area=reportedposts;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>'; |
70 | 72 | |
71 | 73 | // Delete message button. |
72 | - if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) |
|
73 | - echo ' |
|
74 | + if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) { |
|
75 | + echo ' |
|
74 | 76 | <li><a href="', $scripturl, '?action=deletemsg;topic=', $report['topic']['id'], '.0;msg=', $report['topic']['id_msg'], ';modcenter;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['mc_reportedp_delete_confirm'], '" class="you_sure">', $delete_button, '</a></li>'; |
77 | + } |
|
75 | 78 | |
76 | 79 | // Ban this user button. |
77 | - if (!$report['closed'] && !empty($context['report_manage_bans'])) |
|
78 | - echo ' |
|
80 | + if (!$report['closed'] && !empty($context['report_manage_bans'])) { |
|
81 | + echo ' |
|
79 | 82 | <li><a href="', $scripturl, '?action=admin;area=ban;sa=add', (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']), ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>'; |
83 | + } |
|
80 | 84 | |
81 | - if (!$context['view_closed']) |
|
82 | - echo ' |
|
85 | + if (!$context['view_closed']) { |
|
86 | + echo ' |
|
83 | 87 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>'; |
88 | + } |
|
84 | 89 | |
85 | 90 | echo ' |
86 | 91 | </ul> |
@@ -88,18 +93,20 @@ discard block |
||
88 | 93 | } |
89 | 94 | |
90 | 95 | // Were none found? |
91 | - if (empty($context['reports'])) |
|
92 | - echo ' |
|
96 | + if (empty($context['reports'])) { |
|
97 | + echo ' |
|
93 | 98 | <div class="windowbg2"> |
94 | 99 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
95 | 100 | </div>'; |
101 | + } |
|
96 | 102 | |
97 | 103 | echo ' |
98 | 104 | <div class="pagesection">'; |
99 | 105 | |
100 | - if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many']) |
|
101 | - echo ' |
|
106 | + if (!empty($context['total_reports']) && $context['total_reports'] >= $context['reports_how_many']) { |
|
107 | + echo ' |
|
102 | 108 | <div class="pagelinks floatleft">' . $context['page_index'] . '</div>'; |
109 | + } |
|
103 | 110 | |
104 | 111 | echo ' |
105 | 112 | <div class="floatright">', !$context['view_closed'] ? ' |
@@ -130,18 +137,20 @@ discard block |
||
130 | 137 | <div class="modbox"> |
131 | 138 | <ul>'; |
132 | 139 | |
133 | - foreach ($context['reported_posts'] as $report) |
|
134 | - echo ' |
|
140 | + foreach ($context['reported_posts'] as $report) { |
|
141 | + echo ' |
|
135 | 142 | <li class="smalltext"> |
136 | 143 | <a href="', $report['report_href'], '">', $report['subject'], '</a> ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], ' |
137 | 144 | </li>'; |
145 | + } |
|
138 | 146 | |
139 | 147 | // Don't have any watched users right now? |
140 | - if (empty($context['reported_posts'])) |
|
141 | - echo ' |
|
148 | + if (empty($context['reported_posts'])) { |
|
149 | + echo ' |
|
142 | 150 | <li> |
143 | 151 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
144 | 152 | </li>'; |
153 | + } |
|
145 | 154 | |
146 | 155 | echo ' |
147 | 156 | </ul> |
@@ -189,11 +198,12 @@ discard block |
||
189 | 198 | global $context, $scripturl, $txt; |
190 | 199 | |
191 | 200 | // Let them know the action was a success. |
192 | - if (!empty($context['report_post_action'])) |
|
193 | - echo ' |
|
201 | + if (!empty($context['report_post_action'])) { |
|
202 | + echo ' |
|
194 | 203 | <div class="infobox"> |
195 | 204 | ', $txt['report_action_' . $context['report_post_action']], ' |
196 | 205 | </div>'; |
206 | + } |
|
197 | 207 | |
198 | 208 | echo ' |
199 | 209 | <div id="modcenter"> |
@@ -229,14 +239,15 @@ discard block |
||
229 | 239 | <h3 class="catbg">', $txt['mc_modreport_whoreported_title'], '</h3> |
230 | 240 | </div>'; |
231 | 241 | |
232 | - foreach ($context['report']['comments'] as $comment) |
|
233 | - echo ' |
|
242 | + foreach ($context['report']['comments'] as $comment) { |
|
243 | + echo ' |
|
234 | 244 | <div class="windowbg"> |
235 | 245 | <p class="smalltext"> |
236 | 246 | ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' |
237 | 247 | </p> |
238 | 248 | <p>', $comment['message'], '</p> |
239 | 249 | </div>'; |
250 | + } |
|
240 | 251 | |
241 | 252 | echo ' |
242 | 253 | <br> |
@@ -245,11 +256,12 @@ discard block |
||
245 | 256 | </div> |
246 | 257 | <div>'; |
247 | 258 | |
248 | - if (empty($context['report']['mod_comments'])) |
|
249 | - echo ' |
|
259 | + if (empty($context['report']['mod_comments'])) { |
|
260 | + echo ' |
|
250 | 261 | <div class="information"> |
251 | 262 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
252 | 263 | </div>'; |
264 | + } |
|
253 | 265 | |
254 | 266 | foreach ($context['report']['mod_comments'] as $comment) |
255 | 267 | { |
@@ -335,18 +347,20 @@ discard block |
||
335 | 347 | <div class="modbox"> |
336 | 348 | <ul>'; |
337 | 349 | |
338 | - foreach ($context['reported_members'] as $report) |
|
339 | - echo ' |
|
350 | + foreach ($context['reported_members'] as $report) { |
|
351 | + echo ' |
|
340 | 352 | <li class="smalltext"> |
341 | 353 | <a href="', $report['report_href'], '">', $report['user_name'], '</a> |
342 | 354 | </li>'; |
355 | + } |
|
343 | 356 | |
344 | 357 | // Don't have any reported members right now? |
345 | - if (empty($context['reported_members'])) |
|
346 | - echo ' |
|
358 | + if (empty($context['reported_members'])) { |
|
359 | + echo ' |
|
347 | 360 | <li> |
348 | 361 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
349 | 362 | </li>'; |
363 | + } |
|
350 | 364 | |
351 | 365 | echo ' |
352 | 366 | </ul> |
@@ -394,11 +408,12 @@ discard block |
||
394 | 408 | global $context, $txt, $scripturl; |
395 | 409 | |
396 | 410 | // Let them know the action was a success. |
397 | - if (!empty($context['report_post_action']) && !empty($txt['report_action_' . $context['report_post_action']])) |
|
398 | - echo ' |
|
411 | + if (!empty($context['report_post_action']) && !empty($txt['report_action_' . $context['report_post_action']])) { |
|
412 | + echo ' |
|
399 | 413 | <div class="infobox"> |
400 | 414 | ', $txt['report_action_' . $context['report_post_action']], ' |
401 | 415 | </div>'; |
416 | + } |
|
402 | 417 | |
403 | 418 | echo ' |
404 | 419 | <form id="reported_members" action="', $scripturl, '?action=moderate;area=reportedmembers;sa=show', $context['view_closed'] ? ';closed' : '', ';start=', $context['start'], '" method="post" accept-charset="', $context['character_set'], '"> |
@@ -430,8 +445,9 @@ discard block |
||
430 | 445 | |
431 | 446 | // Prepare the comments... |
432 | 447 | $comments = array(); |
433 | - foreach ($report['comments'] as $comment) |
|
434 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
448 | + foreach ($report['comments'] as $comment) { |
|
449 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
450 | + } |
|
435 | 451 | |
436 | 452 | echo ' |
437 | 453 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -443,13 +459,15 @@ discard block |
||
443 | 459 | <li><a href="', $scripturl, '?action=moderate;area=reportedmembers;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>'; |
444 | 460 | |
445 | 461 | // Ban this user button. |
446 | - if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) |
|
447 | - echo ' |
|
462 | + if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) { |
|
463 | + echo ' |
|
448 | 464 | <li><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $report['user']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>'; |
465 | + } |
|
449 | 466 | |
450 | - if (!$context['view_closed']) |
|
451 | - echo ' |
|
467 | + if (!$context['view_closed']) { |
|
468 | + echo ' |
|
452 | 469 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '"></li>'; |
470 | + } |
|
453 | 471 | |
454 | 472 | echo ' |
455 | 473 | </ul> |
@@ -457,11 +475,12 @@ discard block |
||
457 | 475 | } |
458 | 476 | |
459 | 477 | // Were none found? |
460 | - if (empty($context['reports'])) |
|
461 | - echo ' |
|
478 | + if (empty($context['reports'])) { |
|
479 | + echo ' |
|
462 | 480 | <div class="windowbg2"> |
463 | 481 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
464 | 482 | </div>'; |
483 | + } |
|
465 | 484 | |
466 | 485 | echo ' |
467 | 486 | <div class="pagesection"> |
@@ -482,11 +501,12 @@ discard block |
||
482 | 501 | global $context, $scripturl, $txt; |
483 | 502 | |
484 | 503 | // Let them know the action was a success. |
485 | - if (!empty($context['report_post_action'])) |
|
486 | - echo ' |
|
504 | + if (!empty($context['report_post_action'])) { |
|
505 | + echo ' |
|
487 | 506 | <div class="infobox"> |
488 | 507 | ', $txt['report_action_' . $context['report_post_action']], ' |
489 | 508 | </div>'; |
509 | + } |
|
490 | 510 | |
491 | 511 | echo ' |
492 | 512 | <div id="modcenter"> |
@@ -519,14 +539,15 @@ discard block |
||
519 | 539 | <h3 class="catbg">', $txt['mc_memberreport_whoreported_title'], '</h3> |
520 | 540 | </div>'; |
521 | 541 | |
522 | - foreach ($context['report']['comments'] as $comment) |
|
523 | - echo ' |
|
542 | + foreach ($context['report']['comments'] as $comment) { |
|
543 | + echo ' |
|
524 | 544 | <div class="windowbg"> |
525 | 545 | <p class="smalltext"> |
526 | 546 | ', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), ' |
527 | 547 | </p> |
528 | 548 | <p>', $comment['message'], '</p> |
529 | 549 | </div>'; |
550 | + } |
|
530 | 551 | |
531 | 552 | echo ' |
532 | 553 | <br> |
@@ -535,11 +556,12 @@ discard block |
||
535 | 556 | </div> |
536 | 557 | <div>'; |
537 | 558 | |
538 | - if (empty($context['report']['mod_comments'])) |
|
539 | - echo ' |
|
559 | + if (empty($context['report']['mod_comments'])) { |
|
560 | + echo ' |
|
540 | 561 | <div class="information"> |
541 | 562 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
542 | 563 | </div>'; |
564 | + } |
|
543 | 565 | |
544 | 566 | foreach ($context['report']['mod_comments'] as $comment) |
545 | 567 | { |
@@ -18,11 +18,12 @@ discard block |
||
18 | 18 | global $context, $settings, $options, $scripturl, $modSettings, $txt; |
19 | 19 | |
20 | 20 | // Let them know why their message became unapproved. |
21 | - if ($context['becomesUnapproved']) |
|
22 | - echo ' |
|
21 | + if ($context['becomesUnapproved']) { |
|
22 | + echo ' |
|
23 | 23 | <div class="noticebox"> |
24 | 24 | ', $txt['post_becomesUnapproved'], ' |
25 | 25 | </div>'; |
26 | + } |
|
26 | 27 | |
27 | 28 | if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0)) |
28 | 29 | { |
@@ -46,17 +47,19 @@ discard block |
||
46 | 47 | </a>'; |
47 | 48 | |
48 | 49 | // Has it outstanding posts for approval? |
49 | - if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) |
|
50 | - echo ' |
|
50 | + if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) { |
|
51 | + echo ' |
|
51 | 52 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>'; |
53 | + } |
|
52 | 54 | |
53 | 55 | echo ' |
54 | 56 | <p class="board_description">', $board['description'], '</p>'; |
55 | 57 | |
56 | 58 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
57 | - if (!empty($board['moderators']) || !empty($board['moderator_groups'])) |
|
58 | - echo ' |
|
59 | + if (!empty($board['moderators']) || !empty($board['moderator_groups'])) { |
|
60 | + echo ' |
|
59 | 61 | <p class="moderators">', count($board['link_moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>'; |
62 | + } |
|
60 | 63 | |
61 | 64 | // Show some basic information about the number of posts, etc. |
62 | 65 | echo ' |
@@ -68,9 +71,10 @@ discard block |
||
68 | 71 | </div> |
69 | 72 | <div class="lastpost lpr_border">'; |
70 | 73 | |
71 | - if (!empty($board['last_post']['id'])) |
|
72 | - echo ' |
|
74 | + if (!empty($board['last_post']['id'])) { |
|
75 | + echo ' |
|
73 | 76 | <p>', $board['last_post']['last_post_message'], '</p>'; |
77 | + } |
|
74 | 78 | |
75 | 79 | echo ' |
76 | 80 | </div>'; |
@@ -84,14 +88,16 @@ discard block |
||
84 | 88 | id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ |
85 | 89 | foreach ($board['children'] as $child) |
86 | 90 | { |
87 | - if (!$child['is_redirect']) |
|
88 | - $child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>'; |
|
89 | - else |
|
90 | - $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>'; |
|
91 | + if (!$child['is_redirect']) { |
|
92 | + $child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>'; |
|
93 | + } else { |
|
94 | + $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>'; |
|
95 | + } |
|
91 | 96 | |
92 | 97 | // Has it posts awaiting approval? |
93 | - if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics'])) |
|
94 | - $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
98 | + if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics'])) { |
|
99 | + $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
100 | + } |
|
95 | 101 | |
96 | 102 | $children[] = $child['new'] ? '<span class="strong">' . $child['link'] . '</span>' : '<span>' . $child['link'] . '</span>'; |
97 | 103 | } |
@@ -111,8 +117,9 @@ discard block |
||
111 | 117 | } |
112 | 118 | |
113 | 119 | // They can only mark read if they are logged in and it's enabled! |
114 | - if (!$context['user']['is_logged']) |
|
115 | - unset($context['normal_buttons']['markread']); |
|
120 | + if (!$context['user']['is_logged']) { |
|
121 | + unset($context['normal_buttons']['markread']); |
|
122 | + } |
|
116 | 123 | |
117 | 124 | if (!$context['no_topic_listing']) |
118 | 125 | { |
@@ -139,13 +146,15 @@ discard block |
||
139 | 146 | <h3>', $context['name'], '</h3> |
140 | 147 | <p>'; |
141 | 148 | |
142 | - if ($context['description'] != '') |
|
143 | - echo ' |
|
149 | + if ($context['description'] != '') { |
|
150 | + echo ' |
|
144 | 151 | ', $context['description']; |
152 | + } |
|
145 | 153 | |
146 | - if (!empty($context['moderators'])) |
|
147 | - echo ' |
|
154 | + if (!empty($context['moderators'])) { |
|
155 | + echo ' |
|
148 | 156 | ', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.'; |
157 | + } |
|
149 | 158 | |
150 | 159 | echo ' |
151 | 160 | </p> |
@@ -153,9 +162,10 @@ discard block |
||
153 | 162 | } |
154 | 163 | |
155 | 164 | // If Quick Moderation is enabled start the form. |
156 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
|
157 | - echo ' |
|
165 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) { |
|
166 | + echo ' |
|
158 | 167 | <form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">'; |
168 | + } |
|
159 | 169 | |
160 | 170 | echo ' |
161 | 171 | <div id="messageindex">'; |
@@ -165,11 +175,11 @@ discard block |
||
165 | 175 | echo ' |
166 | 176 | <div class="information">'; |
167 | 177 | |
168 | - if ($settings['display_who_viewing'] == 1) |
|
169 | - echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
170 | - |
|
171 | - else |
|
172 | - echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); |
|
178 | + if ($settings['display_who_viewing'] == 1) { |
|
179 | + echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
180 | + } else { |
|
181 | + echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); |
|
182 | + } |
|
173 | 183 | echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board']; |
174 | 184 | |
175 | 185 | echo ' |
@@ -189,32 +199,36 @@ discard block |
||
189 | 199 | <div class="lastpost">', $context['topics_headers']['last_post'], '</div>'; |
190 | 200 | |
191 | 201 | // Show a "select all" box for quick moderation? |
192 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) |
|
193 | - echo ' |
|
202 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
203 | + echo ' |
|
194 | 204 | <div class="moderation"> |
195 | 205 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');"> |
196 | 206 | </div>'; |
207 | + } |
|
197 | 208 | |
198 | 209 | // If it's on in "image" mode, don't show anything but the column. |
199 | - elseif (!empty($context['can_quick_mod'])) |
|
200 | - echo ' |
|
210 | + elseif (!empty($context['can_quick_mod'])) { |
|
211 | + echo ' |
|
201 | 212 | <div class="moderation"></div>'; |
213 | + } |
|
202 | 214 | } |
203 | 215 | |
204 | 216 | // No topics... just say, "sorry bub". |
205 | - else |
|
206 | - echo ' |
|
217 | + else { |
|
218 | + echo ' |
|
207 | 219 | <h3 class="titlebg">', $txt['topic_alert_none'], '</h3>'; |
220 | + } |
|
208 | 221 | |
209 | 222 | echo ' |
210 | 223 | </div><!-- #topic_header -->'; |
211 | 224 | |
212 | 225 | // If this person can approve items and we have some awaiting approval tell them. |
213 | - if (!empty($context['unapproved_posts_message'])) |
|
214 | - echo ' |
|
226 | + if (!empty($context['unapproved_posts_message'])) { |
|
227 | + echo ' |
|
215 | 228 | <div class="information"> |
216 | 229 | <span class="alert">!</span> ', $context['unapproved_posts_message'], ' |
217 | 230 | </div>'; |
231 | + } |
|
218 | 232 | |
219 | 233 | // Contain the topic list |
220 | 234 | echo ' |
@@ -235,25 +249,30 @@ discard block |
||
235 | 249 | echo ' |
236 | 250 | <div class="icons floatright">'; |
237 | 251 | |
238 | - if ($topic['is_watched']) |
|
239 | - echo ' |
|
252 | + if ($topic['is_watched']) { |
|
253 | + echo ' |
|
240 | 254 | <span class="generic_icons watch" title="', $txt['watching_this_topic'], '"></span>'; |
255 | + } |
|
241 | 256 | |
242 | - if ($topic['is_locked']) |
|
243 | - echo ' |
|
257 | + if ($topic['is_locked']) { |
|
258 | + echo ' |
|
244 | 259 | <span class="generic_icons lock"></span>'; |
260 | + } |
|
245 | 261 | |
246 | - if ($topic['is_sticky']) |
|
247 | - echo ' |
|
262 | + if ($topic['is_sticky']) { |
|
263 | + echo ' |
|
248 | 264 | <span class="generic_icons sticky"></span>'; |
265 | + } |
|
249 | 266 | |
250 | - if ($topic['is_redirect']) |
|
251 | - echo ' |
|
267 | + if ($topic['is_redirect']) { |
|
268 | + echo ' |
|
252 | 269 | <span class="generic_icons move"></span>'; |
270 | + } |
|
253 | 271 | |
254 | - if ($topic['is_poll']) |
|
255 | - echo ' |
|
272 | + if ($topic['is_poll']) { |
|
273 | + echo ' |
|
256 | 274 | <span class="generic_icons poll"></span>'; |
275 | + } |
|
257 | 276 | |
258 | 277 | echo ' |
259 | 278 | </div>'; |
@@ -285,26 +304,31 @@ discard block |
||
285 | 304 | echo ' |
286 | 305 | <div class="moderation">'; |
287 | 306 | |
288 | - if ($options['display_quick_mod'] == 1) |
|
289 | - echo ' |
|
307 | + if ($options['display_quick_mod'] == 1) { |
|
308 | + echo ' |
|
290 | 309 | <input type="checkbox" name="topics[]" value="', $topic['id'], '">'; |
291 | - else |
|
310 | + } else |
|
292 | 311 | { |
293 | 312 | // Check permissions on each and show only the ones they are allowed to use. |
294 | - if ($topic['quick_mod']['remove']) |
|
295 | - echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons delete" title="', $txt['remove_topic'], '"></span></a>'; |
|
313 | + if ($topic['quick_mod']['remove']) { |
|
314 | + echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons delete" title="', $txt['remove_topic'], '"></span></a>'; |
|
315 | + } |
|
296 | 316 | |
297 | - if ($topic['quick_mod']['lock']) |
|
298 | - echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons lock" title="', $topic['is_locked'] ? $txt['set_unlock'] : $txt['set_lock'], '"></span></a>'; |
|
317 | + if ($topic['quick_mod']['lock']) { |
|
318 | + echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons lock" title="', $topic['is_locked'] ? $txt['set_unlock'] : $txt['set_lock'], '"></span></a>'; |
|
319 | + } |
|
299 | 320 | |
300 | - if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
|
301 | - echo '<br>'; |
|
321 | + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) { |
|
322 | + echo '<br>'; |
|
323 | + } |
|
302 | 324 | |
303 | - if ($topic['quick_mod']['sticky']) |
|
304 | - echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons sticky" title="', $topic['is_sticky'] ? $txt['set_nonsticky'] : $txt['set_sticky'], '"></span></a>'; |
|
325 | + if ($topic['quick_mod']['sticky']) { |
|
326 | + echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons sticky" title="', $topic['is_sticky'] ? $txt['set_nonsticky'] : $txt['set_sticky'], '"></span></a>'; |
|
327 | + } |
|
305 | 328 | |
306 | - if ($topic['quick_mod']['move']) |
|
307 | - echo '<a href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>'; |
|
329 | + if ($topic['quick_mod']['move']) { |
|
330 | + echo '<a href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>'; |
|
331 | + } |
|
308 | 332 | } |
309 | 333 | echo ' |
310 | 334 | </div><!-- .moderation -->'; |
@@ -322,18 +346,20 @@ discard block |
||
322 | 346 | <select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '> |
323 | 347 | <option value="">--------</option>'; |
324 | 348 | |
325 | - foreach ($context['qmod_actions'] as $qmod_action) |
|
326 | - if ($context['can_' . $qmod_action]) |
|
349 | + foreach ($context['qmod_actions'] as $qmod_action) { |
|
350 | + if ($context['can_' . $qmod_action]) |
|
327 | 351 | echo ' |
328 | 352 | <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
353 | + } |
|
329 | 354 | |
330 | 355 | echo ' |
331 | 356 | </select>'; |
332 | 357 | |
333 | 358 | // Show a list of boards they can move the topic to. |
334 | - if ($context['can_move']) |
|
335 | - echo ' |
|
359 | + if ($context['can_move']) { |
|
360 | + echo ' |
|
336 | 361 | <span id="quick_mod_jump_to"></span>'; |
362 | + } |
|
337 | 363 | |
338 | 364 | echo ' |
339 | 365 | <input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" class="button qaction"> |
@@ -344,10 +370,11 @@ discard block |
||
344 | 370 | </div><!-- #messageindex -->'; |
345 | 371 | |
346 | 372 | // Finish off the form - again. |
347 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
|
348 | - echo ' |
|
373 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) { |
|
374 | + echo ' |
|
349 | 375 | <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"> |
350 | 376 | </form>'; |
377 | + } |
|
351 | 378 | |
352 | 379 | // Mobile action buttons (bottom) |
353 | 380 | echo ' |
@@ -369,8 +396,8 @@ discard block |
||
369 | 396 | // Show breadcrumbs at the bottom too. |
370 | 397 | theme_linktree(); |
371 | 398 | |
372 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) |
|
373 | - echo ' |
|
399 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) { |
|
400 | + echo ' |
|
374 | 401 | <script> |
375 | 402 | if (typeof(window.XMLHttpRequest) != "undefined") |
376 | 403 | aJumpTo[aJumpTo.length] = new JumpTo({ |
@@ -389,6 +416,7 @@ discard block |
||
389 | 416 | sCustomName: "move_to" |
390 | 417 | }); |
391 | 418 | </script>'; |
419 | + } |
|
392 | 420 | |
393 | 421 | // Javascript for inline editing. |
394 | 422 | echo ' |
@@ -425,8 +453,8 @@ discard block |
||
425 | 453 | <div class="information"> |
426 | 454 | <p class="floatright" id="message_index_jump_to"></p>'; |
427 | 455 | |
428 | - if (empty($context['no_topic_listing'])) |
|
429 | - echo ' |
|
456 | + if (empty($context['no_topic_listing'])) { |
|
457 | + echo ' |
|
430 | 458 | <p class="floatleft">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? ' |
431 | 459 | <img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="" class="centericon"> ' . $txt['participation_caption'] . '<br>' : '', ' |
432 | 460 | '. ($modSettings['pollMode'] == '1' ? '<span class="generic_icons poll centericon"></span> ' . $txt['poll'] : '') . '<br> |
@@ -436,9 +464,10 @@ discard block |
||
436 | 464 | <span class="generic_icons lock centericon"></span> ' . $txt['locked_topic'] . '<br> |
437 | 465 | <span class="generic_icons sticky centericon"></span> ' . $txt['sticky_topic'] . '<br> |
438 | 466 | </p>'; |
467 | + } |
|
439 | 468 | |
440 | - if (!empty($context['jump_to'])) |
|
441 | - echo ' |
|
469 | + if (!empty($context['jump_to'])) { |
|
470 | + echo ' |
|
442 | 471 | <script> |
443 | 472 | if (typeof(window.XMLHttpRequest) != "undefined") |
444 | 473 | aJumpTo[aJumpTo.length] = new JumpTo({ |
@@ -454,6 +483,7 @@ discard block |
||
454 | 483 | sGoButtonLabel: "', $txt['quick_mod_go'], '" |
455 | 484 | }); |
456 | 485 | </script>'; |
486 | + } |
|
457 | 487 | |
458 | 488 | echo ' |
459 | 489 | <br class="clear"> |
@@ -20,13 +20,12 @@ discard block |
||
20 | 20 | // We completed some tasks? |
21 | 21 | if (!empty($context['tasks_were_run'])) |
22 | 22 | { |
23 | - if (empty($context['scheduled_errors'])) |
|
24 | - echo ' |
|
23 | + if (empty($context['scheduled_errors'])) { |
|
24 | + echo ' |
|
25 | 25 | <div class="infobox"> |
26 | 26 | ', $txt['scheduled_tasks_were_run'], ' |
27 | 27 | </div>'; |
28 | - |
|
29 | - else |
|
28 | + } else |
|
30 | 29 | { |
31 | 30 | echo ' |
32 | 31 | <div class="errorbox" id="errors"> |
@@ -35,14 +34,15 @@ discard block |
||
35 | 34 | <strong id="error_serious">', $txt['scheduled_tasks_were_run_errors'], '</strong> |
36 | 35 | </dt>'; |
37 | 36 | |
38 | - foreach ($context['scheduled_errors'] as $task => $errors) |
|
39 | - echo ' |
|
37 | + foreach ($context['scheduled_errors'] as $task => $errors) { |
|
38 | + echo ' |
|
40 | 39 | <dd class="error"> |
41 | 40 | <strong>', isset($txt['scheduled_task_' . $task]) ? $txt['scheduled_task_' . $task] : $task, '</strong> |
42 | 41 | <ul> |
43 | 42 | <li>', implode('</li><li>', $errors), '</li> |
44 | 43 | </ul> |
45 | 44 | </dd>'; |
45 | + } |
|
46 | 46 | |
47 | 47 | echo ' |
48 | 48 | </dl> |