@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check">'; |
298 | 298 | echo ' |
299 | 299 | </span> |
300 | - <span class="generic_icons filter"></span> ', $txt['mlist_search_results'],': ',$context['search_params']['search'],' |
|
300 | + <span class="generic_icons filter"></span> ', $txt['mlist_search_results'], ': ', $context['search_params']['search'], ' |
|
301 | 301 | </h3> |
302 | 302 | </div>'; |
303 | 303 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | { |
317 | 317 | |
318 | 318 | echo ' |
319 | - <div class="', $topic['css_class'] ,'"> |
|
319 | + <div class="', $topic['css_class'], '"> |
|
320 | 320 | <div class="flow_auto">'; |
321 | 321 | |
322 | 322 | foreach ($topic['matches'] as $message) |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | <div class="topic_details floatleft" style="width: 94%"> |
326 | 326 | <div class="counter">', $message['counter'], '</div> |
327 | 327 | <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.msg', $message['id'], '#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5> |
328 | - <span class="smalltext">« ',$txt['by'],' <strong>', $message['member']['link'], '</strong> ',$txt['on'],' <em>', $message['time'], '</em> »</span> |
|
328 | + <span class="smalltext">« ',$txt['by'], ' <strong>', $message['member']['link'], '</strong> ', $txt['on'], ' <em>', $message['time'], '</em> »</span> |
|
329 | 329 | </div>'; |
330 | 330 | |
331 | 331 | if (!empty($options['display_quick_mod'])) |
@@ -342,11 +342,11 @@ discard block |
||
342 | 342 | { |
343 | 343 | if ($topic['quick_mod']['remove']) |
344 | 344 | echo ' |
345 | - <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>'; |
|
345 | + <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>'; |
|
346 | 346 | |
347 | 347 | if ($topic['quick_mod']['lock']) |
348 | 348 | echo ' |
349 | - <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>'; |
|
349 | + <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>'; |
|
350 | 350 | |
351 | 351 | if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
352 | 352 | echo ' |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | |
355 | 355 | if ($topic['quick_mod']['sticky']) |
356 | 356 | echo ' |
357 | - <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>'; |
|
357 | + <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>'; |
|
358 | 358 | |
359 | 359 | if ($topic['quick_mod']['move']) |
360 | 360 | echo ' |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | foreach ($context['qmod_actions'] as $qmod_action) |
394 | 394 | if ($context['can_' . $qmod_action]) |
395 | 395 | echo ' |
396 | - <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
|
396 | + <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
|
397 | 397 | |
398 | 398 | echo ' |
399 | 399 | </select>'; |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | echo ' |
422 | 422 | <div class="cat_bar"> |
423 | 423 | <h3 class="catbg"> |
424 | - <span class="generic_icons filter"></span> ', $txt['mlist_search_results'],': ',$context['search_params']['search'],' |
|
424 | + <span class="generic_icons filter"></span> ', $txt['mlist_search_results'], ': ', $context['search_params']['search'], ' |
|
425 | 425 | </h3> |
426 | 426 | </div> |
427 | 427 | <div class="pagesection"> |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | foreach ($topic['matches'] as $message) |
438 | 438 | { |
439 | 439 | echo ' |
440 | - <div class="', $topic['css_class'] ,'"> |
|
440 | + <div class="', $topic['css_class'], '"> |
|
441 | 441 | <div class="counter">', $message['counter'], '</div> |
442 | 442 | <div class="topic_details"> |
443 | 443 | <h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.', $message['start'], ';topicseen#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5> |
@@ -25,13 +25,15 @@ 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">', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>'; |
36 | + } |
|
35 | 37 | |
36 | 38 | echo ' |
37 | 39 | <fieldset id="advanced_search"> |
@@ -43,9 +45,10 @@ discard block |
||
43 | 45 | <dd> |
44 | 46 | <input type="search" name="search" id="searchfor" ', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text">'; |
45 | 47 | |
46 | - if (empty($modSettings['search_simple_fulltext'])) |
|
47 | - echo ' |
|
48 | + if (empty($modSettings['search_simple_fulltext'])) { |
|
49 | + echo ' |
|
48 | 50 | <em class="smalltext">', $txt['search_example'], '</em>'; |
51 | + } |
|
49 | 52 | |
50 | 53 | echo ' |
51 | 54 | </dd> |
@@ -112,11 +115,12 @@ discard block |
||
112 | 115 | } |
113 | 116 | |
114 | 117 | // If $context['search_params']['topic'] is set, that means we're searching just one topic. |
115 | - if (!empty($context['search_params']['topic'])) |
|
116 | - echo ' |
|
118 | + if (!empty($context['search_params']['topic'])) { |
|
119 | + echo ' |
|
117 | 120 | <p>', $txt['search_specific_topic'], ' "', $context['search_topic']['link'], '".</p> |
118 | 121 | <input type="hidden" name="topic" value="', $context['search_topic']['id'], '"> |
119 | 122 | <input type="submit" name="b_search" value="', $txt['search'], '" class="button_submit">'; |
123 | + } |
|
120 | 124 | |
121 | 125 | echo ' |
122 | 126 | </div> |
@@ -147,14 +151,15 @@ discard block |
||
147 | 151 | |
148 | 152 | foreach ($category['boards'] as $board) |
149 | 153 | { |
150 | - if ($i == $limit) |
|
151 | - echo ' |
|
154 | + if ($i == $limit) { |
|
155 | + echo ' |
|
152 | 156 | </ul> |
153 | 157 | </li> |
154 | 158 | </ul> |
155 | 159 | <ul class="ignoreboards floatright"> |
156 | 160 | <li class="category"> |
157 | 161 | <ul>'; |
162 | + } |
|
158 | 163 | |
159 | 164 | echo ' |
160 | 165 | <li class="board"> |
@@ -242,13 +247,15 @@ discard block |
||
242 | 247 | <div class="roundframe">'; |
243 | 248 | |
244 | 249 | // Did they make any typos or mistakes, perhaps? |
245 | - if (isset($context['did_you_mean'])) |
|
246 | - echo ' |
|
250 | + if (isset($context['did_you_mean'])) { |
|
251 | + echo ' |
|
247 | 252 | <p>', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search2;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>.</p>'; |
253 | + } |
|
248 | 254 | |
249 | - if (!empty($context['search_ignored'])) |
|
250 | - echo ' |
|
255 | + if (!empty($context['search_ignored'])) { |
|
256 | + echo ' |
|
251 | 257 | <p>', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>'; |
258 | + } |
|
252 | 259 | |
253 | 260 | echo ' |
254 | 261 | <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '"> |
@@ -270,10 +277,11 @@ discard block |
||
270 | 277 | <input type="hidden" name="maxage" value="', !empty($context['search_params']['maxage']) ? $context['search_params']['maxage'] : '9999', '"> |
271 | 278 | <input type="hidden" name="sort" value="', !empty($context['search_params']['sort']) ? $context['search_params']['sort'] : 'relevance', '"> |
272 | 279 | </div>'; |
273 | - if (!empty($context['search_params']['brd'])) |
|
274 | - foreach ($context['search_params']['brd'] as $board_id) |
|
280 | + if (!empty($context['search_params']['brd'])) { |
|
281 | + foreach ($context['search_params']['brd'] as $board_id) |
|
275 | 282 | echo ' |
276 | 283 | <input type="hidden" name="brd[', $board_id, ']" value="', $board_id, '">'; |
284 | + } |
|
277 | 285 | |
278 | 286 | echo ' |
279 | 287 | </form> |
@@ -284,17 +292,19 @@ discard block |
||
284 | 292 | if ($context['compact']) |
285 | 293 | { |
286 | 294 | // Quick moderation set to checkboxes? Oh, how fun :/. |
287 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
288 | - echo ' |
|
295 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
296 | + echo ' |
|
289 | 297 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="topicForm">'; |
298 | + } |
|
290 | 299 | |
291 | 300 | echo ' |
292 | 301 | <div class="cat_bar"> |
293 | 302 | <h3 class="catbg"> |
294 | 303 | <span class="floatright">'; |
295 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
296 | - echo ' |
|
304 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
305 | + echo ' |
|
297 | 306 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check">'; |
307 | + } |
|
298 | 308 | echo ' |
299 | 309 | </span> |
300 | 310 | <span class="generic_icons filter"></span> ', $txt['mlist_search_results'],': ',$context['search_params']['search'],' |
@@ -302,14 +312,15 @@ discard block |
||
302 | 312 | </div>'; |
303 | 313 | |
304 | 314 | // was anything even found? |
305 | - if (!empty($context['topics'])) |
|
306 | - echo' |
|
315 | + if (!empty($context['topics'])) { |
|
316 | + echo' |
|
307 | 317 | <div class="pagesection"> |
308 | 318 | <span>', $context['page_index'], '</span> |
309 | 319 | </div>'; |
310 | - else |
|
311 | - echo ' |
|
320 | + } else { |
|
321 | + echo ' |
|
312 | 322 | <div class="roundframe">', $txt['find_no_results'], '</div>'; |
323 | + } |
|
313 | 324 | |
314 | 325 | // while we have results to show ... |
315 | 326 | while ($topic = $context['get_topics']()) |
@@ -337,38 +348,43 @@ discard block |
||
337 | 348 | { |
338 | 349 | echo ' |
339 | 350 | <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">'; |
340 | - } |
|
341 | - else |
|
351 | + } else |
|
342 | 352 | { |
343 | - if ($topic['quick_mod']['remove']) |
|
344 | - echo ' |
|
353 | + if ($topic['quick_mod']['remove']) { |
|
354 | + echo ' |
|
345 | 355 | <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>'; |
356 | + } |
|
346 | 357 | |
347 | - if ($topic['quick_mod']['lock']) |
|
348 | - echo ' |
|
358 | + if ($topic['quick_mod']['lock']) { |
|
359 | + echo ' |
|
349 | 360 | <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>'; |
361 | + } |
|
350 | 362 | |
351 | - if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
|
352 | - echo ' |
|
363 | + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) { |
|
364 | + echo ' |
|
353 | 365 | <br>'; |
366 | + } |
|
354 | 367 | |
355 | - if ($topic['quick_mod']['sticky']) |
|
356 | - echo ' |
|
368 | + if ($topic['quick_mod']['sticky']) { |
|
369 | + echo ' |
|
357 | 370 | <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>'; |
371 | + } |
|
358 | 372 | |
359 | - if ($topic['quick_mod']['move']) |
|
360 | - echo ' |
|
373 | + if ($topic['quick_mod']['move']) { |
|
374 | + echo ' |
|
361 | 375 | <a href="', $scripturl, '?action=movetopic;topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>'; |
376 | + } |
|
362 | 377 | } |
363 | 378 | |
364 | 379 | echo ' |
365 | 380 | </div>'; |
366 | 381 | } |
367 | 382 | |
368 | - if ($message['body_highlighted'] != '') |
|
369 | - echo ' |
|
383 | + if ($message['body_highlighted'] != '') { |
|
384 | + echo ' |
|
370 | 385 | <br class="clear"> |
371 | 386 | <div class="list_posts double_height">', $message['body_highlighted'], '</div>'; |
387 | + } |
|
372 | 388 | } |
373 | 389 | |
374 | 390 | echo ' |
@@ -376,11 +392,12 @@ discard block |
||
376 | 392 | </div>'; |
377 | 393 | |
378 | 394 | } |
379 | - if (!empty($context['topics'])) |
|
380 | - echo ' |
|
395 | + if (!empty($context['topics'])) { |
|
396 | + echo ' |
|
381 | 397 | <div class="pagesection"> |
382 | 398 | <span>', $context['page_index'], '</span> |
383 | 399 | </div>'; |
400 | + } |
|
384 | 401 | |
385 | 402 | if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) |
386 | 403 | { |
@@ -390,17 +407,19 @@ discard block |
||
390 | 407 | <select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '> |
391 | 408 | <option value="">--------</option>'; |
392 | 409 | |
393 | - foreach ($context['qmod_actions'] as $qmod_action) |
|
394 | - if ($context['can_' . $qmod_action]) |
|
410 | + foreach ($context['qmod_actions'] as $qmod_action) { |
|
411 | + if ($context['can_' . $qmod_action]) |
|
395 | 412 | echo ' |
396 | 413 | <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
414 | + } |
|
397 | 415 | |
398 | 416 | echo ' |
399 | 417 | </select>'; |
400 | 418 | |
401 | - if ($context['can_move']) |
|
402 | - echo ' |
|
419 | + if ($context['can_move']) { |
|
420 | + echo ' |
|
403 | 421 | <span id="quick_mod_jump_to"> </span>'; |
422 | + } |
|
404 | 423 | |
405 | 424 | echo ' |
406 | 425 | <input type="hidden" name="redirect_url" value="', $scripturl . '?action=search2;params=' . $context['params'], '"> |
@@ -410,13 +429,13 @@ discard block |
||
410 | 429 | } |
411 | 430 | |
412 | 431 | |
413 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) |
|
414 | - echo ' |
|
432 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) { |
|
433 | + echo ' |
|
415 | 434 | <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"> |
416 | 435 | </form>'; |
436 | + } |
|
417 | 437 | |
418 | - } |
|
419 | - else |
|
438 | + } else |
|
420 | 439 | { |
421 | 440 | echo ' |
422 | 441 | <div class="cat_bar"> |
@@ -428,9 +447,10 @@ discard block |
||
428 | 447 | <span>', $context['page_index'], '</span> |
429 | 448 | </div>'; |
430 | 449 | |
431 | - if (empty($context['topics'])) |
|
432 | - echo ' |
|
450 | + if (empty($context['topics'])) { |
|
451 | + echo ' |
|
433 | 452 | <div class="information">(', $txt['search_no_results'], ')</div>'; |
453 | + } |
|
434 | 454 | |
435 | 455 | while ($topic = $context['get_topics']()) |
436 | 456 | { |
@@ -445,23 +465,27 @@ discard block |
||
445 | 465 | </div> |
446 | 466 | <div class="list_posts">', $message['body_highlighted'], '</div>'; |
447 | 467 | |
448 | - if ($topic['can_reply']) |
|
449 | - echo ' |
|
468 | + if ($topic['can_reply']) { |
|
469 | + echo ' |
|
450 | 470 | <ul class="quickbuttons">'; |
471 | + } |
|
451 | 472 | |
452 | 473 | // If they *can* reply? |
453 | - if ($topic['can_reply']) |
|
454 | - echo ' |
|
474 | + if ($topic['can_reply']) { |
|
475 | + echo ' |
|
455 | 476 | <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>'; |
477 | + } |
|
456 | 478 | |
457 | 479 | // If they *can* quote? |
458 | - if ($topic['can_quote']) |
|
459 | - echo ' |
|
480 | + if ($topic['can_quote']) { |
|
481 | + echo ' |
|
460 | 482 | <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>'; |
483 | + } |
|
461 | 484 | |
462 | - if ($topic['can_reply']) |
|
463 | - echo ' |
|
485 | + if ($topic['can_reply']) { |
|
486 | + echo ' |
|
464 | 487 | </ul>'; |
488 | + } |
|
465 | 489 | echo ' |
466 | 490 | <br class="clear"> |
467 | 491 | </div>'; |
@@ -480,8 +504,8 @@ discard block |
||
480 | 504 | <div class="smalltext righttext" id="search_jump_to"> </div> |
481 | 505 | <script>'; |
482 | 506 | |
483 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) |
|
484 | - echo ' |
|
507 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) { |
|
508 | + echo ' |
|
485 | 509 | if (typeof(window.XMLHttpRequest) != "undefined") |
486 | 510 | aJumpTo[aJumpTo.length] = new JumpTo({ |
487 | 511 | sContainerId: "quick_mod_jump_to", |
@@ -496,6 +520,7 @@ discard block |
||
496 | 520 | bDisabled: true, |
497 | 521 | sCustomName: "move_to" |
498 | 522 | });'; |
523 | + } |
|
499 | 524 | |
500 | 525 | echo ' |
501 | 526 | if (typeof(window.XMLHttpRequest) != "undefined") |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | <div class="info"> |
45 | 45 | <a class="subject mobile_subject" href="', $board['href'], '" id="b', $board['id'], '"> |
46 | 46 | ', $board['name'], ' |
47 | - <p class="board_description mobile_display">', $board['description'] , '</p> |
|
47 | + <p class="board_description mobile_display">', $board['description'], '</p> |
|
48 | 48 | </a>'; |
49 | 49 | |
50 | 50 | // Has it outstanding posts for approval? |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | <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>'; |
54 | 54 | |
55 | 55 | echo ' |
56 | - <p class="board_description">', $board['description'] , '</p>'; |
|
56 | + <p class="board_description">', $board['description'], '</p>'; |
|
57 | 57 | |
58 | 58 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
59 | 59 | if (!empty($board['moderators']) || !empty($board['moderator_groups'])) |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | // Mobile action buttons (top) |
120 | 120 | echo ' |
121 | 121 | <div class="mobile_buttons floatright"> |
122 | - <a class="button mobile_act">', $txt['mobile_action'],'</a> |
|
122 | + <a class="button mobile_act">', $txt['mobile_action'], '</a> |
|
123 | 123 | </div>'; |
124 | 124 | |
125 | 125 | echo ' |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | <img src="', $topic['first_post']['icon_url'], '" alt=""> |
220 | 220 | ', $topic['is_posted_in'] ? '<img class="posted" src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="">' : '', ' |
221 | 221 | </div> |
222 | - <div class="info', !empty($context['can_quick_mod']) ? '' : ' info_block','"> |
|
222 | + <div class="info', !empty($context['can_quick_mod']) ? '' : ' info_block', '"> |
|
223 | 223 | <div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" ondblclick="oQuickModifyTopic.modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : ''), '>'; |
224 | 224 | |
225 | 225 | // Now we handle the icons |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | </span> |
252 | 252 | </div> |
253 | 253 | <p class="floatleft">', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '</p> |
254 | - ', !empty($topic['pages']) ? '<span id="pages'. $topic['first_post']['id']. '" class="topic_pages"> '. $topic['pages']. '</span>' : '',' |
|
254 | + ', !empty($topic['pages']) ? '<span id="pages' . $topic['first_post']['id'] . '" class="topic_pages"> ' . $topic['pages'] . '</span>' : '', ' |
|
255 | 255 | <br class="clear"> |
256 | 256 | </div> |
257 | 257 | </div> |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | foreach ($context['qmod_actions'] as $qmod_action) |
306 | 306 | if ($context['can_' . $qmod_action]) |
307 | 307 | echo ' |
308 | - <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
|
308 | + <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
|
309 | 309 | |
310 | 310 | echo ' |
311 | 311 | </select>'; |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | // Mobile action buttons (bottom) |
333 | 333 | echo ' |
334 | 334 | <div class="mobile_buttons floatright"> |
335 | - <a class="button mobile_act">', $txt['mobile_action'],'</a> |
|
335 | + <a class="button mobile_act">', $txt['mobile_action'], '</a> |
|
336 | 336 | </div>'; |
337 | 337 | |
338 | 338 | echo ' |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | echo ' |
383 | 383 | <div id="mobile_action" class="popup_container"> |
384 | 384 | <div class="popup_window description"> |
385 | - <div class="popup_heading">', $txt['mobile_action'],' |
|
385 | + <div class="popup_heading">', $txt['mobile_action'], ' |
|
386 | 386 | <a href="javascript:void(0);" class="generic_icons hide_popup"></a></div> |
387 | 387 | ', template_button_strip($context['normal_buttons']), ' |
388 | 388 | </div> |
@@ -48,17 +48,19 @@ discard block |
||
48 | 48 | </a>'; |
49 | 49 | |
50 | 50 | // Has it outstanding posts for approval? |
51 | - if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) |
|
52 | - echo ' |
|
51 | + if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) { |
|
52 | + echo ' |
|
53 | 53 | <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>'; |
54 | + } |
|
54 | 55 | |
55 | 56 | echo ' |
56 | 57 | <p class="board_description">', $board['description'] , '</p>'; |
57 | 58 | |
58 | 59 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
59 | - if (!empty($board['moderators']) || !empty($board['moderator_groups'])) |
|
60 | - echo ' |
|
60 | + if (!empty($board['moderators']) || !empty($board['moderator_groups'])) { |
|
61 | + echo ' |
|
61 | 62 | <p class="moderators">', count($board['link_moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>'; |
63 | + } |
|
62 | 64 | |
63 | 65 | // Show some basic information about the number of posts, etc. |
64 | 66 | echo ' |
@@ -70,9 +72,10 @@ discard block |
||
70 | 72 | </div> |
71 | 73 | <div class="lastpost lpr_border">'; |
72 | 74 | |
73 | - if (!empty($board['last_post']['id'])) |
|
74 | - echo ' |
|
75 | + if (!empty($board['last_post']['id'])) { |
|
76 | + echo ' |
|
75 | 77 | <p>', $board['last_post']['last_post_message'], '</p>'; |
78 | + } |
|
76 | 79 | echo ' |
77 | 80 | </div>'; |
78 | 81 | |
@@ -85,14 +88,16 @@ discard block |
||
85 | 88 | id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ |
86 | 89 | foreach ($board['children'] as $child) |
87 | 90 | { |
88 | - if (!$child['is_redirect']) |
|
89 | - $child['link'] = '<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'] . ($child['new'] ? '</a> <a ' . ($child['new'] ? 'class="new_posts" ' : '') . '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>'; |
|
90 | - else |
|
91 | - $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>'; |
|
91 | + if (!$child['is_redirect']) { |
|
92 | + $child['link'] = '<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'] . ($child['new'] ? '</a> <a ' . ($child['new'] ? 'class="new_posts" ' : '') . '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>'; |
|
93 | + } else { |
|
94 | + $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>'; |
|
95 | + } |
|
92 | 96 | |
93 | 97 | // Has it posts awaiting approval? |
94 | - if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics'])) |
|
95 | - $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 | + } |
|
96 | 101 | |
97 | 102 | $children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link']; |
98 | 103 | } |
@@ -111,8 +116,9 @@ discard block |
||
111 | 116 | } |
112 | 117 | |
113 | 118 | // 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']); |
|
119 | + if (!$context['user']['is_logged']) { |
|
120 | + unset($context['normal_buttons']['markread']); |
|
121 | + } |
|
116 | 122 | |
117 | 123 | if (!$context['no_topic_listing']) |
118 | 124 | { |
@@ -135,13 +141,15 @@ discard block |
||
135 | 141 | <div id="description_board" class="generic_list_wrapper"> |
136 | 142 | <h3>', $context['name'], '</h3> |
137 | 143 | <p>'; |
138 | - if ($context['description'] != '') |
|
139 | - echo ' |
|
144 | + if ($context['description'] != '') { |
|
145 | + echo ' |
|
140 | 146 | ', $context['description'], ' '; |
147 | + } |
|
141 | 148 | |
142 | - if (!empty($context['moderators'])) |
|
143 | - echo ' |
|
149 | + if (!empty($context['moderators'])) { |
|
150 | + echo ' |
|
144 | 151 | ', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.'; |
152 | + } |
|
145 | 153 | |
146 | 154 | echo ' |
147 | 155 | </p> |
@@ -149,9 +157,10 @@ discard block |
||
149 | 157 | } |
150 | 158 | |
151 | 159 | // If Quick Moderation is enabled start the form. |
152 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
|
153 | - echo ' |
|
160 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) { |
|
161 | + echo ' |
|
154 | 162 | <form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" class="clear" name="quickModForm" id="quickModForm">'; |
163 | + } |
|
155 | 164 | |
156 | 165 | echo ' |
157 | 166 | <div id="messageindex">'; |
@@ -159,10 +168,11 @@ discard block |
||
159 | 168 | { |
160 | 169 | echo ' |
161 | 170 | <div class="information">'; |
162 | - if ($settings['display_who_viewing'] == 1) |
|
163 | - echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
164 | - else |
|
165 | - 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'] . ')'); |
|
171 | + if ($settings['display_who_viewing'] == 1) { |
|
172 | + echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
173 | + } else { |
|
174 | + 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'] . ')'); |
|
175 | + } |
|
166 | 176 | echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board']; |
167 | 177 | |
168 | 178 | echo ' |
@@ -181,19 +191,22 @@ discard block |
||
181 | 191 | <div class="lastpost">', $context['topics_headers']['last_post'], '</div>'; |
182 | 192 | |
183 | 193 | // Show a "select all" box for quick moderation? |
184 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) |
|
185 | - echo ' |
|
194 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
195 | + echo ' |
|
186 | 196 | <div class="moderation"><input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check"></div>'; |
197 | + } |
|
187 | 198 | |
188 | 199 | // If it's on in "image" mode, don't show anything but the column. |
189 | - elseif (!empty($context['can_quick_mod'])) |
|
190 | - echo ' |
|
200 | + elseif (!empty($context['can_quick_mod'])) { |
|
201 | + echo ' |
|
191 | 202 | <div class="moderation"> </div>'; |
203 | + } |
|
192 | 204 | } |
193 | 205 | // No topics.... just say, "sorry bub". |
194 | - else |
|
195 | - echo ' |
|
206 | + else { |
|
207 | + echo ' |
|
196 | 208 | <h3 class="titlebg">', $txt['topic_alert_none'], '</h3>'; |
209 | + } |
|
197 | 210 | |
198 | 211 | echo ' |
199 | 212 | </div>'; |
@@ -225,21 +238,26 @@ discard block |
||
225 | 238 | // Now we handle the icons |
226 | 239 | echo ' |
227 | 240 | <div class="icons floatright">'; |
228 | - if ($topic['is_watched']) |
|
229 | - echo ' |
|
241 | + if ($topic['is_watched']) { |
|
242 | + echo ' |
|
230 | 243 | <span class="generic_icons watch" title="', $txt['watching_this_topic'], '"></span>'; |
231 | - if ($topic['is_locked']) |
|
232 | - echo ' |
|
244 | + } |
|
245 | + if ($topic['is_locked']) { |
|
246 | + echo ' |
|
233 | 247 | <span class="generic_icons lock"></span>'; |
234 | - if ($topic['is_sticky']) |
|
235 | - echo ' |
|
248 | + } |
|
249 | + if ($topic['is_sticky']) { |
|
250 | + echo ' |
|
236 | 251 | <span class="generic_icons sticky"></span>'; |
237 | - if ($topic['is_redirect']) |
|
238 | - echo ' |
|
252 | + } |
|
253 | + if ($topic['is_redirect']) { |
|
254 | + echo ' |
|
239 | 255 | <span class="generic_icons move"></span>'; |
240 | - if ($topic['is_poll']) |
|
241 | - echo ' |
|
256 | + } |
|
257 | + if ($topic['is_poll']) { |
|
258 | + echo ' |
|
242 | 259 | <span class="generic_icons poll"></span>'; |
260 | + } |
|
243 | 261 | echo ' |
244 | 262 | </div>'; |
245 | 263 | |
@@ -265,26 +283,31 @@ discard block |
||
265 | 283 | { |
266 | 284 | echo ' |
267 | 285 | <div class="moderation">'; |
268 | - if ($options['display_quick_mod'] == 1) |
|
269 | - echo ' |
|
286 | + if ($options['display_quick_mod'] == 1) { |
|
287 | + echo ' |
|
270 | 288 | <input type="checkbox" name="topics[]" value="', $topic['id'], '" class="input_check">'; |
271 | - else |
|
289 | + } else |
|
272 | 290 | { |
273 | 291 | // Check permissions on each and show only the ones they are allowed to use. |
274 | - if ($topic['quick_mod']['remove']) |
|
275 | - 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>'; |
|
292 | + if ($topic['quick_mod']['remove']) { |
|
293 | + 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>'; |
|
294 | + } |
|
276 | 295 | |
277 | - if ($topic['quick_mod']['lock']) |
|
278 | - 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>'; |
|
296 | + if ($topic['quick_mod']['lock']) { |
|
297 | + 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>'; |
|
298 | + } |
|
279 | 299 | |
280 | - if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
|
281 | - echo '<br>'; |
|
300 | + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) { |
|
301 | + echo '<br>'; |
|
302 | + } |
|
282 | 303 | |
283 | - if ($topic['quick_mod']['sticky']) |
|
284 | - 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>'; |
|
304 | + if ($topic['quick_mod']['sticky']) { |
|
305 | + 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>'; |
|
306 | + } |
|
285 | 307 | |
286 | - if ($topic['quick_mod']['move']) |
|
287 | - 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>'; |
|
308 | + if ($topic['quick_mod']['move']) { |
|
309 | + 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>'; |
|
310 | + } |
|
288 | 311 | } |
289 | 312 | echo ' |
290 | 313 | </div>'; |
@@ -302,18 +325,20 @@ discard block |
||
302 | 325 | <select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '> |
303 | 326 | <option value="">--------</option>'; |
304 | 327 | |
305 | - foreach ($context['qmod_actions'] as $qmod_action) |
|
306 | - if ($context['can_' . $qmod_action]) |
|
328 | + foreach ($context['qmod_actions'] as $qmod_action) { |
|
329 | + if ($context['can_' . $qmod_action]) |
|
307 | 330 | echo ' |
308 | 331 | <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
332 | + } |
|
309 | 333 | |
310 | 334 | echo ' |
311 | 335 | </select>'; |
312 | 336 | |
313 | 337 | // Show a list of boards they can move the topic to. |
314 | - if ($context['can_move']) |
|
315 | - echo ' |
|
338 | + if ($context['can_move']) { |
|
339 | + echo ' |
|
316 | 340 | <span id="quick_mod_jump_to"> </span>'; |
341 | + } |
|
317 | 342 | |
318 | 343 | echo ' |
319 | 344 | <input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" class="button_submit qaction"> |
@@ -324,10 +349,11 @@ discard block |
||
324 | 349 | </div>'; |
325 | 350 | |
326 | 351 | // Finish off the form - again. |
327 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
|
328 | - echo ' |
|
352 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) { |
|
353 | + echo ' |
|
329 | 354 | <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"> |
330 | 355 | </form>'; |
356 | + } |
|
331 | 357 | |
332 | 358 | // Mobile action buttons (bottom) |
333 | 359 | echo ' |
@@ -346,8 +372,8 @@ discard block |
||
346 | 372 | // Show breadcrumbs at the bottom too. |
347 | 373 | theme_linktree(); |
348 | 374 | |
349 | - if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) |
|
350 | - echo ' |
|
375 | + if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) { |
|
376 | + echo ' |
|
351 | 377 | <script> |
352 | 378 | if (typeof(window.XMLHttpRequest) != "undefined") |
353 | 379 | aJumpTo[aJumpTo.length] = new JumpTo({ |
@@ -366,6 +392,7 @@ discard block |
||
366 | 392 | sCustomName: "move_to" |
367 | 393 | }); |
368 | 394 | </script>'; |
395 | + } |
|
369 | 396 | |
370 | 397 | // Javascript for inline editing. |
371 | 398 | echo ' |
@@ -401,8 +428,8 @@ discard block |
||
401 | 428 | <div class="information"> |
402 | 429 | <p class="floatright" id="message_index_jump_to"> </p>'; |
403 | 430 | |
404 | - if (empty($context['no_topic_listing'])) |
|
405 | - echo ' |
|
431 | + if (empty($context['no_topic_listing'])) { |
|
432 | + echo ' |
|
406 | 433 | <p class="floatleft">', !empty($modSettings['enableParticipation']) && $context['user']['is_logged'] ? ' |
407 | 434 | <img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="" class="centericon"> ' . $txt['participation_caption'] . '<br>' : '', ' |
408 | 435 | '. ($modSettings['pollMode'] == '1' ? '<span class="generic_icons poll centericon"></span> ' . $txt['poll'] : '') . '<br> |
@@ -412,9 +439,10 @@ discard block |
||
412 | 439 | <span class="generic_icons lock centericon"></span> ' . $txt['locked_topic'] . '<br> |
413 | 440 | <span class="generic_icons sticky centericon"></span> ' . $txt['sticky_topic'] . '<br> |
414 | 441 | </p>'; |
442 | + } |
|
415 | 443 | |
416 | - if (!empty($context['jump_to'])) |
|
417 | - echo ' |
|
444 | + if (!empty($context['jump_to'])) { |
|
445 | + echo ' |
|
418 | 446 | <script> |
419 | 447 | if (typeof(window.XMLHttpRequest) != "undefined") |
420 | 448 | aJumpTo[aJumpTo.length] = new JumpTo({ |
@@ -430,6 +458,7 @@ discard block |
||
430 | 458 | sGoButtonLabel: "', $txt['quick_mod_go'], '" |
431 | 459 | }); |
432 | 460 | </script>'; |
461 | + } |
|
433 | 462 | |
434 | 463 | echo ' |
435 | 464 | <br class="clear"> |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | <input type="text" name="email" value="', $context['ban_suggestions']['email'], '" size="44" onfocus="document.getElementById(\'email_check\').checked = true;" class="input_text"> |
135 | 135 | </dd> |
136 | 136 | <dt> |
137 | - <input type="checkbox" name="ban_suggestions[]" id="user_check" value="user" class="input_check"', !empty($context['ban_suggestions']['user']) || isset($context['ban']['from_user']) ? ' checked' : '', '> |
|
137 | + <input type="checkbox" name="ban_suggestions[]" id="user_check" value="user" class="input_check"', !empty($context['ban_suggestions']['user']) || isset($context['ban']['from_user']) ? ' checked' : '', '> |
|
138 | 138 | <label for="user_check">', $txt['ban_on_username'], '</label>: |
139 | 139 | </dt> |
140 | 140 | <dd> |
@@ -156,10 +156,10 @@ discard block |
||
156 | 156 | foreach ($ban_ips as $ip) |
157 | 157 | echo ' |
158 | 158 | <dt> |
159 | - <input type="checkbox" id="suggestions_', $key ,'_', $count, '" name="ban_suggestions[', $key ,'][]"', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? ' checked' : '', ' value="', $ip, '" class="input_check"> |
|
159 | + <input type="checkbox" id="suggestions_', $key, '_', $count, '" name="ban_suggestions[', $key, '][]"', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? ' checked' : '', ' value="', $ip, '" class="input_check"> |
|
160 | 160 | </dt> |
161 | 161 | <dd> |
162 | - <label for="suggestions_', $key ,'_', $count++, '">', $ip, '</label> |
|
162 | + <label for="suggestions_', $key, '_', $count++, '">', $ip, '</label> |
|
163 | 163 | </dd>'; |
164 | 164 | |
165 | 165 | echo ' |
@@ -26,9 +26,10 @@ discard block |
||
26 | 26 | </h3> |
27 | 27 | </div>'; |
28 | 28 | |
29 | - if ($context['ban']['is_new']) |
|
30 | - echo ' |
|
29 | + if ($context['ban']['is_new']) { |
|
30 | + echo ' |
|
31 | 31 | <div class="information noup">', $txt['ban_add_notes'], '</div>'; |
32 | + } |
|
32 | 33 | |
33 | 34 | // If there were errors creating the ban, show them. |
34 | 35 | if (!empty($context['error_messages'])) |
@@ -38,9 +39,10 @@ discard block |
||
38 | 39 | <strong>', $txt['ban_errors_detected'], '</strong> |
39 | 40 | <ul>'; |
40 | 41 | |
41 | - foreach ($context['error_messages'] as $error) |
|
42 | - echo ' |
|
42 | + foreach ($context['error_messages'] as $error) { |
|
43 | + echo ' |
|
43 | 44 | <li class="error">', $error, '</li>'; |
45 | + } |
|
44 | 46 | |
45 | 47 | echo ' |
46 | 48 | </ul> |
@@ -57,8 +59,8 @@ discard block |
||
57 | 59 | <input type="text" id="ban_name" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60" class="input_text"> |
58 | 60 | </dd>'; |
59 | 61 | |
60 | - if (isset($context['ban']['reason'])) |
|
61 | - echo ' |
|
62 | + if (isset($context['ban']['reason'])) { |
|
63 | + echo ' |
|
62 | 64 | <dt> |
63 | 65 | <strong><label for="reason">', $txt['ban_reason'], ':</label></strong><br> |
64 | 66 | <span class="smalltext">', $txt['ban_reason_desc'], '</span> |
@@ -66,9 +68,10 @@ discard block |
||
66 | 68 | <dd> |
67 | 69 | <textarea name="reason" id="reason" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['reason'], '</textarea> |
68 | 70 | </dd>'; |
71 | + } |
|
69 | 72 | |
70 | - if (isset($context['ban']['notes'])) |
|
71 | - echo ' |
|
73 | + if (isset($context['ban']['notes'])) { |
|
74 | + echo ' |
|
72 | 75 | <dt> |
73 | 76 | <strong><label for="ban_notes">', $txt['ban_notes'], ':</label></strong><br> |
74 | 77 | <span class="smalltext">', $txt['ban_notes_desc'], '</span> |
@@ -76,6 +79,7 @@ discard block |
||
76 | 79 | <dd> |
77 | 80 | <textarea name="notes" id="ban_notes" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['notes'], '</textarea> |
78 | 81 | </dd>'; |
82 | + } |
|
79 | 83 | |
80 | 84 | echo ' |
81 | 85 | </dl> |
@@ -115,8 +119,8 @@ discard block |
||
115 | 119 | <input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;" class="input_text"> |
116 | 120 | </dd>'; |
117 | 121 | |
118 | - if (empty($modSettings['disableHostnameLookup'])) |
|
119 | - echo ' |
|
122 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
123 | + echo ' |
|
120 | 124 | <dt> |
121 | 125 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" class="input_check"', !empty($context['ban_suggestions']['hostname']) ? ' checked' : '', '> |
122 | 126 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -124,6 +128,7 @@ discard block |
||
124 | 128 | <dd> |
125 | 129 | <input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text"> |
126 | 130 | </dd>'; |
131 | + } |
|
127 | 132 | |
128 | 133 | echo ' |
129 | 134 | <dt> |
@@ -153,14 +158,15 @@ discard block |
||
153 | 158 | <dl class="settings">'; |
154 | 159 | |
155 | 160 | $count = 0; |
156 | - foreach ($ban_ips as $ip) |
|
157 | - echo ' |
|
161 | + foreach ($ban_ips as $ip) { |
|
162 | + echo ' |
|
158 | 163 | <dt> |
159 | 164 | <input type="checkbox" id="suggestions_', $key ,'_', $count, '" name="ban_suggestions[', $key ,'][]"', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? ' checked' : '', ' value="', $ip, '" class="input_check"> |
160 | 165 | </dt> |
161 | 166 | <dd> |
162 | 167 | <label for="suggestions_', $key ,'_', $count++, '">', $ip, '</label> |
163 | 168 | </dd>'; |
169 | + } |
|
164 | 170 | |
165 | 171 | echo ' |
166 | 172 | </dl>'; |
@@ -202,8 +208,8 @@ discard block |
||
202 | 208 | addLoadEvent(fUpdateStatus);'; |
203 | 209 | |
204 | 210 | // Auto suggest only needed for adding new bans, not editing |
205 | - if ($context['ban']['is_new'] && empty($_REQUEST['u'])) |
|
206 | - echo ' |
|
211 | + if ($context['ban']['is_new'] && empty($_REQUEST['u'])) { |
|
212 | + echo ' |
|
207 | 213 | var oAddMemberSuggest = new smc_AutoSuggest({ |
208 | 214 | sSelf: \'oAddMemberSuggest\', |
209 | 215 | sSessionId: smf_session_id, |
@@ -221,6 +227,7 @@ discard block |
||
221 | 227 | return true; |
222 | 228 | } |
223 | 229 | oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\');'; |
230 | + } |
|
224 | 231 | |
225 | 232 | echo ' |
226 | 233 | function confirmBan(aForm) |
@@ -268,8 +275,8 @@ discard block |
||
268 | 275 | <input type="text" name="main_ip" value="', $context['ban_trigger']['ip']['value'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;" class="input_text"> |
269 | 276 | </dd>'; |
270 | 277 | |
271 | - if (empty($modSettings['disableHostnameLookup'])) |
|
272 | - echo ' |
|
278 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
279 | + echo ' |
|
273 | 280 | <dt> |
274 | 281 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" class="input_check"', $context['ban_trigger']['hostname']['selected'] ? ' checked' : '', '> |
275 | 282 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -277,6 +284,7 @@ discard block |
||
277 | 284 | <dd> |
278 | 285 | <input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text"> |
279 | 286 | </dd>'; |
287 | + } |
|
280 | 288 | |
281 | 289 | echo ' |
282 | 290 | <dt> |
@@ -1,9 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
6 | +} else { |
|
7 | 7 | exit; |
8 | +} |
|
8 | 9 | |
9 | 10 | ?> |
10 | 11 | \ No newline at end of file |
@@ -341,7 +341,7 @@ |
||
341 | 341 | <li>Where a file already exists on your forum the "Already Exists" column will have one of two values. "Identical" indicates that the file already exists in an identical form and need not be overwritten. "Different" means that the contents vary in some way and overwriting is probably the optimum solution.</li> |
342 | 342 | </ul>'; |
343 | 343 | |
344 | -$txt['languages_download_main_files'] = 'Primary Files';+ |
|
344 | +$txt['languages_download_main_files'] = 'Primary Files'; + |
|
345 | 345 | $txt['languages_download_filename'] = 'File Name'; |
346 | 346 | $txt['languages_download_dest'] = 'Destination'; |
347 | 347 | $txt['languages_download_writable'] = 'Writable'; |
@@ -24,11 +24,12 @@ discard block |
||
24 | 24 | <h3 class="catbg">', $txt['paid_' . $context['action_type'] . '_subscription'], '</h3> |
25 | 25 | </div>'; |
26 | 26 | |
27 | - if (!empty($context['disable_groups'])) |
|
28 | - echo ' |
|
27 | + if (!empty($context['disable_groups'])) { |
|
28 | + echo ' |
|
29 | 29 | <div class="information"> |
30 | 30 | <span class="alert">', $txt['paid_mod_edit_note'], '</span> |
31 | 31 | </div>'; |
32 | + } |
|
32 | 33 | |
33 | 34 | echo ' |
34 | 35 | <div class="windowbg2"> |
@@ -68,9 +69,10 @@ discard block |
||
68 | 69 | <option value="0"', $context['sub']['prim_group'] == 0 ? ' selected' : '', '>', $txt['paid_mod_no_group'], '</option>'; |
69 | 70 | |
70 | 71 | // Put each group into the box. |
71 | - foreach ($context['groups'] as $id => $name) |
|
72 | - echo ' |
|
72 | + foreach ($context['groups'] as $id => $name) { |
|
73 | + echo ' |
|
73 | 74 | <option value="', $id, '"', $context['sub']['prim_group'] == $id ? ' selected' : '', '>', $name, '</option>'; |
75 | + } |
|
74 | 76 | |
75 | 77 | echo ' |
76 | 78 | </select> |
@@ -81,9 +83,10 @@ discard block |
||
81 | 83 | <dd>'; |
82 | 84 | |
83 | 85 | // Put a checkbox in for each group |
84 | - foreach ($context['groups'] as $id => $name) |
|
85 | - echo ' |
|
86 | + foreach ($context['groups'] as $id => $name) { |
|
87 | + echo ' |
|
86 | 88 | <label for="addgroup_', $id, '"><input type="checkbox" id="addgroup_', $id, '" name="addgroup[', $id, ']"', in_array($id, $context['sub']['add_groups']) ? ' checked' : '', !empty($context['disable_groups']) ? ' disabled' : '', ' class="input_check"> <span class="smalltext">', $name, '</span></label><br>'; |
89 | + } |
|
87 | 90 | |
88 | 91 | echo ' |
89 | 92 | </dd> |
@@ -135,8 +138,8 @@ discard block |
||
135 | 138 | <fieldset>'; |
136 | 139 | |
137 | 140 | //!! Removed until implemented |
138 | - if (!empty($sdflsdhglsdjgs)) |
|
139 | - echo ' |
|
141 | + if (!empty($sdflsdhglsdjgs)) { |
|
142 | + echo ' |
|
140 | 143 | <dl class="settings"> |
141 | 144 | <dt> |
142 | 145 | <label for="allow_partial_check">', $txt['paid_mod_allow_partial'], '</label>:<br><span class="smalltext">', $txt['paid_mod_allow_partial_desc'], '</span> |
@@ -145,6 +148,7 @@ discard block |
||
145 | 148 | <input type="checkbox" name="allow_partial" id="allow_partial_check"', empty($context['sub']['allow_partial']) ? '' : ' checked', ' class="input_check"> |
146 | 149 | </dd> |
147 | 150 | </dl>'; |
151 | + } |
|
148 | 152 | |
149 | 153 | echo ' |
150 | 154 | <div class="information"> |
@@ -245,8 +249,8 @@ discard block |
||
245 | 249 | <dl class="settings">'; |
246 | 250 | |
247 | 251 | // Do we need a username? |
248 | - if ($context['action_type'] == 'add') |
|
249 | - echo ' |
|
252 | + if ($context['action_type'] == 'add') { |
|
253 | + echo ' |
|
250 | 254 | |
251 | 255 | <dt> |
252 | 256 | <strong>', $txt['paid_username'], ':</strong><br> |
@@ -255,6 +259,7 @@ discard block |
||
255 | 259 | <dd> |
256 | 260 | <input type="text" name="name" id="name_control" value="', $context['sub']['username'], '" size="30" class="input_text"> |
257 | 261 | </dd>'; |
262 | + } |
|
258 | 263 | |
259 | 264 | echo ' |
260 | 265 | <dt> |
@@ -272,9 +277,10 @@ discard block |
||
272 | 277 | <select name="year" id="year" onchange="generateDays();">'; |
273 | 278 | |
274 | 279 | // Show a list of all the years we allow... |
275 | - for ($year = 2005; $year <= 2030; $year++) |
|
276 | - echo ' |
|
280 | + for ($year = 2005; $year <= 2030; $year++) { |
|
281 | + echo ' |
|
277 | 282 | <option value="', $year, '"', $year == $context['sub']['start']['year'] ? ' selected' : '', '>', $year, '</option>'; |
283 | + } |
|
278 | 284 | |
279 | 285 | echo ' |
280 | 286 | </select> |
@@ -282,9 +288,10 @@ discard block |
||
282 | 288 | <select name="month" id="month" onchange="generateDays();">'; |
283 | 289 | |
284 | 290 | // There are 12 months per year - ensure that they all get listed. |
285 | - for ($month = 1; $month <= 12; $month++) |
|
286 | - echo ' |
|
291 | + for ($month = 1; $month <= 12; $month++) { |
|
292 | + echo ' |
|
287 | 293 | <option value="', $month, '"', $month == $context['sub']['start']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
294 | + } |
|
288 | 295 | |
289 | 296 | echo ' |
290 | 297 | </select> |
@@ -292,9 +299,10 @@ discard block |
||
292 | 299 | <select name="day" id="day">'; |
293 | 300 | |
294 | 301 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
295 | - for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) |
|
296 | - echo ' |
|
302 | + for ($day = 1; $day <= $context['sub']['start']['last_day']; $day++) { |
|
303 | + echo ' |
|
297 | 304 | <option value="', $day, '"', $day == $context['sub']['start']['day'] ? ' selected' : '', '>', $day, '</option>'; |
305 | + } |
|
298 | 306 | |
299 | 307 | echo ' |
300 | 308 | </select> |
@@ -306,9 +314,10 @@ discard block |
||
306 | 314 | <select name="yearend" id="yearend" onchange="generateDays(\'end\');">'; |
307 | 315 | |
308 | 316 | // Show a list of all the years we allow... |
309 | - for ($year = 2005; $year <= 2030; $year++) |
|
310 | - echo ' |
|
317 | + for ($year = 2005; $year <= 2030; $year++) { |
|
318 | + echo ' |
|
311 | 319 | <option value="', $year, '"', $year == $context['sub']['end']['year'] ? ' selected' : '', '>', $year, '</option>'; |
320 | + } |
|
312 | 321 | |
313 | 322 | echo ' |
314 | 323 | </select> |
@@ -316,9 +325,10 @@ discard block |
||
316 | 325 | <select name="monthend" id="monthend" onchange="generateDays(\'end\');">'; |
317 | 326 | |
318 | 327 | // There are 12 months per year - ensure that they all get listed. |
319 | - for ($month = 1; $month <= 12; $month++) |
|
320 | - echo ' |
|
328 | + for ($month = 1; $month <= 12; $month++) { |
|
329 | + echo ' |
|
321 | 330 | <option value="', $month, '"', $month == $context['sub']['end']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>'; |
331 | + } |
|
322 | 332 | |
323 | 333 | echo ' |
324 | 334 | </select> |
@@ -326,9 +336,10 @@ discard block |
||
326 | 336 | <select name="dayend" id="dayend">'; |
327 | 337 | |
328 | 338 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
329 | - for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) |
|
330 | - echo ' |
|
339 | + for ($day = 1; $day <= $context['sub']['end']['last_day']; $day++) { |
|
340 | + echo ' |
|
331 | 341 | <option value="', $day, '"', $day == $context['sub']['end']['day'] ? ' selected' : '', '>', $day, '</option>'; |
342 | + } |
|
332 | 343 | |
333 | 344 | echo ' |
334 | 345 | </select> |
@@ -410,8 +421,7 @@ discard block |
||
410 | 421 | <div class="information"> |
411 | 422 | ', $txt['paid_subs_none'], ' |
412 | 423 | </div>'; |
413 | - } |
|
414 | - else |
|
424 | + } else |
|
415 | 425 | { |
416 | 426 | echo ' |
417 | 427 | <div class="information"> |
@@ -423,8 +433,9 @@ discard block |
||
423 | 433 | { |
424 | 434 | |
425 | 435 | // Ignore the inactive ones... |
426 | - if (empty($subscription['active'])) |
|
427 | - continue; |
|
436 | + if (empty($subscription['active'])) { |
|
437 | + continue; |
|
438 | + } |
|
428 | 439 | |
429 | 440 | echo ' |
430 | 441 | <div class="cat_bar"> |
@@ -434,9 +445,10 @@ discard block |
||
434 | 445 | <p><strong>', $subscription['name'], '</strong></p> |
435 | 446 | <p class="smalltext">', $subscription['desc'], '</p>'; |
436 | 447 | |
437 | - if (!$subscription['flexible']) |
|
438 | - echo ' |
|
448 | + if (!$subscription['flexible']) { |
|
449 | + echo ' |
|
439 | 450 | <div><strong>', $txt['paid_duration'], ':</strong> ', $subscription['length'], '</div>'; |
451 | + } |
|
440 | 452 | |
441 | 453 | if ($context['user']['is_owner']) |
442 | 454 | { |
@@ -449,24 +461,25 @@ discard block |
||
449 | 461 | <select name="cur[', $subscription['id'], ']">'; |
450 | 462 | |
451 | 463 | // Print out the costs for this one. |
452 | - foreach ($subscription['costs'] as $duration => $value) |
|
453 | - echo ' |
|
464 | + foreach ($subscription['costs'] as $duration => $value) { |
|
465 | + echo ' |
|
454 | 466 | <option value="', $duration, '">', sprintf($modSettings['paid_currency_symbol'], $value), '/', $txt[$duration], '</option>'; |
467 | + } |
|
455 | 468 | |
456 | 469 | echo ' |
457 | 470 | </select>'; |
458 | - } |
|
459 | - else |
|
460 | - echo ' |
|
471 | + } else { |
|
472 | + echo ' |
|
461 | 473 | ', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']); |
474 | + } |
|
462 | 475 | |
463 | 476 | echo ' |
464 | 477 | <hr> |
465 | 478 | <input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button_submit">'; |
466 | - } |
|
467 | - else |
|
468 | - echo ' |
|
479 | + } else { |
|
480 | + echo ' |
|
469 | 481 | <a href="', $scripturl, '?action=admin;area=paidsubscribe;sa=modifyuser;sid=', $subscription['id'], ';uid=', $context['member']['id'], (empty($context['current'][$subscription['id']]) ? '' : ';lid=' . $context['current'][$subscription['id']]['id']), '">', empty($context['current'][$subscription['id']]) ? $txt['paid_admin_add'] : $txt['paid_edit_subscription'], '</a>'; |
482 | + } |
|
470 | 483 | |
471 | 484 | echo ' |
472 | 485 | </div>'; |
@@ -493,19 +506,20 @@ discard block |
||
493 | 506 | </thead> |
494 | 507 | <tbody>'; |
495 | 508 | |
496 | - if (empty($context['current'])) |
|
497 | - echo ' |
|
509 | + if (empty($context['current'])) { |
|
510 | + echo ' |
|
498 | 511 | <tr class="windowbg"> |
499 | 512 | <td colspan="4"> |
500 | 513 | ', $txt['paid_none_yet'], ' |
501 | 514 | </td> |
502 | 515 | </tr>'; |
516 | + } |
|
503 | 517 | |
504 | 518 | foreach ($context['current'] as $sub) |
505 | 519 | { |
506 | 520 | |
507 | - if (!$sub['hide']) |
|
508 | - echo ' |
|
521 | + if (!$sub['hide']) { |
|
522 | + echo ' |
|
509 | 523 | <tr class="windowbg"> |
510 | 524 | <td> |
511 | 525 | ', (allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $sub['id'] . '">' . $sub['name'] . '</a>' : $sub['name']), ' |
@@ -517,6 +531,7 @@ discard block |
||
517 | 531 | ', $sub['end'], ' |
518 | 532 | </td> |
519 | 533 | </tr>'; |
534 | + } |
|
520 | 535 | } |
521 | 536 | echo ' |
522 | 537 | </tbody> |
@@ -567,15 +582,17 @@ discard block |
||
567 | 582 | ', $gateway['desc'], '<br> |
568 | 583 | <form action="', $gateway['form'], '" method="post">'; |
569 | 584 | |
570 | - if (!empty($gateway['javascript'])) |
|
571 | - echo ' |
|
585 | + if (!empty($gateway['javascript'])) { |
|
586 | + echo ' |
|
572 | 587 | <script> |
573 | 588 | ', $gateway['javascript'], ' |
574 | 589 | </script>'; |
590 | + } |
|
575 | 591 | |
576 | - foreach ($gateway['hidden'] as $name => $value) |
|
577 | - echo ' |
|
592 | + foreach ($gateway['hidden'] as $name => $value) { |
|
593 | + echo ' |
|
578 | 594 | <input type="hidden" id="', $gateway['id'], '_', $name, '" name="', $name, '" value="', $value, '">'; |
595 | + } |
|
579 | 596 | |
580 | 597 | echo ' |
581 | 598 | <br><input type="submit" value="', $gateway['submit'], '" class="button_submit"> |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | <div class="login"> |
127 | 127 | <div class="cat_bar"> |
128 | 128 | <h3 class="catbg"> |
129 | - ', $txt['tfa_profile_label'] ,' |
|
129 | + ', $txt['tfa_profile_label'], ' |
|
130 | 130 | </h3> |
131 | 131 | </div> |
132 | 132 | <div class="roundframe noup">'; |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | echo ' |
313 | 313 | <strong>', $txt['password'], ':</strong> |
314 | 314 | <input type="password" name="', $context['sessionCheckType'], '_pass" size="24" class="input_password"> |
315 | - <a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a><br> |
|
315 | + <a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a><br> |
|
316 | 316 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
317 | 317 | <input type="hidden" name="', $context['admin-login_token_var'], '" value="', $context['admin-login_token'], '"> |
318 | 318 | <input type="submit" style="margin-top: 1em;" value="', $txt['login'], '" class="button_submit">'; |
@@ -28,14 +28,16 @@ discard block |
||
28 | 28 | <form class="login" action="', $context['login_url'], '" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '">'; |
29 | 29 | |
30 | 30 | // Did they make a mistake last time? |
31 | - if (!empty($context['login_errors'])) |
|
32 | - echo ' |
|
31 | + if (!empty($context['login_errors'])) { |
|
32 | + echo ' |
|
33 | 33 | <div class="errorbox">', implode('<br>', $context['login_errors']), '</div><br>'; |
34 | + } |
|
34 | 35 | |
35 | 36 | // Or perhaps there's some special description for this time? |
36 | - if (isset($context['description'])) |
|
37 | - echo ' |
|
37 | + if (isset($context['description'])) { |
|
38 | + echo ' |
|
38 | 39 | <div class="information">', $context['description'], '</div>'; |
40 | + } |
|
39 | 41 | |
40 | 42 | // Now just get the basic information - username, password, etc. |
41 | 43 | echo ' |
@@ -51,10 +53,11 @@ discard block |
||
51 | 53 | <dt>', $txt['always_logged_in'], ':</dt> |
52 | 54 | <dd><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked' : '', ' class="input_check" onclick="this.form.cookielength.disabled = this.checked;"></dd>'; |
53 | 55 | // If they have deleted their account, give them a chance to change their mind. |
54 | - if (isset($context['login_show_undelete'])) |
|
55 | - echo ' |
|
56 | + if (isset($context['login_show_undelete'])) { |
|
57 | + echo ' |
|
56 | 58 | <dt class="alert">', $txt['undelete_account'], ':</dt> |
57 | 59 | <dd><input type="checkbox" name="undelete" class="input_check"></dd>'; |
60 | + } |
|
58 | 61 | echo ' |
59 | 62 | </dl> |
60 | 63 | <p><input type="submit" value="', $txt['login'], '" class="button_submit"></p> |
@@ -66,8 +69,8 @@ discard block |
||
66 | 69 | setTimeout(function() { |
67 | 70 | document.getElementById("', !empty($context['from_ajax']) ? 'ajax_' : '', isset($context['default_username']) && $context['default_username'] != '' ? 'loginpass' : 'loginuser', '").focus(); |
68 | 71 | }, 150);'; |
69 | - if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) |
|
70 | - echo ' |
|
72 | + if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) { |
|
73 | + echo ' |
|
71 | 74 | form = $("#frmLogin"); |
72 | 75 | form.submit(function(e) { |
73 | 76 | e.preventDefault(); |
@@ -100,16 +103,18 @@ discard block |
||
100 | 103 | |
101 | 104 | return false; |
102 | 105 | });'; |
106 | + } |
|
103 | 107 | |
104 | 108 | echo ' |
105 | 109 | </script> |
106 | 110 | </form>'; |
107 | 111 | |
108 | 112 | // It is a long story as to why we have this when we're clearly not going to use it. |
109 | - if (!empty($context['from_ajax'])) |
|
110 | - echo ' |
|
113 | + if (!empty($context['from_ajax'])) { |
|
114 | + echo ' |
|
111 | 115 | <br> |
112 | 116 | <a href="javascript:self.close();"></a>'; |
117 | + } |
|
113 | 118 | echo ' |
114 | 119 | </div> |
115 | 120 | </div>'; |
@@ -130,9 +135,10 @@ discard block |
||
130 | 135 | </h3> |
131 | 136 | </div> |
132 | 137 | <div class="roundframe noup">'; |
133 | - if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) |
|
134 | - echo ' |
|
138 | + if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) { |
|
139 | + echo ' |
|
135 | 140 | <div class="error">', $txt['tfa_' . (!empty($context['tfa_error']) ? 'code_' : 'backup_') . 'invalid'], '</div>'; |
141 | + } |
|
136 | 142 | echo ' |
137 | 143 | <form action="', $context['tfa_url'], '" method="post" id="frmTfa"> |
138 | 144 | <div id="tfaCode"> |
@@ -155,8 +161,8 @@ discard block |
||
155 | 161 | </form> |
156 | 162 | <script> |
157 | 163 | form = $("#frmTfa");'; |
158 | - if (!empty($context['from_ajax'])) |
|
159 | - echo ' |
|
164 | + if (!empty($context['from_ajax'])) { |
|
165 | + echo ' |
|
160 | 166 | form.submit(function(e) { |
161 | 167 | // If we are submitting backup code, let normal workflow follow since it redirects a couple times into a different page |
162 | 168 | if (form.find("input[name=tfa_backup]:first").val().length > 0) |
@@ -175,6 +181,7 @@ discard block |
||
175 | 181 | |
176 | 182 | return false; |
177 | 183 | });'; |
184 | + } |
|
178 | 185 | echo ' |
179 | 186 | form.find("input[name=backup]").click(function(e) { |
180 | 187 | $("#tfaBackup").show(); |
@@ -206,10 +213,11 @@ discard block |
||
206 | 213 | ', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br>'; |
207 | 214 | |
208 | 215 | |
209 | - if ($context['can_register']) |
|
210 | - echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
211 | - else |
|
212 | - echo $txt['login_below']; |
|
216 | + if ($context['can_register']) { |
|
217 | + echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
218 | + } else { |
|
219 | + echo $txt['login_below']; |
|
220 | + } |
|
213 | 221 | |
214 | 222 | // And now the login information. |
215 | 223 | echo ' |
@@ -305,9 +313,10 @@ discard block |
||
305 | 313 | </div> |
306 | 314 | <div class="roundframe centertext noup">'; |
307 | 315 | |
308 | - if (!empty($context['incorrect_password'])) |
|
309 | - echo ' |
|
316 | + if (!empty($context['incorrect_password'])) { |
|
317 | + echo ' |
|
310 | 318 | <div class="error">', $txt['admin_incorrect_password'], '</div>'; |
319 | + } |
|
311 | 320 | |
312 | 321 | echo ' |
313 | 322 | <strong>', $txt['password'], ':</strong> |
@@ -347,11 +356,12 @@ discard block |
||
347 | 356 | <div class="roundframe">'; |
348 | 357 | |
349 | 358 | // You didn't even have an ID? |
350 | - if (empty($context['member_id'])) |
|
351 | - echo ' |
|
359 | + if (empty($context['member_id'])) { |
|
360 | + echo ' |
|
352 | 361 | <dl> |
353 | 362 | <dt>', $txt['invalid_activation_username'], ':</dt> |
354 | 363 | <dd><input type="text" name="user" size="30" class="input_text"></dd>'; |
364 | + } |
|
355 | 365 | |
356 | 366 | echo ' |
357 | 367 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
@@ -388,13 +398,14 @@ discard block |
||
388 | 398 | <dd><input type="password" name="passwd" size="30" class="input_password"></dd> |
389 | 399 | </dl>'; |
390 | 400 | |
391 | - if ($context['can_activate']) |
|
392 | - echo ' |
|
401 | + if ($context['can_activate']) { |
|
402 | + echo ' |
|
393 | 403 | <p>', $txt['invalid_activation_known'], '</p> |
394 | 404 | <dl> |
395 | 405 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
396 | 406 | <dd><input type="text" name="code" size="30" class="input_text"></dd> |
397 | 407 | </dl>'; |
408 | + } |
|
398 | 409 | |
399 | 410 | echo ' |
400 | 411 | <p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button_submit"></p> |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | // Show right to left, the language code, and the character set for ease of translating. |
87 | 87 | echo '<!DOCTYPE html> |
88 | - <html', $context['right_to_left'] ? ' dir="rtl"' : '', !empty($txt['lang_locale']) ? ' lang="' . str_replace("_", "-", substr($txt['lang_locale'], 0, strcspn($txt['lang_locale'], "."))) . '"' : '' , '> |
|
88 | + <html', $context['right_to_left'] ? ' dir="rtl"' : '', !empty($txt['lang_locale']) ? ' lang="' . str_replace("_", "-", substr($txt['lang_locale'], 0, strcspn($txt['lang_locale'], "."))) . '"' : '', '> |
|
89 | 89 | <head> |
90 | 90 | <meta charset="', $context['character_set'], '">'; |
91 | 91 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | // Thirdly, alerts |
211 | 211 | echo ' |
212 | 212 | <li> |
213 | - <a href="', $scripturl, '?action=profile;area=showalerts;u=', $context['user']['id'] ,'"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a> |
|
213 | + <a href="', $scripturl, '?action=profile;area=showalerts;u=', $context['user']['id'], '"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a> |
|
214 | 214 | <div id="alerts_menu" class="top_menu scrollable"></div> |
215 | 215 | </li>'; |
216 | 216 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | <a class="menu_icon mobile_user_menu"></a> |
328 | 328 | <div id="mobile_user_menu" class="popup_container"> |
329 | 329 | <div class="popup_window description"> |
330 | - <div class="popup_heading">', $txt['mobile_user_menu'],' |
|
330 | + <div class="popup_heading">', $txt['mobile_user_menu'], ' |
|
331 | 331 | <a href="javascript:void(0);" class="generic_icons hide_popup"></a></div> |
332 | 332 | ', template_menu(), ' |
333 | 333 | </div> |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | // There is now a global "Go to top" link at the right. |
375 | 375 | echo ' |
376 | 376 | <ul> |
377 | - <li class="floatright"><a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="'. $scripturl. '?action=help;sa=rules">'. $txt['terms_and_rules']. '</a>' : '', ' | <a href="#top_section">', $txt['go_up'], ' ▲</a></li> |
|
377 | + <li class="floatright"><a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=help;sa=rules">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#top_section">', $txt['go_up'], ' ▲</a></li> |
|
378 | 378 | <li class="copyright">', theme_copyright(), '</li> |
379 | 379 | </ul>'; |
380 | 380 | |
@@ -479,9 +479,9 @@ discard block |
||
479 | 479 | foreach ($context['menu_buttons'] as $act => $button) |
480 | 480 | { |
481 | 481 | echo ' |
482 | - <li class="button_', $act, '', !empty($button['sub_buttons']) ? ' subsections"' :'"', '> |
|
482 | + <li class="button_', $act, '', !empty($button['sub_buttons']) ? ' subsections"' : '"', '> |
|
483 | 483 | <a', $button['active_button'] ? ' class="active"' : '', ' href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '> |
484 | - ', $button['icon'],'<span class="textmenu">', $button['title'], '</span> |
|
484 | + ', $button['icon'], '<span class="textmenu">', $button['title'], '</span> |
|
485 | 485 | </a>'; |
486 | 486 | |
487 | 487 | if (!empty($button['sub_buttons'])) |
@@ -492,8 +492,8 @@ discard block |
||
492 | 492 | foreach ($button['sub_buttons'] as $childbutton) |
493 | 493 | { |
494 | 494 | echo ' |
495 | - <li', !empty($childbutton['sub_buttons']) ? ' class="subsections"' :'', '> |
|
496 | - <a href="', $childbutton['href'], '"' , isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '> |
|
495 | + <li', !empty($childbutton['sub_buttons']) ? ' class="subsections"' : '', '> |
|
496 | + <a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '> |
|
497 | 497 | ', $childbutton['title'], ' |
498 | 498 | </a>'; |
499 | 499 | // 3rd level menus :) |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | foreach ($childbutton['sub_buttons'] as $grandchildbutton) |
506 | 506 | echo ' |
507 | 507 | <li> |
508 | - <a href="', $grandchildbutton['href'], '"' , isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '> |
|
508 | + <a href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '> |
|
509 | 509 | ', $grandchildbutton['title'], ' |
510 | 510 | </a> |
511 | 511 | </li>'; |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | $value['id'] = $key; |
554 | 554 | |
555 | 555 | $button = ' |
556 | - <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' '. $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="'. $value['url'] .'"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>'; |
|
556 | + <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>'; |
|
557 | 557 | |
558 | 558 | if (!empty($value['sub_buttons'])) |
559 | 559 | { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | return; |
588 | 588 | |
589 | 589 | echo ' |
590 | - <div class="buttonlist', !empty($direction) ? ' float' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '> |
|
590 | + <div class="buttonlist', !empty($direction) ? ' float' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"' : ''), '> |
|
591 | 591 | ',implode('', $buttons), ' |
592 | 592 | </div>'; |
593 | 593 | } |
@@ -72,9 +72,10 @@ discard block |
||
72 | 72 | |
73 | 73 | // Allow css/js files to be disable for this specific theme. |
74 | 74 | // Add the identifier as an array key. IE array('smf_script'); Some external files might not add identifiers, on those cases SMF uses its filename as reference. |
75 | - if (!isset($settings['disable_files'])) |
|
76 | - $settings['disable_files'] = array(); |
|
77 | -} |
|
75 | + if (!isset($settings['disable_files'])) { |
|
76 | + $settings['disable_files'] = array(); |
|
77 | + } |
|
78 | + } |
|
78 | 79 | |
79 | 80 | /** |
80 | 81 | * The main sub template above the content. |
@@ -111,8 +112,9 @@ discard block |
||
111 | 112 | echo ' |
112 | 113 | <meta'; |
113 | 114 | |
114 | - foreach ($meta_tag as $meta_key => $meta_value) |
|
115 | - echo ' ', $meta_key, '="', $meta_value, '"'; |
|
115 | + foreach ($meta_tag as $meta_key => $meta_value) { |
|
116 | + echo ' ', $meta_key, '="', $meta_value, '"'; |
|
117 | + } |
|
116 | 118 | |
117 | 119 | echo '>'; |
118 | 120 | } |
@@ -123,14 +125,16 @@ discard block |
||
123 | 125 | <meta name="theme-color" content="#557EA0">'; |
124 | 126 | |
125 | 127 | // Please don't index these Mr Robot. |
126 | - if (!empty($context['robot_no_index'])) |
|
127 | - echo ' |
|
128 | + if (!empty($context['robot_no_index'])) { |
|
129 | + echo ' |
|
128 | 130 | <meta name="robots" content="noindex">'; |
131 | + } |
|
129 | 132 | |
130 | 133 | // Present a canonical url for search engines to prevent duplicate content in their indices. |
131 | - if (!empty($context['canonical_url'])) |
|
132 | - echo ' |
|
134 | + if (!empty($context['canonical_url'])) { |
|
135 | + echo ' |
|
133 | 136 | <link rel="canonical" href="', $context['canonical_url'], '">'; |
137 | + } |
|
134 | 138 | |
135 | 139 | // Show all the relative links, such as help, search, contents, and the like. |
136 | 140 | echo ' |
@@ -139,10 +143,11 @@ discard block |
||
139 | 143 | <link rel="search" href="' . $scripturl . '?action=search">' : ''); |
140 | 144 | |
141 | 145 | // If RSS feeds are enabled, advertise the presence of one. |
142 | - if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) |
|
143 | - echo ' |
|
146 | + if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) { |
|
147 | + echo ' |
|
144 | 148 | <link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['rss'], '" href="', $scripturl, '?type=rss2;action=.xml"> |
145 | 149 | <link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['atom'], '" href="', $scripturl, '?type=atom;action=.xml">'; |
150 | + } |
|
146 | 151 | |
147 | 152 | // If we're viewing a topic, these should be the previous and next topics, respectively. |
148 | 153 | if (!empty($context['links']['next'])) |
@@ -158,9 +163,10 @@ discard block |
||
158 | 163 | } |
159 | 164 | |
160 | 165 | // If we're in a board, or a topic for that matter, the index will be the board's index. |
161 | - if (!empty($context['current_board'])) |
|
162 | - echo ' |
|
166 | + if (!empty($context['current_board'])) { |
|
167 | + echo ' |
|
163 | 168 | <link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0">'; |
169 | + } |
|
164 | 170 | |
165 | 171 | // Output any remaining HTML headers. (from mods, maybe?) |
166 | 172 | echo $context['html_headers']; |
@@ -191,8 +197,9 @@ discard block |
||
191 | 197 | <ul class="floatleft" id="top_info"> |
192 | 198 | <li> |
193 | 199 | <a href="', $scripturl, '?action=profile"', !empty($context['self_profile']) ? ' class="active"' : '', ' id="profile_menu_top" onclick="return false;">'; |
194 | - if (!empty($context['user']['avatar'])) |
|
195 | - echo $context['user']['avatar']['image']; |
|
200 | + if (!empty($context['user']['avatar'])) { |
|
201 | + echo $context['user']['avatar']['image']; |
|
202 | + } |
|
196 | 203 | echo $context['user']['name'], '</a> |
197 | 204 | <div id="profile_menu" class="top_menu"></div> |
198 | 205 | </li>'; |
@@ -219,11 +226,12 @@ discard block |
||
219 | 226 | </ul>'; |
220 | 227 | } |
221 | 228 | // Otherwise they're a guest. Ask them to either register or login. |
222 | - else |
|
223 | - echo ' |
|
229 | + else { |
|
230 | + echo ' |
|
224 | 231 | <ul class="floatleft welcome"> |
225 | 232 | <li>', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $context['forum_name_html_safe'], $scripturl . '?action=login', 'return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ');', $scripturl . '?action=signup'), '</li> |
226 | 233 | </ul>'; |
234 | + } |
|
227 | 235 | |
228 | 236 | if (!empty($modSettings['userLanguage']) && !empty($context['languages']) && count($context['languages']) > 1) |
229 | 237 | { |
@@ -231,9 +239,10 @@ discard block |
||
231 | 239 | <form id="languages_form" method="get" class="floatright"> |
232 | 240 | <select id="language_select" name="language" onchange="this.form.submit()">'; |
233 | 241 | |
234 | - foreach ($context['languages'] as $language) |
|
235 | - echo ' |
|
242 | + foreach ($context['languages'] as $language) { |
|
243 | + echo ' |
|
236 | 244 | <option value="', $language['filename'], '"', isset($context['user']['language']) && $context['user']['language'] == $language['filename'] ? ' selected="selected"' : '', '>', str_replace('-utf8', '', $language['name']), '</option>'; |
245 | + } |
|
237 | 246 | |
238 | 247 | echo ' |
239 | 248 | </select> |
@@ -257,31 +266,36 @@ discard block |
||
257 | 266 | <option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>'; |
258 | 267 | |
259 | 268 | // Can't limit it to a specific topic if we are not in one |
260 | - if (!empty($context['current_topic'])) |
|
261 | - echo ' |
|
269 | + if (!empty($context['current_topic'])) { |
|
270 | + echo ' |
|
262 | 271 | <option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>'; |
272 | + } |
|
263 | 273 | |
264 | 274 | // Can't limit it to a specific board if we are not in one |
265 | - if (!empty($context['current_board'])) |
|
266 | - echo ' |
|
275 | + if (!empty($context['current_board'])) { |
|
276 | + echo ' |
|
267 | 277 | <option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisbrd'], '</option>'; |
278 | + } |
|
268 | 279 | |
269 | 280 | // Can't search for members if we can't see the memberlist |
270 | - if (!empty($context['allow_memberlist'])) |
|
271 | - echo ' |
|
281 | + if (!empty($context['allow_memberlist'])) { |
|
282 | + echo ' |
|
272 | 283 | <option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>'; |
284 | + } |
|
273 | 285 | |
274 | 286 | echo ' |
275 | 287 | </select>'; |
276 | 288 | |
277 | 289 | // Search within current topic? |
278 | - if (!empty($context['current_topic'])) |
|
279 | - echo ' |
|
290 | + if (!empty($context['current_topic'])) { |
|
291 | + echo ' |
|
280 | 292 | <input type="hidden" name="sd_topic" value="', $context['current_topic'], '">'; |
293 | + } |
|
281 | 294 | // If we're on a certain board, limit it to this board ;). |
282 | - elseif (!empty($context['current_board'])) |
|
283 | - echo ' |
|
295 | + elseif (!empty($context['current_board'])) { |
|
296 | + echo ' |
|
284 | 297 | <input type="hidden" name="sd_brd" value="', $context['current_board'], '">'; |
298 | + } |
|
285 | 299 | |
286 | 300 | echo ' |
287 | 301 | <input type="submit" name="search2" value="', $txt['search'], '" class="button_submit"> |
@@ -311,12 +325,13 @@ discard block |
||
311 | 325 | ', $context['current_time'], ' |
312 | 326 | </div>'; |
313 | 327 | // Show a random news item? (or you could pick one from news_lines...) |
314 | - if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) |
|
315 | - echo ' |
|
328 | + if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) { |
|
329 | + echo ' |
|
316 | 330 | <div class="news"> |
317 | 331 | <h2>', $txt['news'], ': </h2> |
318 | 332 | <p>', $context['random_news_line'], '</p> |
319 | 333 | </div>'; |
334 | + } |
|
320 | 335 | |
321 | 336 | echo ' |
322 | 337 | <hr class="clear"> |
@@ -379,9 +394,10 @@ discard block |
||
379 | 394 | </ul>'; |
380 | 395 | |
381 | 396 | // Show the load time? |
382 | - if ($context['show_load_time']) |
|
383 | - echo ' |
|
397 | + if ($context['show_load_time']) { |
|
398 | + echo ' |
|
384 | 399 | <p>', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</p>'; |
400 | + } |
|
385 | 401 | |
386 | 402 | echo ' |
387 | 403 | </div>'; |
@@ -411,19 +427,21 @@ discard block |
||
411 | 427 | global $context, $shown_linktree, $scripturl, $txt; |
412 | 428 | |
413 | 429 | // If linktree is empty, just return - also allow an override. |
414 | - if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) |
|
415 | - return; |
|
430 | + if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) { |
|
431 | + return; |
|
432 | + } |
|
416 | 433 | |
417 | 434 | echo ' |
418 | 435 | <div class="navigate_section"> |
419 | 436 | <ul>'; |
420 | 437 | |
421 | - if ($context['user']['is_logged']) |
|
422 | - echo ' |
|
438 | + if ($context['user']['is_logged']) { |
|
439 | + echo ' |
|
423 | 440 | <li class="unread_links"> |
424 | 441 | <a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a> |
425 | 442 | <a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a> |
426 | 443 | </li>'; |
444 | + } |
|
427 | 445 | |
428 | 446 | // Each tree item has a URL and name. Some may have extra_before and extra_after. |
429 | 447 | foreach ($context['linktree'] as $link_num => $tree) |
@@ -434,25 +452,29 @@ discard block |
||
434 | 452 | // Don't show a separator for the first one. |
435 | 453 | // Better here. Always points to the next level when the linktree breaks to a second line. |
436 | 454 | // Picked a better looking HTML entity, and added support for RTL plus a span for styling. |
437 | - if ($link_num != 0) |
|
438 | - echo ' |
|
455 | + if ($link_num != 0) { |
|
456 | + echo ' |
|
439 | 457 | <span class="dividers">', $context['right_to_left'] ? ' ◄ ' : ' ► ', '</span>'; |
458 | + } |
|
440 | 459 | |
441 | 460 | // Show something before the link? |
442 | - if (isset($tree['extra_before'])) |
|
443 | - echo $tree['extra_before'], ' '; |
|
461 | + if (isset($tree['extra_before'])) { |
|
462 | + echo $tree['extra_before'], ' '; |
|
463 | + } |
|
444 | 464 | |
445 | 465 | // Show the link, including a URL if it should have one. |
446 | - if (isset($tree['url'])) |
|
447 | - echo ' |
|
466 | + if (isset($tree['url'])) { |
|
467 | + echo ' |
|
448 | 468 | <a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>'; |
449 | - else |
|
450 | - echo ' |
|
469 | + } else { |
|
470 | + echo ' |
|
451 | 471 | <span>' . $tree['name'] . '</span>'; |
472 | + } |
|
452 | 473 | |
453 | 474 | // Show something after the link...? |
454 | - if (isset($tree['extra_after'])) |
|
455 | - echo ' ', $tree['extra_after']; |
|
475 | + if (isset($tree['extra_after'])) { |
|
476 | + echo ' ', $tree['extra_after']; |
|
477 | + } |
|
456 | 478 | |
457 | 479 | echo ' |
458 | 480 | </li>'; |
@@ -502,13 +524,14 @@ discard block |
||
502 | 524 | echo ' |
503 | 525 | <ul>'; |
504 | 526 | |
505 | - foreach ($childbutton['sub_buttons'] as $grandchildbutton) |
|
506 | - echo ' |
|
527 | + foreach ($childbutton['sub_buttons'] as $grandchildbutton) { |
|
528 | + echo ' |
|
507 | 529 | <li> |
508 | 530 | <a href="', $grandchildbutton['href'], '"' , isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '> |
509 | 531 | ', $grandchildbutton['title'], ' |
510 | 532 | </a> |
511 | 533 | </li>'; |
534 | + } |
|
512 | 535 | |
513 | 536 | echo ' |
514 | 537 | </ul>'; |
@@ -539,8 +562,9 @@ discard block |
||
539 | 562 | { |
540 | 563 | global $context, $txt; |
541 | 564 | |
542 | - if (!is_array($strip_options)) |
|
543 | - $strip_options = array(); |
|
565 | + if (!is_array($strip_options)) { |
|
566 | + $strip_options = array(); |
|
567 | + } |
|
544 | 568 | |
545 | 569 | // Create the buttons... |
546 | 570 | $buttons = array(); |
@@ -549,8 +573,9 @@ discard block |
||
549 | 573 | // As of 2.1, the 'test' for each button happens while the array is being generated. The extra 'test' check here is deprecated but kept for backward compatibility (update your mods, folks!) |
550 | 574 | if (!isset($value['test']) || !empty($context[$value['test']])) |
551 | 575 | { |
552 | - if (!isset($value['id'])) |
|
553 | - $value['id'] = $key; |
|
576 | + if (!isset($value['id'])) { |
|
577 | + $value['id'] = $key; |
|
578 | + } |
|
554 | 579 | |
555 | 580 | $button = ' |
556 | 581 | <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' '. $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="'. $value['url'] .'"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>'; |
@@ -563,13 +588,15 @@ discard block |
||
563 | 588 | <div class="overview">'; |
564 | 589 | foreach ($value['sub_buttons'] as $element) |
565 | 590 | { |
566 | - if (isset($element['test']) && empty($context[$element['test']])) |
|
567 | - continue; |
|
591 | + if (isset($element['test']) && empty($context[$element['test']])) { |
|
592 | + continue; |
|
593 | + } |
|
568 | 594 | |
569 | 595 | $button .= ' |
570 | 596 | <a href="' . $element['url'] . '"><strong>' . $txt[$element['text']] . '</strong>'; |
571 | - if (isset($txt[$element['text'] . '_desc'])) |
|
572 | - $button .= '<br /><span>' . $txt[$element['text'] . '_desc'] . '</span>'; |
|
597 | + if (isset($txt[$element['text'] . '_desc'])) { |
|
598 | + $button .= '<br /><span>' . $txt[$element['text'] . '_desc'] . '</span>'; |
|
599 | + } |
|
573 | 600 | $button .= '</a>'; |
574 | 601 | } |
575 | 602 | $button .= ' |
@@ -583,8 +610,9 @@ discard block |
||
583 | 610 | } |
584 | 611 | |
585 | 612 | // No buttons? No button strip either. |
586 | - if (empty($buttons)) |
|
587 | - return; |
|
613 | + if (empty($buttons)) { |
|
614 | + return; |
|
615 | + } |
|
588 | 616 | |
589 | 617 | echo ' |
590 | 618 | <div class="buttonlist', !empty($direction) ? ' float' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '> |
@@ -44,10 +44,11 @@ discard block |
||
44 | 44 | <dt>', $txt['users_online_today'], ':</dt> |
45 | 45 | <dd>', $context['online_today'], '</dd>'; |
46 | 46 | |
47 | - if (!empty($modSettings['hitStats'])) |
|
48 | - echo ' |
|
47 | + if (!empty($modSettings['hitStats'])) { |
|
48 | + echo ' |
|
49 | 49 | <dt>', $txt['num_hits'], ':</dt> |
50 | 50 | <dd>', $context['num_hits'], '</dd>'; |
51 | + } |
|
51 | 52 | |
52 | 53 | echo ' |
53 | 54 | </dl> |
@@ -71,17 +72,19 @@ discard block |
||
71 | 72 | <dt>', $txt['gender_stats'], ':</dt> |
72 | 73 | <dd>'; |
73 | 74 | |
74 | - foreach ($context['gender'] as $g => $n) |
|
75 | - echo $g, ': ', $n, '<br>'; |
|
75 | + foreach ($context['gender'] as $g => $n) { |
|
76 | + echo $g, ': ', $n, '<br>'; |
|
77 | + } |
|
76 | 78 | |
77 | 79 | echo ' |
78 | 80 | </dd>'; |
79 | 81 | } |
80 | 82 | |
81 | - if (!empty($modSettings['hitStats'])) |
|
82 | - echo ' |
|
83 | + if (!empty($modSettings['hitStats'])) { |
|
84 | + echo ' |
|
83 | 85 | <dt>', $txt['average_hits'], ':</dt> |
84 | 86 | <dd>', $context['average_hits'], '</dd>'; |
87 | + } |
|
85 | 88 | |
86 | 89 | echo ' |
87 | 90 | </dl>'; |
@@ -105,14 +108,15 @@ discard block |
||
105 | 108 | </dt> |
106 | 109 | <dd class="statsbar">'; |
107 | 110 | |
108 | - if (!empty($item['percent'])) |
|
109 | - echo ' |
|
111 | + if (!empty($item['percent'])) { |
|
112 | + echo ' |
|
110 | 113 | <div class="bar" style="width: ', $item['percent'], '%;"> |
111 | 114 | <span class="righttext">', $item['num'], '</span> |
112 | 115 | </div>'; |
113 | - else |
|
114 | - echo ' |
|
116 | + } else { |
|
117 | + echo ' |
|
115 | 118 | <div class="bar empty"><span class="righttext">', $item['num'], '</span></div>'; |
119 | + } |
|
116 | 120 | |
117 | 121 | echo ' |
118 | 122 | </dd>'; |
@@ -144,9 +148,10 @@ discard block |
||
144 | 148 | <th>', $txt['stats_new_members'], '</th> |
145 | 149 | <th>', $txt['most_online'], '</th>'; |
146 | 150 | |
147 | - if (!empty($modSettings['hitStats'])) |
|
148 | - echo ' |
|
151 | + if (!empty($modSettings['hitStats'])) { |
|
152 | + echo ' |
|
149 | 153 | <th>', $txt['page_views'], '</th>'; |
154 | + } |
|
150 | 155 | |
151 | 156 | echo ' |
152 | 157 | </tr> |
@@ -165,9 +170,10 @@ discard block |
||
165 | 170 | <th>', $year['new_members'], '</th> |
166 | 171 | <th>', $year['most_members_online'], '</th>'; |
167 | 172 | |
168 | - if (!empty($modSettings['hitStats'])) |
|
169 | - echo ' |
|
173 | + if (!empty($modSettings['hitStats'])) { |
|
174 | + echo ' |
|
170 | 175 | <th>', $year['hits'], '</th>'; |
176 | + } |
|
171 | 177 | |
172 | 178 | echo ' |
173 | 179 | </tr>'; |
@@ -184,9 +190,10 @@ discard block |
||
184 | 190 | <th>', $month['new_members'], '</th> |
185 | 191 | <th>', $month['most_members_online'], '</th>'; |
186 | 192 | |
187 | - if (!empty($modSettings['hitStats'])) |
|
188 | - echo ' |
|
193 | + if (!empty($modSettings['hitStats'])) { |
|
194 | + echo ' |
|
189 | 195 | <th>', $month['hits'], '</th>'; |
196 | + } |
|
190 | 197 | |
191 | 198 | echo ' |
192 | 199 | </tr>'; |
@@ -203,9 +210,10 @@ discard block |
||
203 | 210 | <td>', $day['new_members'], '</td> |
204 | 211 | <td>', $day['most_members_online'], '</td>'; |
205 | 212 | |
206 | - if (!empty($modSettings['hitStats'])) |
|
207 | - echo ' |
|
213 | + if (!empty($modSettings['hitStats'])) { |
|
214 | + echo ' |
|
208 | 215 | <td>', $day['hits'], '</td>'; |
216 | + } |
|
209 | 217 | |
210 | 218 | echo ' |
211 | 219 | </tr>'; |