@@ -55,18 +55,20 @@ discard block |
||
| 55 | 55 | <div class="modbox"> |
| 56 | 56 | <ul>'; |
| 57 | 57 | |
| 58 | - foreach ($context['group_requests'] as $request) |
|
| 59 | - echo ' |
|
| 58 | + foreach ($context['group_requests'] as $request) { |
|
| 59 | + echo ' |
|
| 60 | 60 | <li class="smalltext"> |
| 61 | 61 | <a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], ' |
| 62 | 62 | </li>'; |
| 63 | + } |
|
| 63 | 64 | |
| 64 | 65 | // Don't have any watched users right now? |
| 65 | - if (empty($context['group_requests'])) |
|
| 66 | - echo ' |
|
| 66 | + if (empty($context['group_requests'])) { |
|
| 67 | + echo ' |
|
| 67 | 68 | <li> |
| 68 | 69 | <strong class="smalltext">', $txt['mc_group_requests_none'], '</strong> |
| 69 | 70 | </li>'; |
| 71 | + } |
|
| 70 | 72 | |
| 71 | 73 | echo ' |
| 72 | 74 | </ul> |
@@ -124,18 +126,20 @@ discard block |
||
| 124 | 126 | <div class="modbox"> |
| 125 | 127 | <ul>'; |
| 126 | 128 | |
| 127 | - foreach ($context['watched_users'] as $user) |
|
| 128 | - echo ' |
|
| 129 | + foreach ($context['watched_users'] as $user) { |
|
| 130 | + echo ' |
|
| 129 | 131 | <li> |
| 130 | 132 | <span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span> |
| 131 | 133 | </li>'; |
| 134 | + } |
|
| 132 | 135 | |
| 133 | 136 | // Don't have any watched users right now? |
| 134 | - if (empty($context['watched_users'])) |
|
| 135 | - echo ' |
|
| 137 | + if (empty($context['watched_users'])) { |
|
| 138 | + echo ' |
|
| 136 | 139 | <li> |
| 137 | 140 | <strong class="smalltext">', $txt['mc_watched_users_none'], '</strong> |
| 138 | 141 | </li>'; |
| 142 | + } |
|
| 139 | 143 | |
| 140 | 144 | echo ' |
| 141 | 145 | </ul> |
@@ -193,18 +197,20 @@ discard block |
||
| 193 | 197 | <div class="modbox"> |
| 194 | 198 | <ul>'; |
| 195 | 199 | |
| 196 | - foreach ($context['reported_posts'] as $post) |
|
| 197 | - echo ' |
|
| 200 | + foreach ($context['reported_posts'] as $post) { |
|
| 201 | + echo ' |
|
| 198 | 202 | <li> |
| 199 | 203 | <span class="smalltext">', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), '</span> |
| 200 | 204 | </li>'; |
| 205 | + } |
|
| 201 | 206 | |
| 202 | 207 | // Don't have any watched users right now? |
| 203 | - if (empty($context['reported_posts'])) |
|
| 204 | - echo ' |
|
| 208 | + if (empty($context['reported_posts'])) { |
|
| 209 | + echo ' |
|
| 205 | 210 | <li> |
| 206 | 211 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
| 207 | 212 | </li>'; |
| 213 | + } |
|
| 208 | 214 | |
| 209 | 215 | echo ' |
| 210 | 216 | </ul> |
@@ -262,18 +268,20 @@ discard block |
||
| 262 | 268 | <div class="modbox"> |
| 263 | 269 | <ul>'; |
| 264 | 270 | |
| 265 | - foreach ($context['reported_users'] as $user) |
|
| 266 | - echo ' |
|
| 271 | + foreach ($context['reported_users'] as $user) { |
|
| 272 | + echo ' |
|
| 267 | 273 | <li> |
| 268 | 274 | <span class="smalltext">', $user['user']['link'], '</span> |
| 269 | 275 | </li>'; |
| 276 | + } |
|
| 270 | 277 | |
| 271 | 278 | // Don't have any watched users right now? |
| 272 | - if (empty($context['reported_users'])) |
|
| 273 | - echo ' |
|
| 279 | + if (empty($context['reported_users'])) { |
|
| 280 | + echo ' |
|
| 274 | 281 | <li> |
| 275 | 282 | <strong class="smalltext">', $txt['mc_reported_users_none'], '</strong> |
| 276 | 283 | </li>'; |
| 284 | + } |
|
| 277 | 285 | |
| 278 | 286 | echo ' |
| 279 | 287 | </ul> |
@@ -344,9 +352,10 @@ discard block |
||
| 344 | 352 | <ul class="moderation_notes">'; |
| 345 | 353 | |
| 346 | 354 | // Cycle through the notes. |
| 347 | - foreach ($context['notes'] as $note) |
|
| 348 | - echo ' |
|
| 355 | + foreach ($context['notes'] as $note) { |
|
| 356 | + echo ' |
|
| 349 | 357 | <li class="smalltext">', ($note['can_delete'] ? '<a href="' . $note['delete_href'] . ';' . $context['mod-modnote-del_token_var'] . '=' . $context['mod-modnote-del_token'] . '" data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'], ' <strong>', $note['author']['link'], ':</strong> ', $note['text'], '</li>'; |
| 358 | + } |
|
| 350 | 359 | |
| 351 | 360 | echo ' |
| 352 | 361 | </ul> |
@@ -388,16 +397,17 @@ discard block |
||
| 388 | 397 | $remove_button = create_button('delete', 'remove_message', 'remove'); |
| 389 | 398 | |
| 390 | 399 | // No posts? |
| 391 | - if (empty($context['unapproved_items'])) |
|
| 392 | - echo ' |
|
| 400 | + if (empty($context['unapproved_items'])) { |
|
| 401 | + echo ' |
|
| 393 | 402 | <div class="windowbg2"> |
| 394 | 403 | <p class="centertext">', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], '</p> |
| 395 | 404 | </div>'; |
| 396 | - else |
|
| 397 | - echo ' |
|
| 405 | + } else { |
|
| 406 | + echo ' |
|
| 398 | 407 | <div class="pagesection floatleft"> |
| 399 | 408 | ', $context['page_index'], ' |
| 400 | 409 | </div>'; |
| 410 | + } |
|
| 401 | 411 | |
| 402 | 412 | foreach ($context['unapproved_items'] as $item) |
| 403 | 413 | { |
@@ -414,14 +424,16 @@ discard block |
||
| 414 | 424 | <span class="floatright"> |
| 415 | 425 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';approve=', $item['id'], '">', $approve_button, '</a>'; |
| 416 | 426 | |
| 417 | - if ($item['can_delete']) |
|
| 418 | - echo ' |
|
| 427 | + if ($item['can_delete']) { |
|
| 428 | + echo ' |
|
| 419 | 429 | ', $context['menu_separator'], ' |
| 420 | 430 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';delete=', $item['id'], '">', $remove_button, '</a>'; |
| 431 | + } |
|
| 421 | 432 | |
| 422 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 423 | - echo ' |
|
| 433 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 434 | + echo ' |
|
| 424 | 435 | <input type="checkbox" name="item[]" value="', $item['id'], '" checked class="input_check"> '; |
| 436 | + } |
|
| 425 | 437 | |
| 426 | 438 | echo ' |
| 427 | 439 | </span> |
@@ -431,8 +443,8 @@ discard block |
||
| 431 | 443 | echo ' |
| 432 | 444 | <div class="pagesection">'; |
| 433 | 445 | |
| 434 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 435 | - echo ' |
|
| 446 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 447 | + echo ' |
|
| 436 | 448 | <div class="floatright"> |
| 437 | 449 | <select name="do" onchange="if (this.value != 0 && confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();"> |
| 438 | 450 | <option value="0">', $txt['with_selected'], ':</option> |
@@ -442,12 +454,14 @@ discard block |
||
| 442 | 454 | </select> |
| 443 | 455 | <noscript><input type="submit" name="mc_go" value="', $txt['go'], '" class="button_submit"></noscript> |
| 444 | 456 | </div>'; |
| 457 | + } |
|
| 445 | 458 | |
| 446 | - if (!empty($context['unapproved_items'])) |
|
| 447 | - echo ' |
|
| 459 | + if (!empty($context['unapproved_items'])) { |
|
| 460 | + echo ' |
|
| 448 | 461 | <div class="floatleft"> |
| 449 | 462 | <div class="pagelinks">', $context['page_index'], '</div> |
| 450 | 463 | </div>'; |
| 464 | + } |
|
| 451 | 465 | |
| 452 | 466 | echo ' |
| 453 | 467 | </div> |
@@ -467,8 +481,9 @@ discard block |
||
| 467 | 481 | global $scripturl, $context, $txt, $delete_button; |
| 468 | 482 | |
| 469 | 483 | // We'll have a delete please bob. |
| 470 | - if (empty($delete_button)) |
|
| 471 | - $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
| 484 | + if (empty($delete_button)) { |
|
| 485 | + $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
| 486 | + } |
|
| 472 | 487 | |
| 473 | 488 | $output_html = ' |
| 474 | 489 | <div> |
@@ -477,10 +492,11 @@ discard block |
||
| 477 | 492 | </div> |
| 478 | 493 | <div class="floatright">'; |
| 479 | 494 | |
| 480 | - if ($post['can_delete']) |
|
| 481 | - $output_html .= ' |
|
| 495 | + if ($post['can_delete']) { |
|
| 496 | + $output_html .= ' |
|
| 482 | 497 | <a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a> |
| 483 | 498 | <input type="checkbox" name="delete[]" value="' . $post['id'] . '" class="input_check">'; |
| 499 | + } |
|
| 484 | 500 | |
| 485 | 501 | $output_html .= ' |
| 486 | 502 | </div> |
@@ -522,12 +538,12 @@ discard block |
||
| 522 | 538 | <input type="submit" name="save" value="', $txt['save'], '" class="button_submit"> |
| 523 | 539 | </div> |
| 524 | 540 | </form>'; |
| 525 | - } |
|
| 526 | - else |
|
| 527 | - echo ' |
|
| 541 | + } else { |
|
| 542 | + echo ' |
|
| 528 | 543 | <div class="windowbg"> |
| 529 | 544 | <div class="centertext">', $txt['mc_no_settings'], '</div> |
| 530 | 545 | </div>'; |
| 546 | + } |
|
| 531 | 547 | |
| 532 | 548 | echo ' |
| 533 | 549 | </div>'; |
@@ -623,8 +639,8 @@ discard block |
||
| 623 | 639 | </dd> |
| 624 | 640 | </dl>'; |
| 625 | 641 | |
| 626 | - if ($context['template_data']['can_edit_personal']) |
|
| 627 | - echo ' |
|
| 642 | + if ($context['template_data']['can_edit_personal']) { |
|
| 643 | + echo ' |
|
| 628 | 644 | <input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', ' class="input_check"> |
| 629 | 645 | <label for="make_personal"> |
| 630 | 646 | <strong>', $txt['mc_warning_template_personal'], '</strong> |
@@ -632,6 +648,7 @@ discard block |
||
| 632 | 648 | <br> |
| 633 | 649 | <span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span> |
| 634 | 650 | <br>'; |
| 651 | + } |
|
| 635 | 652 | |
| 636 | 653 | echo ' |
| 637 | 654 | <hr> |
@@ -54,8 +54,9 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | // Prepare the comments... |
| 56 | 56 | $comments = array(); |
| 57 | - foreach ($report['comments'] as $comment) |
|
| 58 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
| 57 | + foreach ($report['comments'] as $comment) { |
|
| 58 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
| 59 | + } |
|
| 59 | 60 | |
| 60 | 61 | echo ' |
| 61 | 62 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -69,18 +70,21 @@ discard block |
||
| 69 | 70 | <li><a href="', $scripturl, '?action=moderate;area=reportedposts;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>'; |
| 70 | 71 | |
| 71 | 72 | // Delete message button. |
| 72 | - if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) |
|
| 73 | - echo ' |
|
| 73 | + if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))) { |
|
| 74 | + echo ' |
|
| 74 | 75 | <li><a href="', $scripturl, '?action=deletemsg;topic=', $report['topic']['id'], '.0;msg=', $report['topic']['id_msg'], ';modcenter;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['mc_reportedp_delete_confirm'], '" class="you_sure">', $delete_button, '</a></li>'; |
| 76 | + } |
|
| 75 | 77 | |
| 76 | 78 | // Ban this user button. |
| 77 | - if (!$report['closed'] && !empty($context['report_manage_bans'])) |
|
| 78 | - echo ' |
|
| 79 | + if (!$report['closed'] && !empty($context['report_manage_bans'])) { |
|
| 80 | + echo ' |
|
| 79 | 81 | <li><a href="', $scripturl, '?action=admin;area=ban;sa=add', (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']), ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>'; |
| 82 | + } |
|
| 80 | 83 | |
| 81 | - if (!$context['view_closed']) |
|
| 82 | - echo ' |
|
| 84 | + if (!$context['view_closed']) { |
|
| 85 | + echo ' |
|
| 83 | 86 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '" class="input_check"></li>'; |
| 87 | + } |
|
| 84 | 88 | |
| 85 | 89 | echo ' |
| 86 | 90 | </ul> |
@@ -88,11 +92,12 @@ discard block |
||
| 88 | 92 | } |
| 89 | 93 | |
| 90 | 94 | // Were none found? |
| 91 | - if (empty($context['reports'])) |
|
| 92 | - echo ' |
|
| 95 | + if (empty($context['reports'])) { |
|
| 96 | + echo ' |
|
| 93 | 97 | <div class="windowbg2"> |
| 94 | 98 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
| 95 | 99 | </div>'; |
| 100 | + } |
|
| 96 | 101 | |
| 97 | 102 | echo ' |
| 98 | 103 | <div class="pagesection"> |
@@ -125,18 +130,20 @@ discard block |
||
| 125 | 130 | <div class="modbox"> |
| 126 | 131 | <ul>'; |
| 127 | 132 | |
| 128 | - foreach ($context['reported_posts'] as $report) |
|
| 129 | - echo ' |
|
| 133 | + foreach ($context['reported_posts'] as $report) { |
|
| 134 | + echo ' |
|
| 130 | 135 | <li class="smalltext"> |
| 131 | 136 | <a href="', $report['report_href'], '">', $report['subject'], '</a> ', $txt['mc_reportedp_by'], ' ', $report['author']['link'], ' |
| 132 | 137 | </li>'; |
| 138 | + } |
|
| 133 | 139 | |
| 134 | 140 | // Don't have any watched users right now? |
| 135 | - if (empty($context['reported_posts'])) |
|
| 136 | - echo ' |
|
| 141 | + if (empty($context['reported_posts'])) { |
|
| 142 | + echo ' |
|
| 137 | 143 | <li> |
| 138 | 144 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
| 139 | 145 | </li>'; |
| 146 | + } |
|
| 140 | 147 | |
| 141 | 148 | echo ' |
| 142 | 149 | </ul> |
@@ -226,12 +233,13 @@ discard block |
||
| 226 | 233 | <h3 class="catbg">', $txt['mc_modreport_whoreported_title'], '</h3> |
| 227 | 234 | </div>'; |
| 228 | 235 | |
| 229 | - foreach ($context['report']['comments'] as $comment) |
|
| 230 | - echo ' |
|
| 236 | + foreach ($context['report']['comments'] as $comment) { |
|
| 237 | + echo ' |
|
| 231 | 238 | <div class="windowbg"> |
| 232 | 239 | <p class="smalltext">', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '</p> |
| 233 | 240 | <p>', $comment['message'], '</p> |
| 234 | 241 | </div>'; |
| 242 | + } |
|
| 235 | 243 | |
| 236 | 244 | echo ' |
| 237 | 245 | <br> |
@@ -240,11 +248,12 @@ discard block |
||
| 240 | 248 | </div> |
| 241 | 249 | <div>'; |
| 242 | 250 | |
| 243 | - if (empty($context['report']['mod_comments'])) |
|
| 244 | - echo ' |
|
| 251 | + if (empty($context['report']['mod_comments'])) { |
|
| 252 | + echo ' |
|
| 245 | 253 | <div class="information"> |
| 246 | 254 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
| 247 | 255 | </div>'; |
| 256 | + } |
|
| 248 | 257 | |
| 249 | 258 | foreach ($context['report']['mod_comments'] as $comment) |
| 250 | 259 | { |
@@ -334,18 +343,20 @@ discard block |
||
| 334 | 343 | <div class="modbox"> |
| 335 | 344 | <ul>'; |
| 336 | 345 | |
| 337 | - foreach ($context['reported_members'] as $report) |
|
| 338 | - echo ' |
|
| 346 | + foreach ($context['reported_members'] as $report) { |
|
| 347 | + echo ' |
|
| 339 | 348 | <li class="smalltext"> |
| 340 | 349 | <a href="', $report['report_href'], '">', $report['user_name'], '</a> |
| 341 | 350 | </li>'; |
| 351 | + } |
|
| 342 | 352 | |
| 343 | 353 | // Don't have any reported members right now? |
| 344 | - if (empty($context['reported_members'])) |
|
| 345 | - echo ' |
|
| 354 | + if (empty($context['reported_members'])) { |
|
| 355 | + echo ' |
|
| 346 | 356 | <li> |
| 347 | 357 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
| 348 | 358 | </li>'; |
| 359 | + } |
|
| 349 | 360 | |
| 350 | 361 | echo ' |
| 351 | 362 | </ul> |
@@ -431,8 +442,9 @@ discard block |
||
| 431 | 442 | |
| 432 | 443 | // Prepare the comments... |
| 433 | 444 | $comments = array(); |
| 434 | - foreach ($report['comments'] as $comment) |
|
| 435 | - $comments[$comment['member']['id']] = $comment['member']['link']; |
|
| 445 | + foreach ($report['comments'] as $comment) { |
|
| 446 | + $comments[$comment['member']['id']] = $comment['member']['link']; |
|
| 447 | + } |
|
| 436 | 448 | |
| 437 | 449 | echo ' |
| 438 | 450 | ', $txt['mc_reportedp_reported_by'], ': ', implode(', ', $comments), ' |
@@ -444,13 +456,15 @@ discard block |
||
| 444 | 456 | <li><a href="', $scripturl, '?action=moderate;area=reportedmembers;sa=handle;closed=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a></li>'; |
| 445 | 457 | |
| 446 | 458 | // Ban this user button. |
| 447 | - if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) |
|
| 448 | - echo ' |
|
| 459 | + if (!$report['closed'] && !empty($context['report_manage_bans']) && !empty($report['user']['id'])) { |
|
| 460 | + echo ' |
|
| 449 | 461 | <li><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $report['user']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>'; |
| 462 | + } |
|
| 450 | 463 | |
| 451 | - if (!$context['view_closed']) |
|
| 452 | - echo ' |
|
| 464 | + if (!$context['view_closed']) { |
|
| 465 | + echo ' |
|
| 453 | 466 | <li><input type="checkbox" name="close[]" value="' . $report['id'] . '" class="input_check"></li>'; |
| 467 | + } |
|
| 454 | 468 | |
| 455 | 469 | echo ' |
| 456 | 470 | </ul> |
@@ -458,11 +472,12 @@ discard block |
||
| 458 | 472 | } |
| 459 | 473 | |
| 460 | 474 | // Were none found? |
| 461 | - if (empty($context['reports'])) |
|
| 462 | - echo ' |
|
| 475 | + if (empty($context['reports'])) { |
|
| 476 | + echo ' |
|
| 463 | 477 | <div class="windowbg2"> |
| 464 | 478 | <p class="centertext">', $txt['mc_reportedp_none_found'], '</p> |
| 465 | 479 | </div>'; |
| 480 | + } |
|
| 466 | 481 | |
| 467 | 482 | echo ' |
| 468 | 483 | <div class="pagesection"> |
@@ -522,12 +537,13 @@ discard block |
||
| 522 | 537 | <h3 class="catbg">', $txt['mc_memberreport_whoreported_title'], '</h3> |
| 523 | 538 | </div>'; |
| 524 | 539 | |
| 525 | - foreach ($context['report']['comments'] as $comment) |
|
| 526 | - echo ' |
|
| 540 | + foreach ($context['report']['comments'] as $comment) { |
|
| 541 | + echo ' |
|
| 527 | 542 | <div class="windowbg"> |
| 528 | 543 | <p class="smalltext">', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '</p> |
| 529 | 544 | <p>', $comment['message'], '</p> |
| 530 | 545 | </div>'; |
| 546 | + } |
|
| 531 | 547 | |
| 532 | 548 | echo ' |
| 533 | 549 | <br> |
@@ -536,11 +552,12 @@ discard block |
||
| 536 | 552 | </div> |
| 537 | 553 | <div>'; |
| 538 | 554 | |
| 539 | - if (empty($context['report']['mod_comments'])) |
|
| 540 | - echo ' |
|
| 555 | + if (empty($context['report']['mod_comments'])) { |
|
| 556 | + echo ' |
|
| 541 | 557 | <div class="information"> |
| 542 | 558 | <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> |
| 543 | 559 | </div>'; |
| 560 | + } |
|
| 544 | 561 | |
| 545 | 562 | foreach ($context['report']['mod_comments'] as $comment) |
| 546 | 563 | { |
@@ -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> |
@@ -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"> |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |