| Conditions | 66 |
| Paths | > 20000 |
| Total Lines | 450 |
| Lines | 47 |
| Ratio | 10.44 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 263 | function template_modify_board() |
||
| 264 | { |
||
| 265 | global $context, $scripturl, $txt, $modSettings; |
||
| 266 | |||
| 267 | // The main table header. |
||
| 268 | echo ' |
||
| 269 | <div id="manage_boards"> |
||
| 270 | <form action="', $scripturl, '?action=admin;area=manageboards;sa=board2" method="post" accept-charset="', $context['character_set'], '"> |
||
| 271 | <input type="hidden" name="boardid" value="', $context['board']['id'], '"> |
||
| 272 | <div class="cat_bar"> |
||
| 273 | <h3 class="catbg"> |
||
| 274 | ', isset($context['board']['is_new']) ? $txt['mboards_new_board_name'] : $txt['boardsEdit'], ' |
||
| 275 | </h3> |
||
| 276 | </div> |
||
| 277 | <div class="windowbg"> |
||
| 278 | <dl class="settings">'; |
||
| 279 | |||
| 280 | // Option for choosing the category the board lives in. |
||
| 281 | echo ' |
||
| 282 | <dt> |
||
| 283 | <strong>', $txt['mboards_category'], ':</strong> |
||
| 284 | </dt> |
||
| 285 | <dd> |
||
| 286 | <select name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">'; |
||
| 287 | |||
| 288 | foreach ($context['categories'] as $category) |
||
| 289 | echo ' |
||
| 290 | <option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>'; |
||
| 291 | echo ' |
||
| 292 | </select> |
||
| 293 | </dd>'; |
||
| 294 | |||
| 295 | // If this isn't the only board in this category let the user choose where the board is to live. |
||
| 296 | if ((isset($context['board']['is_new']) && count($context['board_order']) > 0) || count($context['board_order']) > 1) |
||
| 297 | { |
||
| 298 | echo ' |
||
| 299 | <dt> |
||
| 300 | <strong>', $txt['order'], ':</strong> |
||
| 301 | </dt> |
||
| 302 | <dd>'; |
||
| 303 | |||
| 304 | // The first select box gives the user the option to position it before, after or as a child of another board. |
||
| 305 | echo ' |
||
| 306 | <select id="order" name="placement" onchange="this.form.board_order.disabled = this.options[this.selectedIndex].value == \'\';"> |
||
| 307 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : '', ' |
||
| 308 | <option value="after">' . $txt['mboards_order_after'] . '...</option> |
||
| 309 | <option value="child">' . $txt['mboards_order_child_of'] . '...</option> |
||
| 310 | <option value="before">' . $txt['mboards_order_before'] . '...</option> |
||
| 311 | </select>'; |
||
| 312 | |||
| 313 | // The second select box lists all the boards in the category. |
||
| 314 | echo ' |
||
| 315 | <select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '> |
||
| 316 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : ''; |
||
| 317 | |||
| 318 | foreach ($context['board_order'] as $order) |
||
| 319 | echo ' |
||
| 320 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
||
| 321 | echo ' |
||
| 322 | </select> |
||
| 323 | </dd>'; |
||
| 324 | } |
||
| 325 | |||
| 326 | // Options for board name and description. |
||
| 327 | echo ' |
||
| 328 | <dt> |
||
| 329 | <strong>', $txt['full_name'], ':</strong><br> |
||
| 330 | <span class="smalltext">', $txt['name_on_display'], '</span> |
||
| 331 | </dt> |
||
| 332 | <dd> |
||
| 333 | <input type="text" name="board_name" value="', $context['board']['name'], '" size="30"> |
||
| 334 | </dd> |
||
| 335 | <dt> |
||
| 336 | <strong>', $txt['mboards_description'], ':</strong><br> |
||
| 337 | <span class="smalltext">', str_replace('{allowed_tags}', implode(', ', $context['description_allowed_tags']), $txt['mboards_description_desc']), '</span> |
||
| 338 | </dt> |
||
| 339 | <dd> |
||
| 340 | <textarea name="desc" rows="3" cols="35">', $context['board']['description'], '</textarea> |
||
| 341 | </dd> |
||
| 342 | <dt> |
||
| 343 | <strong>', $txt['permission_profile'], ':</strong><br> |
||
| 344 | <span class="smalltext">', $context['can_manage_permissions'] ? sprintf($txt['permission_profile_desc'], $scripturl . '?action=admin;area=permissions;sa=profiles;' . $context['session_var'] . '=' . $context['session_id']) : strip_tags($txt['permission_profile_desc']), '</span> |
||
| 345 | </dt> |
||
| 346 | <dd> |
||
| 347 | <select name="profile">'; |
||
| 348 | |||
| 349 | if (isset($context['board']['is_new'])) |
||
| 350 | echo ' |
||
| 351 | <option value="-1">[', $txt['permission_profile_inherit'], ']</option>'; |
||
| 352 | |||
| 353 | foreach ($context['profiles'] as $id => $profile) |
||
| 354 | echo ' |
||
| 355 | <option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
||
| 356 | |||
| 357 | echo ' |
||
| 358 | </select> |
||
| 359 | </dd> |
||
| 360 | <dt> |
||
| 361 | <strong>', $txt['mboards_groups'], ':</strong><br> |
||
| 362 | <span class="smalltext">', empty($modSettings['deny_boards_access']) ? $txt['mboards_groups_desc'] : $txt['boardsaccess_option_desc'], '</span>'; |
||
| 363 | |||
| 364 | echo ' |
||
| 365 | </dt> |
||
| 366 | <dd>'; |
||
| 367 | |||
| 368 | if (!empty($modSettings['deny_boards_access'])) |
||
| 369 | echo ' |
||
| 370 | <table> |
||
| 371 | <tr> |
||
| 372 | <td></td> |
||
| 373 | <th>', $txt['permissions_option_on'], '</th> |
||
| 374 | <th>', $txt['permissions_option_off'], '</th> |
||
| 375 | <th>', $txt['permissions_option_deny'], '</th> |
||
| 376 | </tr>'; |
||
| 377 | |||
| 378 | // List all the membergroups so the user can choose who may access this board. |
||
| 379 | foreach ($context['groups'] as $group) |
||
| 380 | if (empty($modSettings['deny_boards_access'])) |
||
| 381 | echo ' |
||
| 382 | <label for="groups_', $group['id'], '"> |
||
| 383 | <input type="checkbox" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), '> |
||
| 384 | <span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : ($group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : ''), '> |
||
| 385 | ', $group['name'], ' |
||
| 386 | </span> |
||
| 387 | </label><br>'; |
||
| 388 | else |
||
| 389 | echo ' |
||
| 390 | <tr> |
||
| 391 | <td> |
||
| 392 | <label for="groups_', $group['id'], '_a"> |
||
| 393 | <span', $group['is_post_group'] ? ' class="post_group" title="' . $txt['mboards_groups_post_group'] . '"' : ($group['id'] == 0 ? ' class="regular_members" title="' . $txt['mboards_groups_regular_members'] . '"' : ''), '> |
||
| 394 | ', $group['name'], ' |
||
| 395 | </span> |
||
| 396 | </label> |
||
| 397 | </td> |
||
| 398 | <td> |
||
| 399 | <input type="radio" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '_a"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), '> |
||
| 400 | </td> |
||
| 401 | <td> |
||
| 402 | <input type="radio" name="groups[', $group['id'], ']" value="ignore" id="groups_', $group['id'], '_x"', in_array($group['id'], $context['board_managers']) ? ' disabled' : (!$group['allow'] && !$group['deny'] ? ' checked' : ''), '> |
||
| 403 | </td> |
||
| 404 | <td> |
||
| 405 | <input type="radio" name="groups[', $group['id'], ']" value="deny" id="groups_', $group['id'], '_d"', in_array($group['id'], $context['board_managers']) ? ' disabled' : ($group['deny'] ? ' checked' : ''), '> |
||
| 406 | </td> |
||
| 407 | <td></td> |
||
| 408 | </tr>'; |
||
| 409 | |||
| 410 | if (empty($modSettings['deny_boards_access'])) |
||
| 411 | echo ' |
||
| 412 | <span class="select_all_box"> |
||
| 413 | <em>', $txt['check_all'], '</em> <input type="checkbox" onclick="invertAll(this, this.form, \'groups[\');"> |
||
| 414 | </span> |
||
| 415 | <br><br> |
||
| 416 | </dd>'; |
||
| 417 | else |
||
| 418 | echo ' |
||
| 419 | <tr class="select_all_box"> |
||
| 420 | <td> |
||
| 421 | </td> |
||
| 422 | <td> |
||
| 423 | <input type="radio" name="select_all" onclick="selectAllRadio(this, this.form, \'groups\', \'allow\');"> |
||
| 424 | </td> |
||
| 425 | <td> |
||
| 426 | <input type="radio" name="select_all" onclick="selectAllRadio(this, this.form, \'groups\', \'ignore\');"> |
||
| 427 | </td> |
||
| 428 | <td> |
||
| 429 | <input type="radio" name="select_all" onclick="selectAllRadio(this, this.form, \'groups\', \'deny\');"> |
||
| 430 | </td> |
||
| 431 | <td> |
||
| 432 | <em>', $txt['check_all'], '</em> |
||
| 433 | </td> |
||
| 434 | </tr> |
||
| 435 | </table> |
||
| 436 | </dd>'; |
||
| 437 | |||
| 438 | // Options to choose moderators, specify as announcement board and choose whether to count posts here. |
||
| 439 | echo ' |
||
| 440 | <dt> |
||
| 441 | <strong>', $txt['mboards_moderators'], ':</strong><br> |
||
| 442 | <span class="smalltext">', $txt['mboards_moderators_desc'], '</span><br> |
||
| 443 | </dt> |
||
| 444 | <dd> |
||
| 445 | <input type="text" name="moderators" id="moderators" value="', $context['board']['moderator_list'], '" size="30"> |
||
| 446 | <div id="moderator_container"></div> |
||
| 447 | </dd> |
||
| 448 | <dt> |
||
| 449 | <strong>', $txt['mboards_moderator_groups'], ':</strong><br> |
||
| 450 | <span class="smalltext">', $txt['mboards_moderator_groups_desc'], '</span><br> |
||
| 451 | </dt> |
||
| 452 | <dd> |
||
| 453 | <input type="text" name="moderator_groups" id="moderator_groups" value="', $context['board']['moderator_groups_list'], '" size="30"> |
||
| 454 | <div id="moderator_group_container"></div> |
||
| 455 | </dd> |
||
| 456 | </dl> |
||
| 457 | <script> |
||
| 458 | $(document).ready(function () { |
||
| 459 | $(".select_all_box").each(function () { |
||
| 460 | $(this).removeClass(\'select_all_box\'); |
||
| 461 | }); |
||
| 462 | }); |
||
| 463 | </script> |
||
| 464 | <hr>'; |
||
| 465 | |||
| 466 | if (empty($context['board']['is_recycle']) && empty($context['board']['topics'])) |
||
| 467 | { |
||
| 468 | echo ' |
||
| 469 | <dl class="settings"> |
||
| 470 | <dt> |
||
| 471 | <strong', $context['board']['topics'] ? ' style="color: gray;"' : '', '>', $txt['mboards_redirect'], ':</strong><br> |
||
| 472 | <span class="smalltext">', $txt['mboards_redirect_desc'], '</span><br> |
||
| 473 | </dt> |
||
| 474 | <dd> |
||
| 475 | <input type="checkbox" id="redirect_enable" name="redirect_enable"', $context['board']['redirect'] != '' ? ' checked' : '', ' onclick="refreshOptions();"> |
||
| 476 | </dd> |
||
| 477 | </dl> |
||
| 478 | |||
| 479 | <div id="redirect_address_div"> |
||
| 480 | <dl class="settings"> |
||
| 481 | <dt> |
||
| 482 | <strong>', $txt['mboards_redirect_url'], ':</strong><br> |
||
| 483 | <span class="smalltext">', $txt['mboards_redirect_url_desc'], '</span><br> |
||
| 484 | </dt> |
||
| 485 | <dd> |
||
| 486 | <input type="text" name="redirect_address" value="', $context['board']['redirect'], '" size="40"> |
||
| 487 | </dd> |
||
| 488 | </dl> |
||
| 489 | </div>'; |
||
| 490 | |||
| 491 | if ($context['board']['redirect']) |
||
| 492 | echo ' |
||
| 493 | <div id="reset_redirect_div"> |
||
| 494 | <dl class="settings"> |
||
| 495 | <dt> |
||
| 496 | <strong>', $txt['mboards_redirect_reset'], ':</strong><br> |
||
| 497 | <span class="smalltext">', $txt['mboards_redirect_reset_desc'], '</span><br> |
||
| 498 | </dt> |
||
| 499 | <dd> |
||
| 500 | <input type="checkbox" name="reset_redirect"> |
||
| 501 | <em>(', sprintf($txt['mboards_current_redirects'], $context['board']['posts']), ')</em> |
||
| 502 | </dd> |
||
| 503 | </dl> |
||
| 504 | </div>'; |
||
| 505 | } |
||
| 506 | |||
| 507 | echo ' |
||
| 508 | <div id="count_posts_div"> |
||
| 509 | <dl class="settings"> |
||
| 510 | <dt> |
||
| 511 | <strong>', $txt['mboards_count_posts'], ':</strong><br> |
||
| 512 | <span class="smalltext">', $txt['mboards_count_posts_desc'], '</span><br> |
||
| 513 | </dt> |
||
| 514 | <dd> |
||
| 515 | <input type="checkbox" name="count"', $context['board']['count_posts'] ? ' checked' : '', '> |
||
| 516 | </dd> |
||
| 517 | </dl> |
||
| 518 | </div>'; |
||
| 519 | |||
| 520 | // Here the user can choose to force this board to use a theme other than the default theme for the forum. |
||
| 521 | echo ' |
||
| 522 | <div id="board_theme_div"> |
||
| 523 | <dl class="settings"> |
||
| 524 | <dt> |
||
| 525 | <strong>', $txt['mboards_theme'], ':</strong><br> |
||
| 526 | <span class="smalltext">', $txt['mboards_theme_desc'], '</span><br> |
||
| 527 | </dt> |
||
| 528 | <dd> |
||
| 529 | <select name="boardtheme" id="boardtheme" onchange="refreshOptions();"> |
||
| 530 | <option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>'; |
||
| 531 | |||
| 532 | foreach ($context['themes'] as $theme) |
||
| 533 | echo ' |
||
| 534 | <option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
||
| 535 | |||
| 536 | echo ' |
||
| 537 | </select> |
||
| 538 | </dd> |
||
| 539 | </dl> |
||
| 540 | </div><!-- #board_theme_div --> |
||
| 541 | <div id="override_theme_div"> |
||
| 542 | <dl class="settings"> |
||
| 543 | <dt> |
||
| 544 | <strong>', $txt['mboards_override_theme'], ':</strong><br> |
||
| 545 | <span class="smalltext">', $txt['mboards_override_theme_desc'], '</span><br> |
||
| 546 | </dt> |
||
| 547 | <dd> |
||
| 548 | <input type="checkbox" name="override_theme"', $context['board']['override_theme'] ? ' checked' : '', '> |
||
| 549 | </dd> |
||
| 550 | </dl> |
||
| 551 | </div>'; |
||
| 552 | |||
| 553 | // Show any board settings added by mods using the 'integrate_edit_board' hook. |
||
| 554 | if (!empty($context['custom_board_settings']) && is_array($context['custom_board_settings'])) |
||
| 555 | { |
||
| 556 | echo ' |
||
| 557 | <hr> |
||
| 558 | <div id="custom_board_settings"> |
||
| 559 | <dl class="settings">'; |
||
| 560 | |||
| 561 | foreach ($context['custom_board_settings'] as $cbs_id => $cbs) |
||
| 562 | { |
||
| 563 | if (!empty($cbs['dt']) && !empty($cbs['dd'])) |
||
| 564 | echo ' |
||
| 565 | <dt class="clear', !is_numeric($cbs_id) ? ' cbs_' . $cbs_id : '', '"> |
||
| 566 | ', $cbs['dt'], ' |
||
| 567 | </dt> |
||
| 568 | <dd', !is_numeric($cbs_id) ? ' class="cbs_' . $cbs_id . '"' : '', '> |
||
| 569 | ', $cbs['dd'], ' |
||
| 570 | </dd>'; |
||
| 571 | } |
||
| 572 | |||
| 573 | echo ' |
||
| 574 | </dl> |
||
| 575 | </div>'; |
||
| 576 | } |
||
| 577 | |||
| 578 | if (!empty($context['board']['is_recycle'])) |
||
| 579 | echo ' |
||
| 580 | <div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>'; |
||
| 581 | |||
| 582 | echo ' |
||
| 583 | <input type="hidden" name="rid" value="', $context['redirect_location'], '"> |
||
| 584 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
||
| 585 | <input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">'; |
||
| 586 | |||
| 587 | // If this board has no children don't bother with the next confirmation screen. |
||
| 588 | if ($context['board']['no_children']) |
||
| 589 | echo ' |
||
| 590 | <input type="hidden" name="no_children" value="1">'; |
||
| 591 | |||
| 592 | if (isset($context['board']['is_new'])) |
||
| 593 | echo ' |
||
| 594 | <input type="hidden" name="cur_cat" value="', $context['board']['category'], '"> |
||
| 595 | <input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
||
| 596 | else |
||
| 597 | echo ' |
||
| 598 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
||
| 599 | |||
| 600 | if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) |
||
| 601 | echo ' |
||
| 602 | <input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button you_sure">'; |
||
| 603 | echo ' |
||
| 604 | </div><!-- .windowbg --> |
||
| 605 | </form> |
||
| 606 | </div><!-- #manage_boards --> |
||
| 607 | |||
| 608 | <script> |
||
| 609 | var oModeratorSuggest = new smc_AutoSuggest({ |
||
| 610 | sSelf: \'oModeratorSuggest\', |
||
| 611 | sSessionId: smf_session_id, |
||
| 612 | sSessionVar: smf_session_var, |
||
| 613 | sSuggestId: \'moderators\', |
||
| 614 | sControlId: \'moderators\', |
||
| 615 | sSearchType: \'member\', |
||
| 616 | bItemList: true, |
||
| 617 | sPostName: \'moderator_list\', |
||
| 618 | sURLMask: \'action=profile;u=%item_id%\', |
||
| 619 | sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\', |
||
| 620 | sItemListContainerId: \'moderator_container\', |
||
| 621 | aListItems: ['; |
||
| 622 | |||
| 623 | foreach ($context['board']['moderators'] as $id_member => $member_name) |
||
| 624 | echo ' |
||
| 625 | { |
||
| 626 | sItemId: ', JavaScriptEscape($id_member), ', |
||
| 627 | sItemName: ', JavaScriptEscape($member_name), ' |
||
| 628 | }', $id_member == $context['board']['last_moderator_id'] ? '' : ','; |
||
| 629 | |||
| 630 | echo ' |
||
| 631 | ] |
||
| 632 | }); |
||
| 633 | |||
| 634 | var oModeratorGroupSuggest = new smc_AutoSuggest({ |
||
| 635 | sSelf: \'oModeratorGroupSuggest\', |
||
| 636 | sSessionId: smf_session_id, |
||
| 637 | sSessionVar: smf_session_var, |
||
| 638 | sSuggestId: \'moderator_groups\', |
||
| 639 | sControlId: \'moderator_groups\', |
||
| 640 | sSearchType: \'membergroups\', |
||
| 641 | bItemList: true, |
||
| 642 | sPostName: \'moderator_group_list\', |
||
| 643 | sURLMask: \'action=groups;sa=members;group=%item_id%\', |
||
| 644 | sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\', |
||
| 645 | sItemListContainerId: \'moderator_group_container\', |
||
| 646 | aListItems: ['; |
||
| 647 | |||
| 648 | foreach ($context['board']['moderator_groups'] as $id_group => $group_name) |
||
| 649 | echo ' |
||
| 650 | { |
||
| 651 | sItemId: ', JavaScriptEscape($id_group), ', |
||
| 652 | sItemName: ', JavaScriptEscape($group_name), ' |
||
| 653 | }', $id_group == $context['board']['last_moderator_group_id'] ? '' : ','; |
||
| 654 | |||
| 655 | echo ' |
||
| 656 | ] |
||
| 657 | }); |
||
| 658 | </script>'; |
||
| 659 | |||
| 660 | // Javascript for deciding what to show. |
||
| 661 | echo ' |
||
| 662 | <script> |
||
| 663 | function refreshOptions() |
||
| 664 | { |
||
| 665 | var redirect = document.getElementById("redirect_enable"); |
||
| 666 | var redirectEnabled = redirect ? redirect.checked : false; |
||
| 667 | var nonDefaultTheme = document.getElementById("boardtheme").value == 0 ? false : true; |
||
| 668 | |||
| 669 | // What to show? |
||
| 670 | |||
| 671 | if(redirectEnabled || !nonDefaultTheme) |
||
| 672 | document.getElementById("override_theme_div").classList.add(\'hidden\'); |
||
| 673 | else |
||
| 674 | document.getElementById("override_theme_div").classList.remove(\'hidden\'); |
||
| 675 | |||
| 676 | if(redirectEnabled) { |
||
| 677 | document.getElementById("board_theme_div").classList.add(\'hidden\'); |
||
| 678 | document.getElementById("count_posts_div").classList.add(\'hidden\'); |
||
| 679 | } else { |
||
| 680 | document.getElementById("board_theme_div").classList.remove(\'hidden\'); |
||
| 681 | document.getElementById("count_posts_div").classList.remove(\'hidden\'); |
||
| 682 | }'; |
||
| 683 | |||
| 684 | if (!$context['board']['topics'] && empty($context['board']['is_recycle'])) |
||
| 685 | { |
||
| 686 | echo ' |
||
| 687 | if(redirectEnabled) |
||
| 688 | document.getElementById("redirect_address_div").classList.remove(\'hidden\'); |
||
| 689 | else |
||
| 690 | document.getElementById("redirect_address_div").classList.add(\'hidden\');'; |
||
| 691 | |||
| 692 | if ($context['board']['redirect']) |
||
| 693 | echo ' |
||
| 694 | if(redirectEnabled) |
||
| 695 | document.getElementById("reset_redirect_div").classList.remove(\'hidden\'); |
||
| 696 | else |
||
| 697 | document.getElementById("reset_redirect_div").classList.add(\'hidden\');'; |
||
| 698 | } |
||
| 699 | |||
| 700 | // Include any JavaScript added by mods using the 'integrate_edit_board' hook. |
||
| 701 | if (!empty($context['custom_refreshOptions']) && is_array($context['custom_refreshOptions'])) |
||
| 702 | { |
||
| 703 | foreach ($context['custom_refreshOptions'] as $refreshOption) |
||
| 704 | echo ' |
||
| 705 | ', $refreshOption; |
||
| 706 | } |
||
| 707 | |||
| 708 | echo ' |
||
| 709 | } |
||
| 710 | refreshOptions(); |
||
| 711 | </script>'; |
||
| 712 | } |
||
| 713 | |||
| 768 | ?> |