@@ -416,8 +416,8 @@ discard block |
||
| 416 | 416 | </div> |
| 417 | 417 | <div class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div> |
| 418 | 418 | <div class="attach-ui"> |
| 419 | - <a data-dz-remove class="button cancel">', $txt['modify_cancel'] ,'</a> |
|
| 420 | - <a class="button upload">', $txt['upload'] ,'</a> |
|
| 419 | + <a data-dz-remove class="button cancel">', $txt['modify_cancel'], '</a> |
|
| 420 | + <a class="button upload">', $txt['upload'], '</a> |
|
| 421 | 421 | </div> |
| 422 | 422 | </div> |
| 423 | 423 | </div> |
@@ -435,10 +435,10 @@ discard block |
||
| 435 | 435 | </dt> |
| 436 | 436 | <dd class="smalltext fallback"> |
| 437 | 437 | <div id="attachUpload" class="descbox"> |
| 438 | - <h5>', $txt['attach_drop_zone'] ,'</h5> |
|
| 439 | - <a class="button" id="attach-cancelAll">', $txt['attached_cancelAll'] ,'</a> |
|
| 440 | - <a class="button" id="attach-uploadAll">', $txt['attached_uploadAll'] ,'</a> |
|
| 441 | - <a class="button fileinput-button">', $txt['attach_add'] ,'</a> |
|
| 438 | + <h5>', $txt['attach_drop_zone'], '</h5> |
|
| 439 | + <a class="button" id="attach-cancelAll">', $txt['attached_cancelAll'], '</a> |
|
| 440 | + <a class="button" id="attach-uploadAll">', $txt['attached_uploadAll'], '</a> |
|
| 441 | + <a class="button fileinput-button">', $txt['attach_add'], '</a> |
|
| 442 | 442 | <div id="total-progress" class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div> |
| 443 | 443 | <div class="fallback"> |
| 444 | 444 | <input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>) |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | // Option to delete an event if user is editing one. |
| 546 | 546 | if ($context['make_event'] && !$context['event']['new']) |
| 547 | 547 | echo ' |
| 548 | - <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button you_sure">'; |
|
| 548 | + <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'], '" class="button you_sure">'; |
|
| 549 | 549 | |
| 550 | 550 | echo ' |
| 551 | 551 | </span> |
@@ -799,7 +799,7 @@ discard block |
||
| 799 | 799 | });'; |
| 800 | 800 | |
| 801 | 801 | echo ' |
| 802 | - var oEditorID = "', $context['post_box_name'] ,'"; |
|
| 802 | + var oEditorID = "', $context['post_box_name'], '"; |
|
| 803 | 803 | var oEditorObject = oEditorHandle_', $context['post_box_name'], '; |
| 804 | 804 | </script>'; |
| 805 | 805 | |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | { |
| 832 | 832 | echo ' |
| 833 | 833 | <ul class="quickbuttons" id="msg_', $post['id'], '_quote"> |
| 834 | - <li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'] ,'</a></li> |
|
| 834 | + <li style="display:none;" id="quoteSelected_', $post['id'], '" data-msgid="', $post['id'], '"><a href="javascript:void(0)"><span class="generic_icons quote_selected"></span>', $txt['quote_selected_action'], '</a></li> |
|
| 835 | 835 | <li id="post_modify"><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');"><span class="generic_icons quote"></span>', $txt['quote'], '</a></li> |
| 836 | 836 | </ul>'; |
| 837 | 837 | } |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | <head> |
| 919 | 919 | <meta charset="', $context['character_set'], '"> |
| 920 | 920 | <title>', $txt['spell_check'], '</title> |
| 921 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
| 921 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
| 922 | 922 | <style> |
| 923 | 923 | body, td |
| 924 | 924 | { |
@@ -951,8 +951,8 @@ discard block |
||
| 951 | 951 | var spell_formname = window.opener.spell_formname; |
| 952 | 952 | var spell_fieldname = window.opener.spell_fieldname; |
| 953 | 953 | </script> |
| 954 | - <script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'] ,'"></script> |
|
| 955 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 954 | + <script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'], '"></script> |
|
| 955 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 956 | 956 | <script> |
| 957 | 957 | ', $context['spell_js'], ' |
| 958 | 958 | </script> |
@@ -994,7 +994,7 @@ discard block |
||
| 994 | 994 | <head> |
| 995 | 995 | <meta charset="', $context['character_set'], '"> |
| 996 | 996 | <title>', $txt['retrieving_quote'], '</title> |
| 997 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 997 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 998 | 998 | </head> |
| 999 | 999 | <body> |
| 1000 | 1000 | ', $txt['retrieving_quote'], ' |
@@ -22,22 +22,24 @@ discard block |
||
| 22 | 22 | <script>'; |
| 23 | 23 | |
| 24 | 24 | // When using Go Back due to fatal_error, allow the form to be re-submitted with changes. |
| 25 | - if (isBrowser('is_firefox')) |
|
| 26 | - echo ' |
|
| 25 | + if (isBrowser('is_firefox')) { |
|
| 26 | + echo ' |
|
| 27 | 27 | window.addEventListener("pageshow", reActivate, false);'; |
| 28 | + } |
|
| 28 | 29 | |
| 29 | 30 | // Start with message icons - and any missing from this theme. |
| 30 | 31 | echo ' |
| 31 | 32 | var icon_urls = {'; |
| 32 | - foreach ($context['icons'] as $icon) |
|
| 33 | - echo ' |
|
| 33 | + foreach ($context['icons'] as $icon) { |
|
| 34 | + echo ' |
|
| 34 | 35 | \'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ','; |
| 36 | + } |
|
| 35 | 37 | echo ' |
| 36 | 38 | };'; |
| 37 | 39 | |
| 38 | 40 | // If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations. |
| 39 | - if ($context['make_poll']) |
|
| 40 | - echo ' |
|
| 41 | + if ($context['make_poll']) { |
|
| 42 | + echo ' |
|
| 41 | 43 | var pollOptionNum = 0, pollTabIndex; |
| 42 | 44 | var pollOptionId = ', $context['last_choice_id'], '; |
| 43 | 45 | function addPollOption() |
@@ -56,11 +58,13 @@ discard block |
||
| 56 | 58 | |
| 57 | 59 | setOuterHTML(document.getElementById(\'pollMoreOptions\'), ', JavaScriptEscape('<dt><label for="options-'), ' + pollOptionId + ', JavaScriptEscape('">' . $txt['option'] . ' '), ' + pollOptionNum + ', JavaScriptEscape('</label>:</dt><dd><input type="text" name="options['), ' + pollOptionId + ', JavaScriptEscape(']" id="options-'), ' + pollOptionId + ', JavaScriptEscape('" value="" size="80" maxlength="255" tabindex="'), ' + pollTabIndex + ', JavaScriptEscape('"></dd><p id="pollMoreOptions"></p>'), '); |
| 58 | 60 | }'; |
| 61 | + } |
|
| 59 | 62 | |
| 60 | 63 | // If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here. |
| 61 | - if ($context['make_event']) |
|
| 62 | - echo ' |
|
| 64 | + if ($context['make_event']) { |
|
| 65 | + echo ' |
|
| 63 | 66 | var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];'; |
| 67 | + } |
|
| 64 | 68 | |
| 65 | 69 | // End of the javascript, start the form and display the link tree. |
| 66 | 70 | echo ' |
@@ -80,9 +84,10 @@ discard block |
||
| 80 | 84 | </div> |
| 81 | 85 | </div><br>'; |
| 82 | 86 | |
| 83 | - if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) |
|
| 84 | - echo ' |
|
| 87 | + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) { |
|
| 88 | + echo ' |
|
| 85 | 89 | <input type="hidden" name="eventid" value="', $context['event']['id'], '">'; |
| 90 | + } |
|
| 86 | 91 | |
| 87 | 92 | // Start the main table. |
| 88 | 93 | echo ' |
@@ -117,18 +122,20 @@ discard block |
||
| 117 | 122 | } |
| 118 | 123 | |
| 119 | 124 | // If it's locked, show a message to warn the replier. |
| 120 | - if (!empty($context['locked'])) |
|
| 121 | - echo ' |
|
| 125 | + if (!empty($context['locked'])) { |
|
| 126 | + echo ' |
|
| 122 | 127 | <div class="errorbox"> |
| 123 | 128 | ', $txt['topic_locked_no_reply'], ' |
| 124 | 129 | </div>'; |
| 130 | + } |
|
| 125 | 131 | |
| 126 | - if (!empty($modSettings['drafts_post_enabled'])) |
|
| 127 | - echo ' |
|
| 132 | + if (!empty($modSettings['drafts_post_enabled'])) { |
|
| 133 | + echo ' |
|
| 128 | 134 | <div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>', |
| 129 | 135 | sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), ' |
| 130 | 136 | ', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), ' |
| 131 | 137 | </div>'; |
| 138 | + } |
|
| 132 | 139 | |
| 133 | 140 | // The post header... important stuff |
| 134 | 141 | echo ' |
@@ -180,9 +187,10 @@ discard block |
||
| 180 | 187 | { |
| 181 | 188 | echo ' |
| 182 | 189 | <optgroup label="', $category['name'], '">'; |
| 183 | - foreach ($category['boards'] as $board) |
|
| 184 | - echo ' |
|
| 190 | + foreach ($category['boards'] as $board) { |
|
| 191 | + echo ' |
|
| 185 | 192 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], ' </option>'; |
| 193 | + } |
|
| 186 | 194 | echo ' |
| 187 | 195 | </optgroup>'; |
| 188 | 196 | } |
@@ -218,9 +226,10 @@ discard block |
||
| 218 | 226 | <span class="label">', $txt['calendar_timezone'], '</span> |
| 219 | 227 | <select name="tz" id="tz"', !empty($context['event']['allday']) ? ' disabled' : '', '>'; |
| 220 | 228 | |
| 221 | - foreach ($context['all_timezones'] as $tz => $tzname) |
|
| 222 | - echo ' |
|
| 229 | + foreach ($context['all_timezones'] as $tz => $tzname) { |
|
| 230 | + echo ' |
|
| 223 | 231 | <option value="', $tz, '"', $tz == $context['event']['tz'] ? ' selected' : '', '>', $tzname, '</option>'; |
| 232 | + } |
|
| 224 | 233 | |
| 225 | 234 | echo ' |
| 226 | 235 | </select> |
@@ -286,14 +295,15 @@ discard block |
||
| 286 | 295 | <input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', '> |
| 287 | 296 | </dd>'; |
| 288 | 297 | |
| 289 | - if ($context['poll_options']['guest_vote_enabled']) |
|
| 290 | - echo ' |
|
| 298 | + if ($context['poll_options']['guest_vote_enabled']) { |
|
| 299 | + echo ' |
|
| 291 | 300 | <dt> |
| 292 | 301 | <label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label> |
| 293 | 302 | </dt> |
| 294 | 303 | <dd> |
| 295 | 304 | <input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll_options']['guest_vote']) ? ' checked' : '', '> |
| 296 | 305 | </dd>'; |
| 306 | + } |
|
| 297 | 307 | |
| 298 | 308 | echo ' |
| 299 | 309 | <dt> |
@@ -314,8 +324,8 @@ discard block |
||
| 314 | 324 | ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); |
| 315 | 325 | |
| 316 | 326 | // If we're editing and displaying edit details, show a box where they can say why |
| 317 | - if (isset($context['editing']) && $modSettings['show_modify']) |
|
| 318 | - echo ' |
|
| 327 | + if (isset($context['editing']) && $modSettings['show_modify']) { |
|
| 328 | + echo ' |
|
| 319 | 329 | <dl> |
| 320 | 330 | <dt class="clear"> |
| 321 | 331 | <span id="caption_edit_reason">', $txt['reason_for_edit'], ':</span> |
@@ -324,20 +334,23 @@ discard block |
||
| 324 | 334 | <input type="text" name="modify_reason"', isset($context['last_modified_reason']) ? ' value="' . $context['last_modified_reason'] . '"' : '', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80"> |
| 325 | 335 | </dd> |
| 326 | 336 | </dl>'; |
| 337 | + } |
|
| 327 | 338 | |
| 328 | 339 | // If this message has been edited in the past - display when it was. |
| 329 | - if (isset($context['last_modified'])) |
|
| 330 | - echo ' |
|
| 340 | + if (isset($context['last_modified'])) { |
|
| 341 | + echo ' |
|
| 331 | 342 | <div class="padding smalltext"> |
| 332 | 343 | ', $context['last_modified_text'], ' |
| 333 | 344 | </div>'; |
| 345 | + } |
|
| 334 | 346 | |
| 335 | 347 | // If the admin has enabled the hiding of the additional options - show a link and image for it. |
| 336 | - if (!empty($modSettings['additional_options_collapsable'])) |
|
| 337 | - echo ' |
|
| 348 | + if (!empty($modSettings['additional_options_collapsable'])) { |
|
| 349 | + echo ' |
|
| 338 | 350 | <div id="postAdditionalOptionsHeader"> |
| 339 | 351 | <strong><a href="#" id="postMoreExpandLink"> ', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong> |
| 340 | 352 | </div>'; |
| 353 | + } |
|
| 341 | 354 | |
| 342 | 355 | echo ' |
| 343 | 356 | <div id="postAdditionalOptions">'; |
@@ -369,19 +382,21 @@ discard block |
||
| 369 | 382 | <input type="hidden" name="attach_del[]" value="0"> |
| 370 | 383 | ', $txt['uncheck_unwatchd_attach'], ': |
| 371 | 384 | </dd>'; |
| 372 | - foreach ($context['current_attachments'] as $attachment) |
|
| 373 | - echo ' |
|
| 385 | + foreach ($context['current_attachments'] as $attachment) { |
|
| 386 | + echo ' |
|
| 374 | 387 | <dd class="smalltext"> |
| 375 | 388 | <label for="attachment_', $attachment['attachID'], '"><input type="checkbox" id="attachment_', $attachment['attachID'], '" name="attach_del[]" value="', $attachment['attachID'], '"', empty($attachment['unchecked']) ? ' checked' : '', '> ', $attachment['name'], (empty($attachment['approved']) ? ' (' . $txt['awaiting_approval'] . ')' : ''), |
| 376 | 389 | !empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit']) ? sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0)) : '', '</label> |
| 377 | 390 | </dd>'; |
| 391 | + } |
|
| 378 | 392 | |
| 379 | 393 | echo ' |
| 380 | 394 | </dl>'; |
| 381 | 395 | |
| 382 | - if (!empty($context['files_in_session_warning'])) |
|
| 383 | - echo ' |
|
| 396 | + if (!empty($context['files_in_session_warning'])) { |
|
| 397 | + echo ' |
|
| 384 | 398 | <div class="smalltext">', $context['files_in_session_warning'], '</div>'; |
| 399 | + } |
|
| 385 | 400 | } |
| 386 | 401 | |
| 387 | 402 | // Is the user allowed to post any additional ones? If so give them the boxes to do it! |
@@ -445,8 +460,8 @@ discard block |
||
| 445 | 460 | ', empty($modSettings['attachmentSizeLimit']) ? '' : ('<input type="hidden" name="MAX_FILE_SIZE" value="' . $modSettings['attachmentSizeLimit'] * 1024 . '">'); |
| 446 | 461 | |
| 447 | 462 | // Show more boxes if they aren't approaching that limit. |
| 448 | - if ($context['num_allowed_attachments'] > 1) |
|
| 449 | - echo ' |
|
| 463 | + if ($context['num_allowed_attachments'] > 1) { |
|
| 464 | + echo ' |
|
| 450 | 465 | <script> |
| 451 | 466 | var allowed_attachments = ', $context['num_allowed_attachments'], '; |
| 452 | 467 | var current_attachment = 1; |
@@ -467,9 +482,10 @@ discard block |
||
| 467 | 482 | </div> |
| 468 | 483 | </div> |
| 469 | 484 | </dd>'; |
| 470 | - else |
|
| 471 | - echo ' |
|
| 485 | + } else { |
|
| 486 | + echo ' |
|
| 472 | 487 | </dd>'; |
| 488 | + } |
|
| 473 | 489 | |
| 474 | 490 | // Add any template changes for an alternative upload system here. |
| 475 | 491 | call_integration_hook('integrate_upload_template'); |
@@ -478,21 +494,25 @@ discard block |
||
| 478 | 494 | <dd class="smalltext">'; |
| 479 | 495 | |
| 480 | 496 | // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. |
| 481 | - if (!empty($modSettings['attachmentCheckExtensions'])) |
|
| 482 | - echo ' |
|
| 497 | + if (!empty($modSettings['attachmentCheckExtensions'])) { |
|
| 498 | + echo ' |
|
| 483 | 499 | ', $txt['allowed_types'], ': ', $context['allowed_extensions'], '<br>'; |
| 500 | + } |
|
| 484 | 501 | |
| 485 | - if (!empty($context['attachment_restrictions'])) |
|
| 486 | - echo ' |
|
| 502 | + if (!empty($context['attachment_restrictions'])) { |
|
| 503 | + echo ' |
|
| 487 | 504 | ', $txt['attach_restrictions'], ' ', implode(', ', $context['attachment_restrictions']), '<br>'; |
| 505 | + } |
|
| 488 | 506 | |
| 489 | - if ($context['num_allowed_attachments'] == 0) |
|
| 490 | - echo ' |
|
| 507 | + if ($context['num_allowed_attachments'] == 0) { |
|
| 508 | + echo ' |
|
| 491 | 509 | ', $txt['attach_limit_nag'], '<br>'; |
| 510 | + } |
|
| 492 | 511 | |
| 493 | - if (!$context['can_post_attachment_unapproved']) |
|
| 494 | - echo ' |
|
| 512 | + if (!$context['can_post_attachment_unapproved']) { |
|
| 513 | + echo ' |
|
| 495 | 514 | <span class="alert">', $txt['attachment_requires_approval'], '</span>', '<br>'; |
| 515 | + } |
|
| 496 | 516 | |
| 497 | 517 | echo ' |
| 498 | 518 | </dd> |
@@ -515,10 +535,11 @@ discard block |
||
| 515 | 535 | <dt><strong>', $txt['subject'], '</strong></dt> |
| 516 | 536 | <dd><strong>', $txt['draft_saved_on'], '</strong></dd>'; |
| 517 | 537 | |
| 518 | - foreach ($context['drafts'] as $draft) |
|
| 519 | - echo ' |
|
| 538 | + foreach ($context['drafts'] as $draft) { |
|
| 539 | + echo ' |
|
| 520 | 540 | <dt>', $draft['link'], '</dt> |
| 521 | 541 | <dd>', $draft['poster_time'], '</dd>'; |
| 542 | + } |
|
| 522 | 543 | echo ' |
| 523 | 544 | </dl> |
| 524 | 545 | </div>'; |
@@ -543,9 +564,10 @@ discard block |
||
| 543 | 564 | ', template_control_richedit_buttons($context['post_box_name']); |
| 544 | 565 | |
| 545 | 566 | // Option to delete an event if user is editing one. |
| 546 | - if ($context['make_event'] && !$context['event']['new']) |
|
| 547 | - echo ' |
|
| 567 | + if ($context['make_event'] && !$context['event']['new']) { |
|
| 568 | + echo ' |
|
| 548 | 569 | <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button you_sure">'; |
| 570 | + } |
|
| 549 | 571 | |
| 550 | 572 | echo ' |
| 551 | 573 | </span> |
@@ -554,9 +576,10 @@ discard block |
||
| 554 | 576 | <br class="clear">'; |
| 555 | 577 | |
| 556 | 578 | // Assuming this isn't a new topic pass across the last message id. |
| 557 | - if (isset($context['topic_last_message'])) |
|
| 558 | - echo ' |
|
| 579 | + if (isset($context['topic_last_message'])) { |
|
| 580 | + echo ' |
|
| 559 | 581 | <input type="hidden" name="last_msg" value="', $context['topic_last_message'], '">'; |
| 582 | + } |
|
| 560 | 583 | |
| 561 | 584 | echo ' |
| 562 | 585 | <input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '"> |
@@ -698,9 +721,10 @@ discard block |
||
| 698 | 721 | |
| 699 | 722 | newPostsHTML += \'<div class="windowbg\' + (++reply_counter % 2 == 0 ? \'2\' : \'\') + \'"><div id="msg\' + newPosts[i].getAttribute("id") + \'"><div class="floatleft"><h5>', $txt['posted_by'], ': \' + newPosts[i].getElementsByTagName("poster")[0].firstChild.nodeValue + \'</h5><span class="smalltext">« <strong>', $txt['on'], ':</strong> \' + newPosts[i].getElementsByTagName("time")[0].firstChild.nodeValue + \' »</span> <span class="new_posts" id="image_new_\' + newPosts[i].getAttribute("id") + \'">', $txt['new'], '</span></div>\';'; |
| 700 | 723 | |
| 701 | - if ($context['can_quote']) |
|
| 702 | - echo ' |
|
| 724 | + if ($context['can_quote']) { |
|
| 725 | + echo ' |
|
| 703 | 726 | newPostsHTML += \'<ul class="quickbuttons" id="msg_\' + newPosts[i].getAttribute("id") + \'_quote"><li><a href="#postmodify" onclick="return insertQuoteFast(\\\'\' + newPosts[i].getAttribute("id") + \'\\\');" class="quote_button"><span>', $txt['quote'], '</span><\' + \'/a></li></ul>\';'; |
| 727 | + } |
|
| 704 | 728 | |
| 705 | 729 | echo ' |
| 706 | 730 | newPostsHTML += \'<br class="clear">\'; |
@@ -743,8 +767,8 @@ discard block |
||
| 743 | 767 | }'; |
| 744 | 768 | |
| 745 | 769 | // Code for showing and hiding additional options. |
| 746 | - if (!empty($modSettings['additional_options_collapsable'])) |
|
| 747 | - echo ' |
|
| 770 | + if (!empty($modSettings['additional_options_collapsable'])) { |
|
| 771 | + echo ' |
|
| 748 | 772 | var oSwapAdditionalOptions = new smc_Toggle({ |
| 749 | 773 | bToggleEnabled: true, |
| 750 | 774 | bCurrentlyCollapsed: ', $context['show_additional_options'] ? 'false' : 'true', ', |
@@ -772,10 +796,11 @@ discard block |
||
| 772 | 796 | } |
| 773 | 797 | ] |
| 774 | 798 | });'; |
| 799 | + } |
|
| 775 | 800 | |
| 776 | 801 | // Code for showing and hiding drafts |
| 777 | - if (!empty($context['drafts'])) |
|
| 778 | - echo ' |
|
| 802 | + if (!empty($context['drafts'])) { |
|
| 803 | + echo ' |
|
| 779 | 804 | var oSwapDraftOptions = new smc_Toggle({ |
| 780 | 805 | bToggleEnabled: true, |
| 781 | 806 | bCurrentlyCollapsed: true, |
@@ -797,6 +822,7 @@ discard block |
||
| 797 | 822 | } |
| 798 | 823 | ] |
| 799 | 824 | });'; |
| 825 | + } |
|
| 800 | 826 | |
| 801 | 827 | echo ' |
| 802 | 828 | var oEditorID = "', $context['post_box_name'] ,'"; |
@@ -817,8 +843,9 @@ discard block |
||
| 817 | 843 | foreach ($context['previous_posts'] as $post) |
| 818 | 844 | { |
| 819 | 845 | $ignoring = false; |
| 820 | - if (!empty($post['is_ignored'])) |
|
| 821 | - $ignored_posts[] = $ignoring = $post['id']; |
|
| 846 | + if (!empty($post['is_ignored'])) { |
|
| 847 | + $ignored_posts[] = $ignoring = $post['id']; |
|
| 848 | + } |
|
| 822 | 849 | |
| 823 | 850 | echo ' |
| 824 | 851 | <div class="windowbg"> |
@@ -1001,10 +1028,10 @@ discard block |
||
| 1001 | 1028 | <div id="temporary_posting_area" style="display: none;"></div> |
| 1002 | 1029 | <script>'; |
| 1003 | 1030 | |
| 1004 | - if ($context['close_window']) |
|
| 1005 | - echo ' |
|
| 1031 | + if ($context['close_window']) { |
|
| 1032 | + echo ' |
|
| 1006 | 1033 | window.close();'; |
| 1007 | - else |
|
| 1034 | + } else |
|
| 1008 | 1035 | { |
| 1009 | 1036 | // Lucky for us, Internet Explorer has an "innerText" feature which basically converts entities <--> text. Use it if possible ;). |
| 1010 | 1037 | echo ' |
@@ -1058,11 +1085,12 @@ discard block |
||
| 1058 | 1085 | </p> |
| 1059 | 1086 | <ul>'; |
| 1060 | 1087 | |
| 1061 | - foreach ($context['groups'] as $group) |
|
| 1062 | - echo ' |
|
| 1088 | + foreach ($context['groups'] as $group) { |
|
| 1089 | + echo ' |
|
| 1063 | 1090 | <li> |
| 1064 | 1091 | <label for="who_', $group['id'], '"><input type="checkbox" name="who[', $group['id'], ']" id="who_', $group['id'], '" value="', $group['id'], '" checked> ', $group['name'], '</label> <em>(', $group['member_count'], ')</em> |
| 1065 | 1092 | </li>'; |
| 1093 | + } |
|
| 1066 | 1094 | |
| 1067 | 1095 | echo ' |
| 1068 | 1096 | <li> |
@@ -52,9 +52,10 @@ discard block |
||
| 52 | 52 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
| 53 | 53 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0" checked onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
| 54 | 54 | |
| 55 | - if ($context['allow_protected']) |
|
| 56 | - echo ' |
|
| 55 | + if ($context['allow_protected']) { |
|
| 56 | + echo ' |
|
| 57 | 57 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
| 58 | + } |
|
| 58 | 59 | |
| 59 | 60 | echo ' |
| 60 | 61 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -64,14 +65,15 @@ discard block |
||
| 64 | 65 | </dd>'; |
| 65 | 66 | } |
| 66 | 67 | |
| 67 | - if ($context['post_group'] || $context['undefined_group']) |
|
| 68 | - echo ' |
|
| 68 | + if ($context['post_group'] || $context['undefined_group']) { |
|
| 69 | + echo ' |
|
| 69 | 70 | <dt id="min_posts_text"> |
| 70 | 71 | <strong>', $txt['membergroups_min_posts'], ':</strong> |
| 71 | 72 | </dt> |
| 72 | 73 | <dd> |
| 73 | 74 | <input type="number" name="min_posts" id="min_posts_input" size="5"> |
| 74 | 75 | </dd>'; |
| 76 | + } |
|
| 75 | 77 | if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups'])) |
| 76 | 78 | { |
| 77 | 79 | echo ' |
@@ -87,9 +89,10 @@ discard block |
||
| 87 | 89 | <select name="inheritperm" id="inheritperm_select" onclick="document.getElementById(\'perm_type_inherit\').checked = true;"> |
| 88 | 90 | <option value="-1">', $txt['membergroups_guests'], '</option> |
| 89 | 91 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
| 90 | - foreach ($context['groups'] as $group) |
|
| 91 | - echo ' |
|
| 92 | + foreach ($context['groups'] as $group) { |
|
| 93 | + echo ' |
|
| 92 | 94 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
| 95 | + } |
|
| 93 | 96 | echo ' |
| 94 | 97 | </select> |
| 95 | 98 | <br> |
@@ -98,9 +101,10 @@ discard block |
||
| 98 | 101 | <select name="copyperm" id="copyperm_select" onclick="document.getElementById(\'perm_type_copy\').checked = true;"> |
| 99 | 102 | <option value="-1">', $txt['membergroups_guests'], '</option> |
| 100 | 103 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
| 101 | - foreach ($context['groups'] as $group) |
|
| 102 | - echo ' |
|
| 104 | + foreach ($context['groups'] as $group) { |
|
| 105 | + echo ' |
|
| 103 | 106 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
| 107 | + } |
|
| 104 | 108 | echo ' |
| 105 | 109 | </select> |
| 106 | 110 | <br> |
@@ -173,8 +177,8 @@ discard block |
||
| 173 | 177 | <input type="text" name="group_name" id="group_name_input" value="', $context['group']['editable_name'], '" size="30"> |
| 174 | 178 | </dd>'; |
| 175 | 179 | |
| 176 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
| 177 | - echo ' |
|
| 180 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
| 181 | + echo ' |
|
| 178 | 182 | |
| 179 | 183 | <dt id="group_desc_text"> |
| 180 | 184 | <label for="group_desc_input"><strong>', $txt['membergroups_edit_desc'], ':</strong></label> |
@@ -182,6 +186,7 @@ discard block |
||
| 182 | 186 | <dd> |
| 183 | 187 | <textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea> |
| 184 | 188 | </dd>'; |
| 189 | + } |
|
| 185 | 190 | |
| 186 | 191 | // Group type... |
| 187 | 192 | if ($context['group']['allow_post_group']) |
@@ -195,9 +200,10 @@ discard block |
||
| 195 | 200 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
| 196 | 201 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0"', !$context['group']['is_post_group'] && $context['group']['type'] == 0 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
| 197 | 202 | |
| 198 | - if ($context['group']['allow_protected']) |
|
| 199 | - echo ' |
|
| 203 | + if ($context['group']['allow_protected']) { |
|
| 204 | + echo ' |
|
| 200 | 205 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1"', $context['group']['type'] == 1 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
| 206 | + } |
|
| 201 | 207 | |
| 202 | 208 | echo ' |
| 203 | 209 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2"', $context['group']['type'] == 2 ? ' checked' : '', ' onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -207,8 +213,8 @@ discard block |
||
| 207 | 213 | </dd>'; |
| 208 | 214 | } |
| 209 | 215 | |
| 210 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
| 211 | - echo ' |
|
| 216 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
| 217 | + echo ' |
|
| 212 | 218 | <dt id="group_moderators_text"> |
| 213 | 219 | <label for="group_moderators"><strong>', $txt['moderators'], ':</strong></label> |
| 214 | 220 | </dt> |
@@ -226,6 +232,7 @@ discard block |
||
| 226 | 232 | <option value="2"', $context['group']['hidden'] == 2 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_all'], '</option> |
| 227 | 233 | </select> |
| 228 | 234 | </dd>'; |
| 235 | + } |
|
| 229 | 236 | |
| 230 | 237 | // Can they inherit permissions? |
| 231 | 238 | if ($context['group']['id'] > 1 && $context['group']['id'] != 3) |
@@ -242,9 +249,10 @@ discard block |
||
| 242 | 249 | <option value="0"', $context['group']['inherited_from'] == 0 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>'; |
| 243 | 250 | |
| 244 | 251 | // For all the inheritable groups show an option. |
| 245 | - foreach ($context['inheritable_groups'] as $id => $group) |
|
| 246 | - echo ' |
|
| 252 | + foreach ($context['inheritable_groups'] as $id => $group) { |
|
| 253 | + echo ' |
|
| 247 | 254 | <option value="', $id, '"', $context['group']['inherited_from'] == $id ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>'; |
| 255 | + } |
|
| 248 | 256 | |
| 249 | 257 | echo ' |
| 250 | 258 | </select> |
@@ -252,8 +260,8 @@ discard block |
||
| 252 | 260 | </dd>'; |
| 253 | 261 | } |
| 254 | 262 | |
| 255 | - if ($context['group']['allow_post_group']) |
|
| 256 | - echo ' |
|
| 263 | + if ($context['group']['allow_post_group']) { |
|
| 264 | + echo ' |
|
| 257 | 265 | |
| 258 | 266 | <dt id="min_posts_text"> |
| 259 | 267 | <label for="min_posts_input"><strong>', $txt['membergroups_min_posts'], ':</strong></label> |
@@ -261,6 +269,7 @@ discard block |
||
| 261 | 269 | <dd> |
| 262 | 270 | <input type="number" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6"> |
| 263 | 271 | </dd>'; |
| 272 | + } |
|
| 264 | 273 | echo ' |
| 265 | 274 | <dt> |
| 266 | 275 | <label for="online_color_input"><strong>', $txt['membergroups_online_color'], ':</strong></label> |
@@ -302,9 +311,10 @@ discard block |
||
| 302 | 311 | } |
| 303 | 312 | |
| 304 | 313 | // No? Hide the entire control. |
| 305 | - else |
|
| 306 | - echo ' |
|
| 314 | + else { |
|
| 315 | + echo ' |
|
| 307 | 316 | <input type="hidden" name="icon_image" value="">'; |
| 317 | + } |
|
| 308 | 318 | |
| 309 | 319 | echo ' |
| 310 | 320 | <dt> |
@@ -315,8 +325,8 @@ discard block |
||
| 315 | 325 | <input type="text" name="max_messages" id="max_messages_input" value="', $context['group']['id'] == 1 ? 0 : $context['group']['max_messages'], '" size="6"', $context['group']['id'] == 1 ? ' disabled' : '', '> |
| 316 | 326 | </dd>'; |
| 317 | 327 | //Force 2FA for this membergroup? |
| 318 | - if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) |
|
| 319 | - echo ' |
|
| 328 | + if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) { |
|
| 329 | + echo ' |
|
| 320 | 330 | <dt> |
| 321 | 331 | <label for="group_tfa_force_input"><strong>', $txt['membergroups_tfa_force'], ':</strong></label><br> |
| 322 | 332 | <span class="smalltext">', $txt['membergroups_tfa_force_note'], '</span> |
@@ -324,6 +334,7 @@ discard block |
||
| 324 | 334 | <dd> |
| 325 | 335 | <input type="checkbox" name="group_tfa_force"', $context['group']['tfa_required'] ? ' checked' : '', '> |
| 326 | 336 | </dd>'; |
| 337 | + } |
|
| 327 | 338 | |
| 328 | 339 | if (!empty($context['categories'])) |
| 329 | 340 | { |
@@ -333,10 +344,11 @@ discard block |
||
| 333 | 344 | <span class="smalltext">' . $txt['membergroups_new_board_post_groups'] . '</span>' : '', ' |
| 334 | 345 | </dt> |
| 335 | 346 | <dd>'; |
| 336 | - if (!empty($context['can_manage_boards'])) |
|
| 337 | - echo $txt['membergroups_can_manage_access']; |
|
| 338 | - else |
|
| 339 | - template_add_edit_group_boards_list(); |
|
| 347 | + if (!empty($context['can_manage_boards'])) { |
|
| 348 | + echo $txt['membergroups_can_manage_access']; |
|
| 349 | + } else { |
|
| 350 | + template_add_edit_group_boards_list(); |
|
| 351 | + } |
|
| 340 | 352 | |
| 341 | 353 | echo ' |
| 342 | 354 | </dd>'; |
@@ -365,20 +377,21 @@ discard block |
||
| 365 | 377 | sItemListContainerId: \'moderator_container\', |
| 366 | 378 | aListItems: ['; |
| 367 | 379 | |
| 368 | - foreach ($context['group']['moderators'] as $id_member => $member_name) |
|
| 369 | - echo ' |
|
| 380 | + foreach ($context['group']['moderators'] as $id_member => $member_name) { |
|
| 381 | + echo ' |
|
| 370 | 382 | { |
| 371 | 383 | sItemId: ', JavaScriptEscape($id_member), ', |
| 372 | 384 | sItemName: ', JavaScriptEscape($member_name), ' |
| 373 | 385 | }', $id_member == $context['group']['last_moderator_id'] ? '' : ','; |
| 386 | + } |
|
| 374 | 387 | |
| 375 | 388 | echo ' |
| 376 | 389 | ] |
| 377 | 390 | }); |
| 378 | 391 | </script>'; |
| 379 | 392 | |
| 380 | - if ($context['group']['allow_post_group']) |
|
| 381 | - echo ' |
|
| 393 | + if ($context['group']['allow_post_group']) { |
|
| 394 | + echo ' |
|
| 382 | 395 | <script> |
| 383 | 396 | function swapPostGroup(isChecked) |
| 384 | 397 | { |
@@ -426,7 +439,8 @@ discard block |
||
| 426 | 439 | |
| 427 | 440 | swapPostGroup(', $context['group']['is_post_group'] ? 'true' : 'false', '); |
| 428 | 441 | </script>'; |
| 429 | -} |
|
| 442 | + } |
|
| 443 | + } |
|
| 430 | 444 | |
| 431 | 445 | /** |
| 432 | 446 | * The template for determining which boards a group has access to. |
@@ -443,13 +457,13 @@ discard block |
||
| 443 | 457 | |
| 444 | 458 | foreach ($context['categories'] as $category) |
| 445 | 459 | { |
| 446 | - if (empty($modSettings['deny_boards_access'])) |
|
| 447 | - echo ' |
|
| 460 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 461 | + echo ' |
|
| 448 | 462 | <li class="category"> |
| 449 | 463 | <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'new_group\'); return false;"><strong>', $category['name'], '</strong></a> |
| 450 | 464 | <ul style="width:100%">'; |
| 451 | - else |
|
| 452 | - echo ' |
|
| 465 | + } else { |
|
| 466 | + echo ' |
|
| 453 | 467 | <li class="category"> |
| 454 | 468 | <strong>', $category['name'], '</strong> |
| 455 | 469 | <span class="select_all_box"> |
@@ -462,16 +476,17 @@ discard block |
||
| 462 | 476 | </select> |
| 463 | 477 | </span> |
| 464 | 478 | <ul style="width:100%" id="boards_list_', $category['id'], '">'; |
| 479 | + } |
|
| 465 | 480 | |
| 466 | 481 | foreach ($category['boards'] as $board) |
| 467 | 482 | { |
| 468 | - if (empty($modSettings['deny_boards_access'])) |
|
| 469 | - echo ' |
|
| 483 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 484 | + echo ' |
|
| 470 | 485 | <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"> |
| 471 | 486 | <input type="checkbox" name="boardaccess[', $board['id'], ']" id="brd', $board['id'], '" value="allow"', $board['allow'] ? ' checked' : '', '> <label for="brd', $board['id'], '">', $board['name'], '</label> |
| 472 | 487 | </li>'; |
| 473 | - else |
|
| 474 | - echo ' |
|
| 488 | + } else { |
|
| 489 | + echo ' |
|
| 475 | 490 | <li class="board" style="width:100%"> |
| 476 | 491 | <span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span> |
| 477 | 492 | <span style="width:50%;float:right"> |
@@ -480,6 +495,7 @@ discard block |
||
| 480 | 495 | <input type="radio" name="boardaccess[', $board['id'], ']" id="deny_brd', $board['id'], '" value="deny"', $board['deny'] ? ' checked' : '', '> <label for="deny_brd', $board['id'], '">', $txt['permissions_option_deny'], '</label> |
| 481 | 496 | </span> |
| 482 | 497 | </li>'; |
| 498 | + } |
|
| 483 | 499 | } |
| 484 | 500 | |
| 485 | 501 | echo ' |
@@ -490,13 +506,13 @@ discard block |
||
| 490 | 506 | echo ' |
| 491 | 507 | </ul>'; |
| 492 | 508 | |
| 493 | - if (empty($modSettings['deny_boards_access'])) |
|
| 494 | - echo ' |
|
| 509 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 510 | + echo ' |
|
| 495 | 511 | <br class="clear"><br> |
| 496 | 512 | <input type="checkbox" id="checkall_check" onclick="invertAll(this, this.form, \'boardaccess\');"> <label for="checkall_check"><em>', $txt['check_all'], '</em></label> |
| 497 | 513 | </fieldset>'; |
| 498 | - else |
|
| 499 | - echo ' |
|
| 514 | + } else { |
|
| 515 | + echo ' |
|
| 500 | 516 | <br class="clear"> |
| 501 | 517 | <span class="select_all_box"> |
| 502 | 518 | <em>', $txt['all'], ': </em> |
@@ -512,15 +528,17 @@ discard block |
||
| 512 | 528 | }); |
| 513 | 529 | }); |
| 514 | 530 | </script>'; |
| 531 | + } |
|
| 515 | 532 | |
| 516 | - if ($collapse) |
|
| 517 | - echo ' |
|
| 533 | + if ($collapse) { |
|
| 534 | + echo ' |
|
| 518 | 535 | <a href="javascript:void(0);" onclick="document.getElementById(\'visible_boards\').style.display = \'block\'; document.getElementById(\'visible_boards_link\').style.display = \'none\'; return false;" id="visible_boards_link" style="display: none;">[ ', $txt['membergroups_select_visible_boards'], ' ]</a> |
| 519 | 536 | <script> |
| 520 | 537 | document.getElementById("visible_boards_link").style.display = ""; |
| 521 | 538 | document.getElementById("visible_boards").style.display = "none"; |
| 522 | 539 | </script>'; |
| 523 | -} |
|
| 540 | + } |
|
| 541 | + } |
|
| 524 | 542 | |
| 525 | 543 | /** |
| 526 | 544 | * Templatine for viewing the members of a group. |
@@ -544,14 +562,15 @@ discard block |
||
| 544 | 562 | <span ', $context['group']['online_color'] ? 'style="color: ' . $context['group']['online_color'] . ';"' : '', '>', $context['group']['name'], '</span> ', $context['group']['icons'], ' |
| 545 | 563 | </dd>'; |
| 546 | 564 | //Any description to show? |
| 547 | - if (!empty($context['group']['description'])) |
|
| 548 | - echo ' |
|
| 565 | + if (!empty($context['group']['description'])) { |
|
| 566 | + echo ' |
|
| 549 | 567 | <dt> |
| 550 | 568 | <strong>' . $txt['membergroups_members_description'] . ':</strong> |
| 551 | 569 | </dt> |
| 552 | 570 | <dd> |
| 553 | 571 | ', $context['group']['description'], ' |
| 554 | 572 | </dd>'; |
| 573 | + } |
|
| 555 | 574 | |
| 556 | 575 | echo ' |
| 557 | 576 | <dt> |
@@ -564,8 +583,9 @@ discard block |
||
| 564 | 583 | if (!empty($context['group']['moderators'])) |
| 565 | 584 | { |
| 566 | 585 | $moderators = array(); |
| 567 | - foreach ($context['group']['moderators'] as $moderator) |
|
| 568 | - $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
| 586 | + foreach ($context['group']['moderators'] as $moderator) { |
|
| 587 | + $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
| 588 | + } |
|
| 569 | 589 | |
| 570 | 590 | echo ' |
| 571 | 591 | <dt> |
@@ -591,27 +611,30 @@ discard block |
||
| 591 | 611 | <tr class="title_bar"> |
| 592 | 612 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
| 593 | 613 | |
| 594 | - if ($context['can_send_email']) |
|
| 595 | - echo ' |
|
| 614 | + if ($context['can_send_email']) { |
|
| 615 | + echo ' |
|
| 596 | 616 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=email', $context['sort_by'] == 'email' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['email'], $context['sort_by'] == 'email' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
| 617 | + } |
|
| 597 | 618 | |
| 598 | 619 | echo ' |
| 599 | 620 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
| 600 | 621 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=registered', $context['sort_by'] == 'registered' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['date_registered'], $context['sort_by'] == 'registered' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
| 601 | 622 | <th ', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
| 602 | - if (!empty($context['group']['assignable'])) |
|
| 603 | - echo ' |
|
| 623 | + if (!empty($context['group']['assignable'])) { |
|
| 624 | + echo ' |
|
| 604 | 625 | <th style="width: 4%"><input type="checkbox" onclick="invertAll(this, this.form);"></th>'; |
| 626 | + } |
|
| 605 | 627 | echo ' |
| 606 | 628 | </tr> |
| 607 | 629 | </thead> |
| 608 | 630 | <tbody>'; |
| 609 | 631 | |
| 610 | - if (empty($context['members'])) |
|
| 611 | - echo ' |
|
| 632 | + if (empty($context['members'])) { |
|
| 633 | + echo ' |
|
| 612 | 634 | <tr class="windowbg"> |
| 613 | 635 | <td colspan="6">', $txt['membergroups_members_no_members'], '</td> |
| 614 | 636 | </tr>'; |
| 637 | + } |
|
| 615 | 638 | |
| 616 | 639 | foreach ($context['members'] as $member) |
| 617 | 640 | { |
@@ -630,9 +653,10 @@ discard block |
||
| 630 | 653 | <td>', $member['last_online'], '</td> |
| 631 | 654 | <td>', $member['registered'], '</td> |
| 632 | 655 | <td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>'; |
| 633 | - if (!empty($context['group']['assignable'])) |
|
| 634 | - echo ' |
|
| 656 | + if (!empty($context['group']['assignable'])) { |
|
| 657 | + echo ' |
|
| 635 | 658 | <td style="width: 4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>'; |
| 659 | + } |
|
| 636 | 660 | echo ' |
| 637 | 661 | </tr>'; |
| 638 | 662 | } |
@@ -641,11 +665,12 @@ discard block |
||
| 641 | 665 | </tbody> |
| 642 | 666 | </table>'; |
| 643 | 667 | |
| 644 | - if (!empty($context['group']['assignable'])) |
|
| 645 | - echo ' |
|
| 668 | + if (!empty($context['group']['assignable'])) { |
|
| 669 | + echo ' |
|
| 646 | 670 | <div class="floatright"> |
| 647 | 671 | <input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button "> |
| 648 | 672 | </div>'; |
| 673 | + } |
|
| 649 | 674 | |
| 650 | 675 | echo ' |
| 651 | 676 | <div class="pagesection flow_hidden"> |
@@ -679,8 +704,8 @@ discard block |
||
| 679 | 704 | </form> |
| 680 | 705 | </div>'; |
| 681 | 706 | |
| 682 | - if (!empty($context['group']['assignable'])) |
|
| 683 | - echo ' |
|
| 707 | + if (!empty($context['group']['assignable'])) { |
|
| 708 | + echo ' |
|
| 684 | 709 | <script> |
| 685 | 710 | var oAddMemberSuggest = new smc_AutoSuggest({ |
| 686 | 711 | sSelf: \'oAddMemberSuggest\', |
@@ -696,7 +721,8 @@ discard block |
||
| 696 | 721 | sItemListContainerId: \'toAddItemContainer\' |
| 697 | 722 | }); |
| 698 | 723 | </script>'; |
| 699 | -} |
|
| 724 | + } |
|
| 725 | + } |
|
| 700 | 726 | |
| 701 | 727 | /** |
| 702 | 728 | * Allow the moderator to enter a reason to each user being rejected. |
@@ -716,8 +742,8 @@ discard block |
||
| 716 | 742 | <dl class="settings">'; |
| 717 | 743 | |
| 718 | 744 | // Loop through and print out a reason box for each... |
| 719 | - foreach ($context['group_requests'] as $request) |
|
| 720 | - echo ' |
|
| 745 | + foreach ($context['group_requests'] as $request) { |
|
| 746 | + echo ' |
|
| 721 | 747 | <dt> |
| 722 | 748 | <strong>', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</strong> |
| 723 | 749 | </dt> |
@@ -725,6 +751,7 @@ discard block |
||
| 725 | 751 | <input type="hidden" name="groupr[]" value="', $request['id'], '"> |
| 726 | 752 | <textarea name="groupreason[', $request['id'], ']" rows="3" cols="40" style="min-width: 80%; max-width: 99%;"></textarea> |
| 727 | 753 | </dd>'; |
| 754 | + } |
|
| 728 | 755 | |
| 729 | 756 | echo ' |
| 730 | 757 | </dl> |
@@ -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 | <div id="advanced_search" class="roundframe"> |
@@ -42,9 +44,10 @@ discard block |
||
| 42 | 44 | <dd> |
| 43 | 45 | <input type="search" name="search" id="searchfor" ', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40">'; |
| 44 | 46 | |
| 45 | - if (empty($modSettings['search_simple_fulltext'])) |
|
| 46 | - echo ' |
|
| 47 | + if (empty($modSettings['search_simple_fulltext'])) { |
|
| 48 | + echo ' |
|
| 47 | 49 | <br><em class="smalltext">', $txt['search_example'], '</em>'; |
| 50 | + } |
|
| 48 | 51 | |
| 49 | 52 | echo ' |
| 50 | 53 | </dd> |
@@ -115,11 +118,12 @@ discard block |
||
| 115 | 118 | } |
| 116 | 119 | |
| 117 | 120 | // If $context['search_params']['topic'] is set, that means we're searching just one topic. |
| 118 | - if (!empty($context['search_params']['topic'])) |
|
| 119 | - echo ' |
|
| 121 | + if (!empty($context['search_params']['topic'])) { |
|
| 122 | + echo ' |
|
| 120 | 123 | <p>', $txt['search_specific_topic'], ' "', $context['search_topic']['link'], '".</p> |
| 121 | 124 | <input type="hidden" name="topic" value="', $context['search_topic']['id'], '"> |
| 122 | 125 | <input type="submit" name="b_search" value="', $txt['search'], '" class="button">'; |
| 126 | + } |
|
| 123 | 127 | |
| 124 | 128 | echo ' |
| 125 | 129 | </div> |
@@ -150,14 +154,15 @@ discard block |
||
| 150 | 154 | |
| 151 | 155 | foreach ($category['boards'] as $board) |
| 152 | 156 | { |
| 153 | - if ($i == $limit) |
|
| 154 | - echo ' |
|
| 157 | + if ($i == $limit) { |
|
| 158 | + echo ' |
|
| 155 | 159 | </ul> |
| 156 | 160 | </li> |
| 157 | 161 | </ul> |
| 158 | 162 | <ul class="ignoreboards floatright"> |
| 159 | 163 | <li class="category"> |
| 160 | 164 | <ul>'; |
| 165 | + } |
|
| 161 | 166 | |
| 162 | 167 | echo ' |
| 163 | 168 | <li class="board"> |
@@ -245,13 +250,15 @@ discard block |
||
| 245 | 250 | <div class="roundframe">'; |
| 246 | 251 | |
| 247 | 252 | // Did they make any typos or mistakes, perhaps? |
| 248 | - if (isset($context['did_you_mean'])) |
|
| 249 | - echo ' |
|
| 253 | + if (isset($context['did_you_mean'])) { |
|
| 254 | + echo ' |
|
| 250 | 255 | <p>', $txt['search_did_you_mean'], ' <a href="', $scripturl, '?action=search2;params=', $context['did_you_mean_params'], '">', $context['did_you_mean'], '</a>.</p>'; |
| 256 | + } |
|
| 251 | 257 | |
| 252 | - if (!empty($context['search_ignored'])) |
|
| 253 | - echo ' |
|
| 258 | + if (!empty($context['search_ignored'])) { |
|
| 259 | + echo ' |
|
| 254 | 260 | <p>', $txt['search_warning_ignored_word' . (count($context['search_ignored']) == 1 ? '' : 's')], ': ', implode(', ', $context['search_ignored']), '</p>'; |
| 261 | + } |
|
| 255 | 262 | |
| 256 | 263 | echo ' |
| 257 | 264 | <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '"> |
@@ -273,10 +280,11 @@ discard block |
||
| 273 | 280 | <input type="hidden" name="maxage" value="', !empty($context['search_params']['maxage']) ? $context['search_params']['maxage'] : '9999', '"> |
| 274 | 281 | <input type="hidden" name="sort" value="', !empty($context['search_params']['sort']) ? $context['search_params']['sort'] : 'relevance', '"> |
| 275 | 282 | </div>'; |
| 276 | - if (!empty($context['search_params']['brd'])) |
|
| 277 | - foreach ($context['search_params']['brd'] as $board_id) |
|
| 283 | + if (!empty($context['search_params']['brd'])) { |
|
| 284 | + foreach ($context['search_params']['brd'] as $board_id) |
|
| 278 | 285 | echo ' |
| 279 | 286 | <input type="hidden" name="brd[', $board_id, ']" value="', $board_id, '">'; |
| 287 | + } |
|
| 280 | 288 | |
| 281 | 289 | echo ' |
| 282 | 290 | </form> |
@@ -287,17 +295,19 @@ discard block |
||
| 287 | 295 | if ($context['compact']) |
| 288 | 296 | { |
| 289 | 297 | // Quick moderation set to checkboxes? Oh, how fun :/. |
| 290 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 291 | - echo ' |
|
| 298 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 299 | + echo ' |
|
| 292 | 300 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="topicForm">'; |
| 301 | + } |
|
| 293 | 302 | |
| 294 | 303 | echo ' |
| 295 | 304 | <div class="cat_bar"> |
| 296 | 305 | <h3 class="catbg"> |
| 297 | 306 | <span class="floatright">'; |
| 298 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 299 | - echo ' |
|
| 307 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 308 | + echo ' |
|
| 300 | 309 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');">'; |
| 310 | + } |
|
| 301 | 311 | echo ' |
| 302 | 312 | </span> |
| 303 | 313 | <span class="generic_icons filter"></span> ', $txt['mlist_search_results'], ': ', $context['search_params']['search'], ' |
@@ -305,14 +315,15 @@ discard block |
||
| 305 | 315 | </div>'; |
| 306 | 316 | |
| 307 | 317 | // was anything even found? |
| 308 | - if (!empty($context['topics'])) |
|
| 309 | - echo' |
|
| 318 | + if (!empty($context['topics'])) { |
|
| 319 | + echo' |
|
| 310 | 320 | <div class="pagesection"> |
| 311 | 321 | <span>', $context['page_index'], '</span> |
| 312 | 322 | </div>'; |
| 313 | - else |
|
| 314 | - echo ' |
|
| 323 | + } else { |
|
| 324 | + echo ' |
|
| 315 | 325 | <div class="roundframe">', $txt['find_no_results'], '</div>'; |
| 326 | + } |
|
| 316 | 327 | |
| 317 | 328 | // while we have results to show ... |
| 318 | 329 | while ($topic = $context['get_topics']()) |
@@ -340,38 +351,43 @@ discard block |
||
| 340 | 351 | { |
| 341 | 352 | echo ' |
| 342 | 353 | <input type="checkbox" name="topics[]" value="', $topic['id'], '">'; |
| 343 | - } |
|
| 344 | - else |
|
| 354 | + } else |
|
| 345 | 355 | { |
| 346 | - if ($topic['quick_mod']['remove']) |
|
| 347 | - echo ' |
|
| 356 | + if ($topic['quick_mod']['remove']) { |
|
| 357 | + echo ' |
|
| 348 | 358 | <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>'; |
| 359 | + } |
|
| 349 | 360 | |
| 350 | - if ($topic['quick_mod']['lock']) |
|
| 351 | - echo ' |
|
| 361 | + if ($topic['quick_mod']['lock']) { |
|
| 362 | + echo ' |
|
| 352 | 363 | <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>'; |
| 364 | + } |
|
| 353 | 365 | |
| 354 | - if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
|
| 355 | - echo ' |
|
| 366 | + if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) { |
|
| 367 | + echo ' |
|
| 356 | 368 | <br>'; |
| 369 | + } |
|
| 357 | 370 | |
| 358 | - if ($topic['quick_mod']['sticky']) |
|
| 359 | - echo ' |
|
| 371 | + if ($topic['quick_mod']['sticky']) { |
|
| 372 | + echo ' |
|
| 360 | 373 | <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>'; |
| 374 | + } |
|
| 361 | 375 | |
| 362 | - if ($topic['quick_mod']['move']) |
|
| 363 | - echo ' |
|
| 376 | + if ($topic['quick_mod']['move']) { |
|
| 377 | + echo ' |
|
| 364 | 378 | <a href="', $scripturl, '?action=movetopic;topic=', $topic['id'], '.0"><span class="generic_icons move" title="', $txt['move_topic'], '"></span></a>'; |
| 379 | + } |
|
| 365 | 380 | } |
| 366 | 381 | |
| 367 | 382 | echo ' |
| 368 | 383 | </div>'; |
| 369 | 384 | } |
| 370 | 385 | |
| 371 | - if ($message['body_highlighted'] != '') |
|
| 372 | - echo ' |
|
| 386 | + if ($message['body_highlighted'] != '') { |
|
| 387 | + echo ' |
|
| 373 | 388 | <br class="clear"> |
| 374 | 389 | <div class="list_posts double_height">', $message['body_highlighted'], '</div>'; |
| 390 | + } |
|
| 375 | 391 | } |
| 376 | 392 | |
| 377 | 393 | echo ' |
@@ -379,11 +395,12 @@ discard block |
||
| 379 | 395 | </div>'; |
| 380 | 396 | |
| 381 | 397 | } |
| 382 | - if (!empty($context['topics'])) |
|
| 383 | - echo ' |
|
| 398 | + if (!empty($context['topics'])) { |
|
| 399 | + echo ' |
|
| 384 | 400 | <div class="pagesection"> |
| 385 | 401 | <span>', $context['page_index'], '</span> |
| 386 | 402 | </div>'; |
| 403 | + } |
|
| 387 | 404 | |
| 388 | 405 | if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) |
| 389 | 406 | { |
@@ -393,17 +410,19 @@ discard block |
||
| 393 | 410 | <select class="qaction" name="qaction"', $context['can_move'] ? ' onchange="this.form.move_to.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '> |
| 394 | 411 | <option value="">--------</option>'; |
| 395 | 412 | |
| 396 | - foreach ($context['qmod_actions'] as $qmod_action) |
|
| 397 | - if ($context['can_' . $qmod_action]) |
|
| 413 | + foreach ($context['qmod_actions'] as $qmod_action) { |
|
| 414 | + if ($context['can_' . $qmod_action]) |
|
| 398 | 415 | echo ' |
| 399 | 416 | <option value="' . $qmod_action . '">' . $txt['quick_mod_' . $qmod_action] . '</option>'; |
| 417 | + } |
|
| 400 | 418 | |
| 401 | 419 | echo ' |
| 402 | 420 | </select>'; |
| 403 | 421 | |
| 404 | - if ($context['can_move']) |
|
| 405 | - echo ' |
|
| 422 | + if ($context['can_move']) { |
|
| 423 | + echo ' |
|
| 406 | 424 | <span id="quick_mod_jump_to"> </span>'; |
| 425 | + } |
|
| 407 | 426 | |
| 408 | 427 | echo ' |
| 409 | 428 | <input type="hidden" name="redirect_url" value="', $scripturl . '?action=search2;params=' . $context['params'], '"> |
@@ -413,13 +432,13 @@ discard block |
||
| 413 | 432 | } |
| 414 | 433 | |
| 415 | 434 | |
| 416 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) |
|
| 417 | - echo ' |
|
| 435 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics'])) { |
|
| 436 | + echo ' |
|
| 418 | 437 | <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"> |
| 419 | 438 | </form>'; |
| 439 | + } |
|
| 420 | 440 | |
| 421 | - } |
|
| 422 | - else |
|
| 441 | + } else |
|
| 423 | 442 | { |
| 424 | 443 | echo ' |
| 425 | 444 | <div class="cat_bar"> |
@@ -431,9 +450,10 @@ discard block |
||
| 431 | 450 | <span>', $context['page_index'], '</span> |
| 432 | 451 | </div>'; |
| 433 | 452 | |
| 434 | - if (empty($context['topics'])) |
|
| 435 | - echo ' |
|
| 453 | + if (empty($context['topics'])) { |
|
| 454 | + echo ' |
|
| 436 | 455 | <div class="information">(', $txt['search_no_results'], ')</div>'; |
| 456 | + } |
|
| 437 | 457 | |
| 438 | 458 | while ($topic = $context['get_topics']()) |
| 439 | 459 | { |
@@ -448,23 +468,27 @@ discard block |
||
| 448 | 468 | </div> |
| 449 | 469 | <div class="list_posts">', $message['body_highlighted'], '</div>'; |
| 450 | 470 | |
| 451 | - if ($topic['can_reply']) |
|
| 452 | - echo ' |
|
| 471 | + if ($topic['can_reply']) { |
|
| 472 | + echo ' |
|
| 453 | 473 | <ul class="quickbuttons">'; |
| 474 | + } |
|
| 454 | 475 | |
| 455 | 476 | // If they *can* reply? |
| 456 | - if ($topic['can_reply']) |
|
| 457 | - echo ' |
|
| 477 | + if ($topic['can_reply']) { |
|
| 478 | + echo ' |
|
| 458 | 479 | <li><a href="', $scripturl . '?action=post;topic=' . $topic['id'] . '.' . $message['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>'; |
| 480 | + } |
|
| 459 | 481 | |
| 460 | 482 | // If they *can* quote? |
| 461 | - if ($topic['can_quote']) |
|
| 462 | - echo ' |
|
| 483 | + if ($topic['can_quote']) { |
|
| 484 | + echo ' |
|
| 463 | 485 | <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>'; |
| 486 | + } |
|
| 464 | 487 | |
| 465 | - if ($topic['can_reply']) |
|
| 466 | - echo ' |
|
| 488 | + if ($topic['can_reply']) { |
|
| 489 | + echo ' |
|
| 467 | 490 | </ul>'; |
| 491 | + } |
|
| 468 | 492 | echo ' |
| 469 | 493 | <br class="clear"> |
| 470 | 494 | </div>'; |
@@ -483,8 +507,8 @@ discard block |
||
| 483 | 507 | <div class="smalltext righttext" id="search_jump_to"> </div> |
| 484 | 508 | <script>'; |
| 485 | 509 | |
| 486 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) |
|
| 487 | - echo ' |
|
| 510 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) { |
|
| 511 | + echo ' |
|
| 488 | 512 | if (typeof(window.XMLHttpRequest) != "undefined") |
| 489 | 513 | aJumpTo[aJumpTo.length] = new JumpTo({ |
| 490 | 514 | sContainerId: "quick_mod_jump_to", |
@@ -499,6 +523,7 @@ discard block |
||
| 499 | 523 | bDisabled: true, |
| 500 | 524 | sCustomName: "move_to" |
| 501 | 525 | });'; |
| 526 | + } |
|
| 502 | 527 | |
| 503 | 528 | echo ' |
| 504 | 529 | if (typeof(window.XMLHttpRequest) != "undefined") |
@@ -28,13 +28,14 @@ discard block |
||
| 28 | 28 | <div id="confirm_buttons">'; |
| 29 | 29 | |
| 30 | 30 | // Age restriction in effect? |
| 31 | - if ($context['show_coppa']) |
|
| 32 | - echo ' |
|
| 31 | + if ($context['show_coppa']) { |
|
| 32 | + echo ' |
|
| 33 | 33 | <input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button"><br><br> |
| 34 | 34 | <input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button">'; |
| 35 | - else |
|
| 36 | - echo ' |
|
| 35 | + } else { |
|
| 36 | + echo ' |
|
| 37 | 37 | <input type="submit" name="accept_agreement" value="', $txt['agreement_agree'], '" class="button">'; |
| 38 | + } |
|
| 38 | 39 | |
| 39 | 40 | echo ' |
| 40 | 41 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -77,9 +78,10 @@ discard block |
||
| 77 | 78 | <ul>'; |
| 78 | 79 | |
| 79 | 80 | // Cycle through each error and display an error message. |
| 80 | - foreach ($context['registration_errors'] as $error) |
|
| 81 | - echo ' |
|
| 81 | + foreach ($context['registration_errors'] as $error) { |
|
| 82 | + echo ' |
|
| 82 | 83 | <li>', $error, '</li>'; |
| 84 | + } |
|
| 83 | 85 | |
| 84 | 86 | echo ' |
| 85 | 87 | </ul> |
@@ -143,14 +145,15 @@ discard block |
||
| 143 | 145 | |
| 144 | 146 | <dl class="register_form">'; |
| 145 | 147 | |
| 146 | - foreach ($context['custom_fields'] as $field) |
|
| 147 | - if ($field['show_reg'] > 1) |
|
| 148 | + foreach ($context['custom_fields'] as $field) { |
|
| 149 | + if ($field['show_reg'] > 1) |
|
| 148 | 150 | echo ' |
| 149 | 151 | <dt> |
| 150 | 152 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong> |
| 151 | 153 | <span class="smalltext">', $field['desc'], '</span> |
| 152 | 154 | </dt> |
| 153 | 155 | <dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>'; |
| 156 | + } |
|
| 154 | 157 | |
| 155 | 158 | echo ' |
| 156 | 159 | </dl>'; |
@@ -184,41 +187,45 @@ discard block |
||
| 184 | 187 | $callback_func = 'template_profile_' . $field['callback_func']; |
| 185 | 188 | $callback_func(); |
| 186 | 189 | } |
| 187 | - } |
|
| 188 | - else |
|
| 190 | + } else |
|
| 189 | 191 | { |
| 190 | 192 | echo ' |
| 191 | 193 | <dt> |
| 192 | 194 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['label'], ':</strong>'; |
| 193 | 195 | |
| 194 | 196 | // Does it have any subtext to show? |
| 195 | - if (!empty($field['subtext'])) |
|
| 196 | - echo ' |
|
| 197 | + if (!empty($field['subtext'])) { |
|
| 198 | + echo ' |
|
| 197 | 199 | <span class="smalltext">', $field['subtext'], '</span>'; |
| 200 | + } |
|
| 198 | 201 | |
| 199 | 202 | echo ' |
| 200 | 203 | </dt> |
| 201 | 204 | <dd>'; |
| 202 | 205 | |
| 203 | 206 | // Want to put something infront of the box? |
| 204 | - if (!empty($field['preinput'])) |
|
| 205 | - echo ' |
|
| 207 | + if (!empty($field['preinput'])) { |
|
| 208 | + echo ' |
|
| 206 | 209 | ', $field['preinput']; |
| 210 | + } |
|
| 207 | 211 | |
| 208 | 212 | // What type of data are we showing? |
| 209 | - if ($field['type'] == 'label') |
|
| 210 | - echo ' |
|
| 213 | + if ($field['type'] == 'label') { |
|
| 214 | + echo ' |
|
| 211 | 215 | ', $field['value']; |
| 216 | + } |
|
| 212 | 217 | |
| 213 | 218 | // Maybe it's a text box - very likely! |
| 214 | - elseif (in_array($field['type'], array('int', 'float', 'text', 'password'))) |
|
| 215 | - echo ' |
|
| 219 | + elseif (in_array($field['type'], array('int', 'float', 'text', 'password'))) { |
|
| 220 | + echo ' |
|
| 216 | 221 | <input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>'; |
| 222 | + } |
|
| 217 | 223 | |
| 218 | 224 | // You "checking" me out? ;) |
| 219 | - elseif ($field['type'] == 'check') |
|
| 220 | - echo ' |
|
| 225 | + elseif ($field['type'] == 'check') { |
|
| 226 | + echo ' |
|
| 221 | 227 | <input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>'; |
| 228 | + } |
|
| 222 | 229 | |
| 223 | 230 | // Always fun - select boxes! |
| 224 | 231 | elseif ($field['type'] == 'select') |
@@ -229,13 +236,15 @@ discard block |
||
| 229 | 236 | if (isset($field['options'])) |
| 230 | 237 | { |
| 231 | 238 | // Is this some code to generate the options? |
| 232 | - if (!is_array($field['options'])) |
|
| 233 | - $field['options'] = eval($field['options']); |
|
| 239 | + if (!is_array($field['options'])) { |
|
| 240 | + $field['options'] = eval($field['options']); |
|
| 241 | + } |
|
| 234 | 242 | // Assuming we now have some! |
| 235 | - if (is_array($field['options'])) |
|
| 236 | - foreach ($field['options'] as $value => $name) |
|
| 243 | + if (is_array($field['options'])) { |
|
| 244 | + foreach ($field['options'] as $value => $name) |
|
| 237 | 245 | echo ' |
| 238 | 246 | <option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
| 247 | + } |
|
| 239 | 248 | } |
| 240 | 249 | |
| 241 | 250 | echo ' |
@@ -243,9 +252,10 @@ discard block |
||
| 243 | 252 | } |
| 244 | 253 | |
| 245 | 254 | // Something to end with? |
| 246 | - if (!empty($field['postinput'])) |
|
| 247 | - echo ' |
|
| 255 | + if (!empty($field['postinput'])) { |
|
| 256 | + echo ' |
|
| 248 | 257 | ', $field['postinput']; |
| 258 | + } |
|
| 249 | 259 | |
| 250 | 260 | echo ' |
| 251 | 261 | </dd>'; |
@@ -258,13 +268,14 @@ discard block |
||
| 258 | 268 | { |
| 259 | 269 | foreach ($context['custom_fields'] as $field) |
| 260 | 270 | { |
| 261 | - if ($field['show_reg'] < 2) |
|
| 262 | - echo ' |
|
| 271 | + if ($field['show_reg'] < 2) { |
|
| 272 | + echo ' |
|
| 263 | 273 | <dt> |
| 264 | 274 | <strong', !empty($field['is_error']) ? ' class="red"' : '', '>', $field['name'], ':</strong> |
| 265 | 275 | <span class="smalltext">', $field['desc'], '</span> |
| 266 | 276 | </dt> |
| 267 | 277 | <dd>', $field['input_html'], '</dd>'; |
| 278 | + } |
|
| 268 | 279 | } |
| 269 | 280 | } |
| 270 | 281 | |
@@ -294,13 +305,14 @@ discard block |
||
| 294 | 305 | <div id="confirm_buttons" class="flow_auto">'; |
| 295 | 306 | |
| 296 | 307 | // Age restriction in effect? |
| 297 | - if (!$context['require_agreement'] && $context['show_coppa']) |
|
| 298 | - echo ' |
|
| 308 | + if (!$context['require_agreement'] && $context['show_coppa']) { |
|
| 309 | + echo ' |
|
| 299 | 310 | <input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button"><br><br> |
| 300 | 311 | <input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button">'; |
| 301 | - else |
|
| 302 | - echo ' |
|
| 312 | + } else { |
|
| 313 | + echo ' |
|
| 303 | 314 | <input type="submit" name="regSubmit" value="', $txt['register'], '" tabindex="', $context['tabindex']++, '" class="button">'; |
| 315 | + } |
|
| 304 | 316 | echo ' |
| 305 | 317 | </div> |
| 306 | 318 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -445,19 +457,20 @@ discard block |
||
| 445 | 457 | </head> |
| 446 | 458 | <body style="margin: 1ex;"> |
| 447 | 459 | <div class="windowbg description" style="text-align: center;">'; |
| 448 | - if (isBrowser('is_ie') || isBrowser('is_ie11')) |
|
| 449 | - echo ' |
|
| 460 | + if (isBrowser('is_ie') || isBrowser('is_ie11')) { |
|
| 461 | + echo ' |
|
| 450 | 462 | <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="audio/x-wav"> |
| 451 | 463 | <param name="AutoStart" value="1"> |
| 452 | 464 | <param name="FileName" value="', $context['verification_sound_href'], '"> |
| 453 | 465 | </object>'; |
| 454 | - else |
|
| 455 | - echo ' |
|
| 466 | + } else { |
|
| 467 | + echo ' |
|
| 456 | 468 | <audio src="', $context['verification_sound_href'], '" controls> |
| 457 | 469 | <object type="audio/x-wav" data="', $context['verification_sound_href'], '"> |
| 458 | 470 | <a href="', $context['verification_sound_href'], '" rel="nofollow">', $context['verification_sound_href'], '</a> |
| 459 | 471 | </object> |
| 460 | 472 | </audio>'; |
| 473 | + } |
|
| 461 | 474 | echo ' |
| 462 | 475 | <br> |
| 463 | 476 | <a href="', $context['verification_sound_href'], ';sound" rel="nofollow">', $txt['visual_verification_sound_again'], '</a><br> |
@@ -484,11 +497,12 @@ discard block |
||
| 484 | 497 | </div> |
| 485 | 498 | <div id="register_screen" class="windowbg2 noup">'; |
| 486 | 499 | |
| 487 | - if (!empty($context['registration_done'])) |
|
| 488 | - echo ' |
|
| 500 | + if (!empty($context['registration_done'])) { |
|
| 501 | + echo ' |
|
| 489 | 502 | <div class="infobox"> |
| 490 | 503 | ', $context['registration_done'], ' |
| 491 | 504 | </div>'; |
| 505 | + } |
|
| 492 | 506 | |
| 493 | 507 | echo ' |
| 494 | 508 | <dl class="register_form" id="admin_register_form"> |
@@ -524,9 +538,10 @@ discard block |
||
| 524 | 538 | <dd> |
| 525 | 539 | <select name="group" id="group_select" tabindex="', $context['tabindex']++, '">'; |
| 526 | 540 | |
| 527 | - foreach ($context['member_groups'] as $id => $name) |
|
| 528 | - echo ' |
|
| 541 | + foreach ($context['member_groups'] as $id => $name) { |
|
| 542 | + echo ' |
|
| 529 | 543 | <option value="', $id, '">', $name, '</option>'; |
| 544 | + } |
|
| 530 | 545 | |
| 531 | 546 | echo ' |
| 532 | 547 | </select> |
@@ -534,8 +549,8 @@ discard block |
||
| 534 | 549 | } |
| 535 | 550 | |
| 536 | 551 | // If there is any field marked as required, show it here! |
| 537 | - if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) |
|
| 538 | - foreach ($context['custom_fields'] as $field) |
|
| 552 | + if (!empty($context['custom_fields_required']) && !empty($context['custom_fields'])) { |
|
| 553 | + foreach ($context['custom_fields'] as $field) |
|
| 539 | 554 | if ($field['show_reg'] > 1) |
| 540 | 555 | echo ' |
| 541 | 556 | <dt> |
@@ -543,6 +558,7 @@ discard block |
||
| 543 | 558 | <span class="smalltext">', $field['desc'], '</span> |
| 544 | 559 | </dt> |
| 545 | 560 | <dd>', str_replace('name="', 'tabindex="' . $context['tabindex']++ . '" name="', $field['input_html']), '</dd>'; |
| 561 | + } |
|
| 546 | 562 | |
| 547 | 563 | echo ' |
| 548 | 564 | <dt> |
@@ -579,12 +595,13 @@ discard block |
||
| 579 | 595 | { |
| 580 | 596 | global $context, $scripturl, $txt; |
| 581 | 597 | |
| 582 | - if (!empty($context['saved_successful'])) |
|
| 583 | - echo ' |
|
| 598 | + if (!empty($context['saved_successful'])) { |
|
| 599 | + echo ' |
|
| 584 | 600 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 585 | - elseif (!empty($context['could_not_save'])) |
|
| 586 | - echo ' |
|
| 601 | + } elseif (!empty($context['could_not_save'])) { |
|
| 602 | + echo ' |
|
| 587 | 603 | <div class="errorbox">', $txt['admin_agreement_not_saved'], '</div>'; |
| 604 | + } |
|
| 588 | 605 | |
| 589 | 606 | // Just a big box to edit the text file ;). |
| 590 | 607 | echo ' |
@@ -594,9 +611,10 @@ discard block |
||
| 594 | 611 | </div>'; |
| 595 | 612 | |
| 596 | 613 | // Warning for if the file isn't writable. |
| 597 | - if (!empty($context['warning'])) |
|
| 598 | - echo ' |
|
| 614 | + if (!empty($context['warning'])) { |
|
| 615 | + echo ' |
|
| 599 | 616 | <p class="error">', $context['warning'], '</p>'; |
| 617 | + } |
|
| 600 | 618 | |
| 601 | 619 | echo ' |
| 602 | 620 | <div class="windowbg2 noup" id="registration_agreement">'; |
@@ -613,9 +631,10 @@ discard block |
||
| 613 | 631 | <strong>', $txt['admin_agreement_select_language'], ':</strong> |
| 614 | 632 | <select name="agree_lang" onchange="document.getElementById(\'change_reg\').submit();" tabindex="', $context['tabindex']++, '">'; |
| 615 | 633 | |
| 616 | - foreach ($context['editable_agreements'] as $file => $name) |
|
| 617 | - echo ' |
|
| 634 | + foreach ($context['editable_agreements'] as $file => $name) { |
|
| 635 | + echo ' |
|
| 618 | 636 | <option value="', $file, '"', $context['current_agreement'] == $file ? ' selected' : '', '>', $name, '</option>'; |
| 637 | + } |
|
| 619 | 638 | |
| 620 | 639 | echo ' |
| 621 | 640 | </select> |
@@ -655,9 +674,10 @@ discard block |
||
| 655 | 674 | { |
| 656 | 675 | global $context, $scripturl, $txt; |
| 657 | 676 | |
| 658 | - if (!empty($context['saved_successful'])) |
|
| 659 | - echo ' |
|
| 677 | + if (!empty($context['saved_successful'])) { |
|
| 678 | + echo ' |
|
| 660 | 679 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 680 | + } |
|
| 661 | 681 | |
| 662 | 682 | echo ' |
| 663 | 683 | <form id="admin_form_wrapper" action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '"> |
@@ -26,9 +26,10 @@ discard block |
||
| 26 | 26 | <div class="cat_bar"> |
| 27 | 27 | <h3 class="catbg"> |
| 28 | 28 | <span class="floatleft">', $txt['members_list'], '</span>'; |
| 29 | - if (!isset($context['old_search'])) |
|
| 30 | - echo ' |
|
| 29 | + if (!isset($context['old_search'])) { |
|
| 30 | + echo ' |
|
| 31 | 31 | <span class="floatright">', $context['letter_links'], '</span>'; |
| 32 | + } |
|
| 32 | 33 | echo ' |
| 33 | 34 | </h3> |
| 34 | 35 | </div>'; |
@@ -43,19 +44,22 @@ discard block |
||
| 43 | 44 | foreach ($context['columns'] as $key => $column) |
| 44 | 45 | { |
| 45 | 46 | // @TODO maybe find something nicer? |
| 46 | - if ($key == 'email_address' && !$context['can_send_email']) |
|
| 47 | - continue; |
|
| 47 | + if ($key == 'email_address' && !$context['can_send_email']) { |
|
| 48 | + continue; |
|
| 49 | + } |
|
| 48 | 50 | |
| 49 | 51 | // This is a selected column, so underline it or some such. |
| 50 | - if ($column['selected']) |
|
| 51 | - echo ' |
|
| 52 | + if ($column['selected']) { |
|
| 53 | + echo ' |
|
| 52 | 54 | <th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', ' selected" style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . '> |
| 53 | 55 | <a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . '</a><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></th>'; |
| 56 | + } |
|
| 54 | 57 | // This is just some column... show the link and be done with it. |
| 55 | - else |
|
| 56 | - echo ' |
|
| 58 | + else { |
|
| 59 | + echo ' |
|
| 57 | 60 | <th scope="col" class="', $key, isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' style="width: ' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '> |
| 58 | 61 | ', $column['link'], '</th>'; |
| 62 | + } |
|
| 59 | 63 | } |
| 60 | 64 | echo ' |
| 61 | 65 | </tr> |
@@ -74,9 +78,10 @@ discard block |
||
| 74 | 78 | </td> |
| 75 | 79 | <td class="lefttext">', $member['link'], '</td>'; |
| 76 | 80 | |
| 77 | - if (!isset($context['disabled_fields']['website'])) |
|
| 78 | - echo ' |
|
| 81 | + if (!isset($context['disabled_fields']['website'])) { |
|
| 82 | + echo ' |
|
| 79 | 83 | <td class="centertext website_url">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank"><span class="generic_icons www" title="' . $member['website']['title'] . '"></span></a>' : '', '</td>'; |
| 84 | + } |
|
| 80 | 85 | |
| 81 | 86 | // Group and date. |
| 82 | 87 | echo ' |
@@ -89,11 +94,12 @@ discard block |
||
| 89 | 94 | <td class="centertext" style="white-space: nowrap; width: 15px">', $member['posts'], '</td> |
| 90 | 95 | <td class="centertext statsbar" style="width: 120px">'; |
| 91 | 96 | |
| 92 | - if (!empty($member['post_percent'])) |
|
| 93 | - echo ' |
|
| 97 | + if (!empty($member['post_percent'])) { |
|
| 98 | + echo ' |
|
| 94 | 99 | <div class="bar" style="width: ', $member['post_percent'] + 4, 'px;"> |
| 95 | 100 | <div style="width: ', $member['post_percent'], 'px;"></div> |
| 96 | 101 | </div>'; |
| 102 | + } |
|
| 97 | 103 | |
| 98 | 104 | echo ' |
| 99 | 105 | </td>'; |
@@ -102,9 +108,10 @@ discard block |
||
| 102 | 108 | // Show custom fields marked to be shown here |
| 103 | 109 | if (!empty($context['custom_profile_fields']['columns'])) |
| 104 | 110 | { |
| 105 | - foreach ($context['custom_profile_fields']['columns'] as $key => $column) |
|
| 106 | - echo ' |
|
| 111 | + foreach ($context['custom_profile_fields']['columns'] as $key => $column) { |
|
| 112 | + echo ' |
|
| 107 | 113 | <td class="righttext">', $member['options'][$key], '</td>'; |
| 114 | + } |
|
| 108 | 115 | } |
| 109 | 116 | |
| 110 | 117 | echo ' |
@@ -112,11 +119,12 @@ discard block |
||
| 112 | 119 | } |
| 113 | 120 | } |
| 114 | 121 | // No members? |
| 115 | - else |
|
| 116 | - echo ' |
|
| 122 | + else { |
|
| 123 | + echo ' |
|
| 117 | 124 | <tr> |
| 118 | 125 | <td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td> |
| 119 | 126 | </tr>'; |
| 127 | + } |
|
| 120 | 128 | |
| 121 | 129 | echo ' |
| 122 | 130 | </tbody> |
@@ -129,9 +137,10 @@ discard block |
||
| 129 | 137 | <div class="pagelinks floatleft">', $context['page_index'], '</div>'; |
| 130 | 138 | |
| 131 | 139 | // If it is displaying the result of a search show a "search again" link to edit their criteria. |
| 132 | - if (isset($context['old_search'])) |
|
| 133 | - echo ' |
|
| 140 | + if (isset($context['old_search'])) { |
|
| 141 | + echo ' |
|
| 134 | 142 | <a class="button" href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>'; |
| 143 | + } |
|
| 135 | 144 | echo ' |
| 136 | 145 | </div> |
| 137 | 146 | </div>'; |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | <h3 class="catbg">', $context['page_title'], '</h3> |
| 47 | 47 | </div>'; |
| 48 | 48 | |
| 49 | - if (!empty($context['poll_error']['messages'])) |
|
| 50 | - echo ' |
|
| 49 | + if (!empty($context['poll_error']['messages'])) { |
|
| 50 | + echo ' |
|
| 51 | 51 | <div class="errorbox"> |
| 52 | 52 | <dl class="poll_error"> |
| 53 | 53 | <dt> |
@@ -58,6 +58,7 @@ discard block |
||
| 58 | 58 | </dt> |
| 59 | 59 | </dl> |
| 60 | 60 | </div>'; |
| 61 | + } |
|
| 61 | 62 | |
| 62 | 63 | echo ' |
| 63 | 64 | <div> |
@@ -79,8 +80,9 @@ discard block |
||
| 79 | 80 | <input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" size="80" maxlength="255">'; |
| 80 | 81 | |
| 81 | 82 | // Does this option have a vote count yet, or is it new? |
| 82 | - if ($choice['votes'] != -1) |
|
| 83 | - echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; |
|
| 83 | + if ($choice['votes'] != -1) { |
|
| 84 | + echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; |
|
| 85 | + } |
|
| 84 | 86 | |
| 85 | 87 | echo ' |
| 86 | 88 | </dd>'; |
@@ -118,14 +120,15 @@ discard block |
||
| 118 | 120 | <input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', '> |
| 119 | 121 | </dd>'; |
| 120 | 122 | |
| 121 | - if ($context['poll']['guest_vote_allowed']) |
|
| 122 | - echo ' |
|
| 123 | + if ($context['poll']['guest_vote_allowed']) { |
|
| 124 | + echo ' |
|
| 123 | 125 | <dt> |
| 124 | 126 | <label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label> |
| 125 | 127 | </dt> |
| 126 | 128 | <dd> |
| 127 | 129 | <input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll']['guest_vote']) ? ' checked' : '', '> |
| 128 | 130 | </dd>'; |
| 131 | + } |
|
| 129 | 132 | } |
| 130 | 133 | |
| 131 | 134 | echo ' |
@@ -140,12 +143,13 @@ discard block |
||
| 140 | 143 | </dl> |
| 141 | 144 | </fieldset>'; |
| 142 | 145 | // If this is an edit, we can allow them to reset the vote counts. |
| 143 | - if ($context['is_edit']) |
|
| 144 | - echo ' |
|
| 146 | + if ($context['is_edit']) { |
|
| 147 | + echo ' |
|
| 145 | 148 | <fieldset id="poll_reset"> |
| 146 | 149 | <legend>', $txt['reset_votes'], '</legend> |
| 147 | 150 | <input type="checkbox" name="resetVoteCount" value="on"> ' . $txt['reset_votes_check'] . ' |
| 148 | 151 | </fieldset>'; |
| 152 | + } |
|
| 149 | 153 | echo ' |
| 150 | 154 | <input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button"> |
| 151 | 155 | </div> |
@@ -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' : '', '> <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', '> |
| 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"> |
| 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">'; |
| 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"> |
@@ -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' : '', ' 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"></dd>'; |
| 60 | + } |
|
| 58 | 61 | echo ' |
| 59 | 62 | </dl> |
| 60 | 63 | <p><input type="submit" value="', $txt['login'], '" class="button"></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"></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"></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"></dd> |
| 397 | 407 | </dl>'; |
| 408 | + } |
|
| 398 | 409 | |
| 399 | 410 | echo ' |
| 400 | 411 | <p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button"></p> |
@@ -64,9 +64,10 @@ discard block |
||
| 64 | 64 | <strong>', $txt['administrators'], ':</strong> |
| 65 | 65 | ', implode(', ', $context['administrators']); |
| 66 | 66 | // If we have lots of admins... don't show them all. |
| 67 | - if (!empty($context['more_admins_link'])) |
|
| 68 | - echo ' |
|
| 67 | + if (!empty($context['more_admins_link'])) { |
|
| 68 | + echo ' |
|
| 69 | 69 | (', $context['more_admins_link'], ')'; |
| 70 | + } |
|
| 70 | 71 | |
| 71 | 72 | echo ' |
| 72 | 73 | </div> |
@@ -83,16 +84,18 @@ discard block |
||
| 83 | 84 | foreach ($area['areas'] as $item_id => $item) |
| 84 | 85 | { |
| 85 | 86 | // No point showing the 'home' page here, we're already on it! |
| 86 | - if ($area_id == 'forum' && $item_id == 'index') |
|
| 87 | - continue; |
|
| 87 | + if ($area_id == 'forum' && $item_id == 'index') { |
|
| 88 | + continue; |
|
| 89 | + } |
|
| 88 | 90 | |
| 89 | 91 | $url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : ''); |
| 90 | - if (!empty($item['icon_file'])) |
|
| 91 | - echo ' |
|
| 92 | + if (!empty($item['icon_file'])) { |
|
| 93 | + echo ' |
|
| 92 | 94 | <a href="', $url, '" class="admin_group', !empty($item['inactive']) ? ' inactive' : '', '"><img class="large_admin_menu_icon_file" src="', $item['icon_file'], '" alt="">', $item['label'], '</a>'; |
| 93 | - else |
|
| 94 | - echo ' |
|
| 95 | + } else { |
|
| 96 | + echo ' |
|
| 95 | 97 | <a href="', $url, '"><span class="large_', $item['icon_class'], !empty($item['inactive']) ? ' inactive' : '', '"></span>', $item['label'], '</a>'; |
| 98 | + } |
|
| 96 | 99 | } |
| 97 | 100 | |
| 98 | 101 | echo ' |
@@ -103,10 +106,11 @@ discard block |
||
| 103 | 106 | </div>'; |
| 104 | 107 | |
| 105 | 108 | // The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization. |
| 106 | - if (empty($modSettings['disable_smf_js'])) |
|
| 107 | - echo ' |
|
| 109 | + if (empty($modSettings['disable_smf_js'])) { |
|
| 110 | + echo ' |
|
| 108 | 111 | <script src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script> |
| 109 | 112 | <script src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>'; |
| 113 | + } |
|
| 110 | 114 | |
| 111 | 115 | // This sets the announcements and current versions themselves ;). |
| 112 | 116 | echo ' |
@@ -185,9 +189,10 @@ discard block |
||
| 185 | 189 | <em>', $version['version'], '</em>'; |
| 186 | 190 | |
| 187 | 191 | // more details for this item, show them a link |
| 188 | - if ($context['can_admin'] && isset($version['more'])) |
|
| 189 | - echo |
|
| 192 | + if ($context['can_admin'] && isset($version['more'])) { |
|
| 193 | + echo |
|
| 190 | 194 | ' <a href="', $scripturl, $version['more'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['version_check_more'], '</a>'; |
| 195 | + } |
|
| 191 | 196 | echo ' |
| 192 | 197 | <br>'; |
| 193 | 198 | } |
@@ -218,20 +223,22 @@ discard block |
||
| 218 | 223 | |
| 219 | 224 | foreach ($context['credits'] as $section) |
| 220 | 225 | { |
| 221 | - if (isset($section['pretext'])) |
|
| 222 | - echo ' |
|
| 226 | + if (isset($section['pretext'])) { |
|
| 227 | + echo ' |
|
| 223 | 228 | <p>', $section['pretext'], '</p><hr>'; |
| 229 | + } |
|
| 224 | 230 | |
| 225 | 231 | echo ' |
| 226 | 232 | <dl>'; |
| 227 | 233 | |
| 228 | 234 | foreach ($section['groups'] as $group) |
| 229 | 235 | { |
| 230 | - if (isset($group['title'])) |
|
| 231 | - echo ' |
|
| 236 | + if (isset($group['title'])) { |
|
| 237 | + echo ' |
|
| 232 | 238 | <dt> |
| 233 | 239 | <strong>', $group['title'], ':</strong> |
| 234 | 240 | </dt>'; |
| 241 | + } |
|
| 235 | 242 | |
| 236 | 243 | echo ' |
| 237 | 244 | <dd>', implode(', ', $group['members']), '</dd>'; |
@@ -240,10 +247,11 @@ discard block |
||
| 240 | 247 | echo ' |
| 241 | 248 | </dl>'; |
| 242 | 249 | |
| 243 | - if (isset($section['posttext'])) |
|
| 244 | - echo ' |
|
| 250 | + if (isset($section['posttext'])) { |
|
| 251 | + echo ' |
|
| 245 | 252 | <hr> |
| 246 | 253 | <p>', $section['posttext'], '</p>'; |
| 254 | + } |
|
| 247 | 255 | } |
| 248 | 256 | |
| 249 | 257 | echo ' |
@@ -259,9 +267,10 @@ discard block |
||
| 259 | 267 | smfSupportVersions.forum = "', $context['forum_version'], '";'; |
| 260 | 268 | |
| 261 | 269 | // Don't worry, none of this is logged, it's just used to give information that might be of use. |
| 262 | - foreach ($context['current_versions'] as $variable => $version) |
|
| 263 | - echo ' |
|
| 270 | + foreach ($context['current_versions'] as $variable => $version) { |
|
| 271 | + echo ' |
|
| 264 | 272 | smfSupportVersions.', $variable, ' = "', $version['version'], '";'; |
| 273 | + } |
|
| 265 | 274 | |
| 266 | 275 | // Now we just have to include the script and wait ;). |
| 267 | 276 | echo ' |
@@ -358,8 +367,8 @@ discard block |
||
| 358 | 367 | <tbody>'; |
| 359 | 368 | |
| 360 | 369 | // Loop through every source file displaying its version - using javascript. |
| 361 | - foreach ($context['file_versions'] as $filename => $version) |
|
| 362 | - echo ' |
|
| 370 | + foreach ($context['file_versions'] as $filename => $version) { |
|
| 371 | + echo ' |
|
| 363 | 372 | <tr class="windowbg"> |
| 364 | 373 | <td class="half_table"> |
| 365 | 374 | ', $filename, ' |
@@ -371,6 +380,7 @@ discard block |
||
| 371 | 380 | <em id="currentSources', $filename, '">??</em> |
| 372 | 381 | </td> |
| 373 | 382 | </tr>'; |
| 383 | + } |
|
| 374 | 384 | |
| 375 | 385 | // Default template files. |
| 376 | 386 | echo ' |
@@ -396,8 +406,8 @@ discard block |
||
| 396 | 406 | <table id="Default" class="table_grid"> |
| 397 | 407 | <tbody>'; |
| 398 | 408 | |
| 399 | - foreach ($context['default_template_versions'] as $filename => $version) |
|
| 400 | - echo ' |
|
| 409 | + foreach ($context['default_template_versions'] as $filename => $version) { |
|
| 410 | + echo ' |
|
| 401 | 411 | <tr class="windowbg"> |
| 402 | 412 | <td class="half_table"> |
| 403 | 413 | ', $filename, ' |
@@ -409,6 +419,7 @@ discard block |
||
| 409 | 419 | <em id="currentDefault', $filename, '">??</em> |
| 410 | 420 | </td> |
| 411 | 421 | </tr>'; |
| 422 | + } |
|
| 412 | 423 | |
| 413 | 424 | // Now the language files... |
| 414 | 425 | echo ' |
@@ -436,8 +447,8 @@ discard block |
||
| 436 | 447 | |
| 437 | 448 | foreach ($context['default_language_versions'] as $language => $files) |
| 438 | 449 | { |
| 439 | - foreach ($files as $filename => $version) |
|
| 440 | - echo ' |
|
| 450 | + foreach ($files as $filename => $version) { |
|
| 451 | + echo ' |
|
| 441 | 452 | <tr class="windowbg"> |
| 442 | 453 | <td class="half_table"> |
| 443 | 454 | ', $filename, '.<em>', $language, '</em>.php |
@@ -449,6 +460,7 @@ discard block |
||
| 449 | 460 | <em id="current', $filename, '.', $language, '">??</em> |
| 450 | 461 | </td> |
| 451 | 462 | </tr>'; |
| 463 | + } |
|
| 452 | 464 | } |
| 453 | 465 | |
| 454 | 466 | echo ' |
@@ -478,8 +490,8 @@ discard block |
||
| 478 | 490 | <table id="Templates" class="table_grid"> |
| 479 | 491 | <tbody>'; |
| 480 | 492 | |
| 481 | - foreach ($context['template_versions'] as $filename => $version) |
|
| 482 | - echo ' |
|
| 493 | + foreach ($context['template_versions'] as $filename => $version) { |
|
| 494 | + echo ' |
|
| 483 | 495 | <tr class="windowbg"> |
| 484 | 496 | <td class="half_table"> |
| 485 | 497 | ', $filename, ' |
@@ -491,6 +503,7 @@ discard block |
||
| 491 | 503 | <em id="currentTemplates', $filename, '">??</em> |
| 492 | 504 | </td> |
| 493 | 505 | </tr>'; |
| 506 | + } |
|
| 494 | 507 | |
| 495 | 508 | echo ' |
| 496 | 509 | </tbody> |
@@ -520,8 +533,8 @@ discard block |
||
| 520 | 533 | <table id="Tasks" class="table_grid"> |
| 521 | 534 | <tbody>'; |
| 522 | 535 | |
| 523 | - foreach ($context['tasks_versions'] as $filename => $version) |
|
| 524 | - echo ' |
|
| 536 | + foreach ($context['tasks_versions'] as $filename => $version) { |
|
| 537 | + echo ' |
|
| 525 | 538 | <tr class="windowbg"> |
| 526 | 539 | <td class="half_table"> |
| 527 | 540 | ', $filename, ' |
@@ -533,6 +546,7 @@ discard block |
||
| 533 | 546 | <em id="currentTasks', $filename, '">??</em> |
| 534 | 547 | </td> |
| 535 | 548 | </tr>'; |
| 549 | + } |
|
| 536 | 550 | |
| 537 | 551 | echo ' |
| 538 | 552 | </tbody> |
@@ -574,9 +588,10 @@ discard block |
||
| 574 | 588 | { |
| 575 | 589 | global $context, $scripturl, $txt, $modSettings; |
| 576 | 590 | |
| 577 | - if (!empty($context['saved_successful'])) |
|
| 578 | - echo ' |
|
| 591 | + if (!empty($context['saved_successful'])) { |
|
| 592 | + echo ' |
|
| 579 | 593 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 594 | + } |
|
| 580 | 595 | |
| 581 | 596 | // First section is for adding/removing words from the censored list. |
| 582 | 597 | echo ' |
@@ -591,11 +606,12 @@ discard block |
||
| 591 | 606 | <p>', $txt['admin_censored_where'], '</p>'; |
| 592 | 607 | |
| 593 | 608 | // Show text boxes for censoring [bad ] => [good ]. |
| 594 | - foreach ($context['censored_words'] as $vulgar => $proper) |
|
| 595 | - echo ' |
|
| 609 | + foreach ($context['censored_words'] as $vulgar => $proper) { |
|
| 610 | + echo ' |
|
| 596 | 611 | <div class="block"> |
| 597 | 612 | <input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30"> => <input type="text" name="censor_proper[]" value="', $proper, '" size="30"> |
| 598 | 613 | </div>'; |
| 614 | + } |
|
| 599 | 615 | |
| 600 | 616 | // Now provide a way to censor more words. |
| 601 | 617 | echo ' |
@@ -669,19 +685,21 @@ discard block |
||
| 669 | 685 | <div class="windowbg2 noup"> |
| 670 | 686 | ', $txt['not_done_reason']; |
| 671 | 687 | |
| 672 | - if (!empty($context['continue_percent'])) |
|
| 673 | - echo ' |
|
| 688 | + if (!empty($context['continue_percent'])) { |
|
| 689 | + echo ' |
|
| 674 | 690 | <div class="progress_bar"> |
| 675 | 691 | <div class="full_bar">', $context['continue_percent'], '%</div> |
| 676 | 692 | <div class="green_percent" style="width: ', $context['continue_percent'], '%;"> </div> |
| 677 | 693 | </div>'; |
| 694 | + } |
|
| 678 | 695 | |
| 679 | - if (!empty($context['substep_enabled'])) |
|
| 680 | - echo ' |
|
| 696 | + if (!empty($context['substep_enabled'])) { |
|
| 697 | + echo ' |
|
| 681 | 698 | <div class="progress_bar"> |
| 682 | 699 | <div class="full_bar">', $context['substep_title'], ' (', $context['substep_continue_percent'], '%)</div> |
| 683 | 700 | <div class="blue_percent" style="width: ', $context['substep_continue_percent'], '%;"> </div> |
| 684 | 701 | </div>'; |
| 702 | + } |
|
| 685 | 703 | |
| 686 | 704 | echo ' |
| 687 | 705 | <form action="', $scripturl, $context['continue_get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="autoSubmit" id="autoSubmit"> |
@@ -716,35 +734,40 @@ discard block |
||
| 716 | 734 | { |
| 717 | 735 | global $context, $txt, $scripturl; |
| 718 | 736 | |
| 719 | - if (!empty($context['saved_successful'])) |
|
| 720 | - echo ' |
|
| 737 | + if (!empty($context['saved_successful'])) { |
|
| 738 | + echo ' |
|
| 721 | 739 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 722 | - elseif (!empty($context['saved_failed'])) |
|
| 723 | - echo ' |
|
| 740 | + } elseif (!empty($context['saved_failed'])) { |
|
| 741 | + echo ' |
|
| 724 | 742 | <div class="errorbox">', sprintf($txt['settings_not_saved'], $context['saved_failed']), '</div>'; |
| 743 | + } |
|
| 725 | 744 | |
| 726 | - if (!empty($context['settings_pre_javascript'])) |
|
| 727 | - echo ' |
|
| 745 | + if (!empty($context['settings_pre_javascript'])) { |
|
| 746 | + echo ' |
|
| 728 | 747 | <script>', $context['settings_pre_javascript'], '</script>'; |
| 748 | + } |
|
| 729 | 749 | |
| 730 | - if (!empty($context['settings_insert_above'])) |
|
| 731 | - echo $context['settings_insert_above']; |
|
| 750 | + if (!empty($context['settings_insert_above'])) { |
|
| 751 | + echo $context['settings_insert_above']; |
|
| 752 | + } |
|
| 732 | 753 | |
| 733 | 754 | echo ' |
| 734 | 755 | <div id="admincenter"> |
| 735 | 756 | <form id="admin_form_wrapper" action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>'; |
| 736 | 757 | |
| 737 | 758 | // Is there a custom title? |
| 738 | - if (isset($context['settings_title'])) |
|
| 739 | - echo ' |
|
| 759 | + if (isset($context['settings_title'])) { |
|
| 760 | + echo ' |
|
| 740 | 761 | <div class="cat_bar"> |
| 741 | 762 | <h3 class="catbg">', $context['settings_title'], '</h3> |
| 742 | 763 | </div>'; |
| 764 | + } |
|
| 743 | 765 | |
| 744 | 766 | // Have we got a message to display? |
| 745 | - if (!empty($context['settings_message'])) |
|
| 746 | - echo ' |
|
| 767 | + if (!empty($context['settings_message'])) { |
|
| 768 | + echo ' |
|
| 747 | 769 | <div class="information">', $context['settings_message'], '</div>'; |
| 770 | + } |
|
| 748 | 771 | |
| 749 | 772 | // Now actually loop through all the variables. |
| 750 | 773 | $is_open = false; |
@@ -797,8 +820,9 @@ discard block |
||
| 797 | 820 | // Hang about? Are you pulling my leg - a callback?! |
| 798 | 821 | if (is_array($config_var) && $config_var['type'] == 'callback') |
| 799 | 822 | { |
| 800 | - if (function_exists('template_callback_' . $config_var['name'])) |
|
| 801 | - call_user_func('template_callback_' . $config_var['name']); |
|
| 823 | + if (function_exists('template_callback_' . $config_var['name'])) { |
|
| 824 | + call_user_func('template_callback_' . $config_var['name']); |
|
| 825 | + } |
|
| 802 | 826 | |
| 803 | 827 | continue; |
| 804 | 828 | } |
@@ -828,9 +852,10 @@ discard block |
||
| 828 | 852 | $text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time'); |
| 829 | 853 | |
| 830 | 854 | // Show the [?] button. |
| 831 | - if ($config_var['help']) |
|
| 832 | - echo ' |
|
| 855 | + if ($config_var['help']) { |
|
| 856 | + echo ' |
|
| 833 | 857 | <a id="setting_', $config_var['name'], '_help" href="', $scripturl, '?action=helpadmin;help=', $config_var['help'], '" onclick="return reqOverlayDiv(this.href);"><span class="generic_icons help" title="', $txt['help'], '"></span></a> '; |
| 858 | + } |
|
| 834 | 859 | |
| 835 | 860 | echo ' |
| 836 | 861 | <a id="setting_', $config_var['name'], '"></a> <span', ($config_var['disabled'] ? ' style="color: #777777;"' : ($config_var['invalid'] ? ' class="error"' : '')), '><label for="', $config_var['name'], '">', $config_var['label'], '</label>', $subtext, ($config_var['type'] == 'password' ? '<br><em>' . $txt['admin_confirm_password'] . '</em>' : ''), '</span> |
@@ -839,22 +864,25 @@ discard block |
||
| 839 | 864 | $config_var['preinput']; |
| 840 | 865 | |
| 841 | 866 | // Show a check box. |
| 842 | - if ($config_var['type'] == 'check') |
|
| 843 | - echo ' |
|
| 867 | + if ($config_var['type'] == 'check') { |
|
| 868 | + echo ' |
|
| 844 | 869 | <input type="checkbox"', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '"', ($config_var['value'] ? ' checked' : ''), ' value="1">'; |
| 870 | + } |
|
| 845 | 871 | // Escape (via htmlspecialchars.) the text box. |
| 846 | - elseif ($config_var['type'] == 'password') |
|
| 847 | - echo ' |
|
| 872 | + elseif ($config_var['type'] == 'password') { |
|
| 873 | + echo ' |
|
| 848 | 874 | <input type="password"', $disabled, $javascript, ' name="', $config_var['name'], '[0]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), ' value="*#fakepass#*" onfocus="this.value = \'\'; this.form.', $config_var['name'], '.disabled = false;"><br> |
| 849 | 875 | <input type="password" disabled id="', $config_var['name'], '" name="', $config_var['name'], '[1]"', ($config_var['size'] ? ' size="' . $config_var['size'] . '"' : ''), '>'; |
| 876 | + } |
|
| 850 | 877 | // Show a selection box. |
| 851 | 878 | elseif ($config_var['type'] == 'select') |
| 852 | 879 | { |
| 853 | 880 | echo ' |
| 854 | 881 | <select name="', $config_var['name'], '" id="', $config_var['name'], '" ', $javascript, $disabled, (!empty($config_var['multiple']) ? ' multiple="multiple"' : ''), (!empty($config_var['multiple']) && !empty($config_var['size']) ? ' size="' . $config_var['size'] . '"' : ''), '>'; |
| 855 | - foreach ($config_var['data'] as $option) |
|
| 856 | - echo ' |
|
| 882 | + foreach ($config_var['data'] as $option) { |
|
| 883 | + echo ' |
|
| 857 | 884 | <option value="', $option[0], '"', (!empty($config_var['value']) && ($option[0] == $config_var['value'] || (!empty($config_var['multiple']) && in_array($option[0], $config_var['value']))) ? ' selected' : ''), '>', $option[1], '</option>'; |
| 885 | + } |
|
| 858 | 886 | echo ' |
| 859 | 887 | </select>'; |
| 860 | 888 | } |
@@ -868,15 +896,17 @@ discard block |
||
| 868 | 896 | <legend class="board_selector"><a href="#">', $txt['select_boards_from_list'], '</a></legend>'; |
| 869 | 897 | foreach ($context['board_list'] as $id_cat => $cat) |
| 870 | 898 | { |
| 871 | - if (!$first) |
|
| 872 | - echo ' |
|
| 899 | + if (!$first) { |
|
| 900 | + echo ' |
|
| 873 | 901 | <hr>'; |
| 902 | + } |
|
| 874 | 903 | echo ' |
| 875 | 904 | <strong>', $cat['name'], '</strong> |
| 876 | 905 | <ul>'; |
| 877 | - foreach ($cat['boards'] as $id_board => $brd) |
|
| 878 | - echo ' |
|
| 906 | + foreach ($cat['boards'] as $id_board => $brd) { |
|
| 907 | + echo ' |
|
| 879 | 908 | <li><label><input type="checkbox" name="', $config_var['name'], '[', $brd['id'], ']" value="1"', in_array($brd['id'], $config_var['value']) ? ' checked' : '', '> ', $brd['child_level'] > 0 ? str_repeat(' ', $brd['child_level']) : '', $brd['name'], '</label></li>'; |
| 909 | + } |
|
| 880 | 910 | |
| 881 | 911 | echo ' |
| 882 | 912 | </ul>'; |
@@ -886,12 +916,14 @@ discard block |
||
| 886 | 916 | </fieldset>'; |
| 887 | 917 | } |
| 888 | 918 | // Text area? |
| 889 | - elseif ($config_var['type'] == 'large_text') |
|
| 890 | - echo ' |
|
| 919 | + elseif ($config_var['type'] == 'large_text') { |
|
| 920 | + echo ' |
|
| 891 | 921 | <textarea rows="', (!empty($config_var['size']) ? $config_var['size'] : (!empty($config_var['rows']) ? $config_var['rows'] : 4)), '" cols="', (!empty($config_var['cols']) ? $config_var['cols'] : 30), '" ', $javascript, $disabled, ' name="', $config_var['name'], '" id="', $config_var['name'], '">', $config_var['value'], '</textarea>'; |
| 922 | + } |
|
| 892 | 923 | // Permission group? |
| 893 | - elseif ($config_var['type'] == 'permissions') |
|
| 894 | - theme_inline_permissions($config_var['name']); |
|
| 924 | + elseif ($config_var['type'] == 'permissions') { |
|
| 925 | + theme_inline_permissions($config_var['name']); |
|
| 926 | + } |
|
| 895 | 927 | // BBC selection? |
| 896 | 928 | elseif ($config_var['type'] == 'bbc') |
| 897 | 929 | { |
@@ -902,20 +934,22 @@ discard block |
||
| 902 | 934 | |
| 903 | 935 | foreach ($context['bbc_columns'] as $bbcColumn) |
| 904 | 936 | { |
| 905 | - foreach ($bbcColumn as $bbcTag) |
|
| 906 | - echo ' |
|
| 937 | + foreach ($bbcColumn as $bbcTag) { |
|
| 938 | + echo ' |
|
| 907 | 939 | <li class="list_bbc floatleft"> |
| 908 | 940 | <input type="checkbox" name="', $config_var['name'], '_enabledTags[]" id="tag_', $config_var['name'], '_', $bbcTag['tag'], '" value="', $bbcTag['tag'], '"', !in_array($bbcTag['tag'], $context['bbc_sections'][$config_var['name']]['disabled']) ? ' checked' : '', '> <label for="tag_', $config_var['name'], '_', $bbcTag['tag'], '">', $bbcTag['tag'], '</label>', $bbcTag['show_help'] ? ' (<a href="' . $scripturl . '?action=helpadmin;help=tag_' . $bbcTag['tag'] . '" onclick="return reqOverlayDiv(this.href);">?</a>)' : '', ' |
| 909 | 941 | </li>'; |
| 942 | + } |
|
| 910 | 943 | } |
| 911 | 944 | echo ' </ul> |
| 912 | 945 | <input type="checkbox" id="bbc_', $config_var['name'], '_select_all" onclick="invertAll(this, this.form, \'', $config_var['name'], '_enabledTags\');"', $context['bbc_sections'][$config_var['name']]['all_selected'] ? ' checked' : '', '> <label for="bbc_', $config_var['name'], '_select_all"><em>', $txt['bbcTagsToUse_select_all'], '</em></label> |
| 913 | 946 | </fieldset>'; |
| 914 | 947 | } |
| 915 | 948 | // A simple message? |
| 916 | - elseif ($config_var['type'] == 'var_message') |
|
| 917 | - echo ' |
|
| 949 | + elseif ($config_var['type'] == 'var_message') { |
|
| 950 | + echo ' |
|
| 918 | 951 | <div', !empty($config_var['name']) ? ' id="' . $config_var['name'] . '"' : '', '>', $config_var['var_message'], '</div>'; |
| 952 | + } |
|
| 919 | 953 | // Assume it must be a text box |
| 920 | 954 | else |
| 921 | 955 | { |
@@ -940,63 +974,70 @@ discard block |
||
| 940 | 974 | ' . $config_var['postinput'] : '', |
| 941 | 975 | '</dd>'; |
| 942 | 976 | } |
| 943 | - } |
|
| 944 | - |
|
| 945 | - else |
|
| 977 | + } else |
|
| 946 | 978 | { |
| 947 | 979 | // Just show a separator. |
| 948 | - if ($config_var == '') |
|
| 949 | - echo ' |
|
| 980 | + if ($config_var == '') { |
|
| 981 | + echo ' |
|
| 950 | 982 | </dl> |
| 951 | 983 | <hr> |
| 952 | 984 | <dl class="settings">'; |
| 953 | - else |
|
| 954 | - echo ' |
|
| 985 | + } else { |
|
| 986 | + echo ' |
|
| 955 | 987 | <dd> |
| 956 | 988 | <strong>' . $config_var . '</strong> |
| 957 | 989 | </dd>'; |
| 990 | + } |
|
| 958 | 991 | } |
| 959 | 992 | } |
| 960 | 993 | |
| 961 | - if ($is_open) |
|
| 962 | - echo ' |
|
| 994 | + if ($is_open) { |
|
| 995 | + echo ' |
|
| 963 | 996 | </dl>'; |
| 997 | + } |
|
| 964 | 998 | |
| 965 | - if (empty($context['settings_save_dont_show'])) |
|
| 966 | - echo ' |
|
| 999 | + if (empty($context['settings_save_dont_show'])) { |
|
| 1000 | + echo ' |
|
| 967 | 1001 | <input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button">'; |
| 1002 | + } |
|
| 968 | 1003 | |
| 969 | - if ($is_open) |
|
| 970 | - echo ' |
|
| 1004 | + if ($is_open) { |
|
| 1005 | + echo ' |
|
| 971 | 1006 | </div>'; |
| 1007 | + } |
|
| 972 | 1008 | |
| 973 | 1009 | |
| 974 | 1010 | // At least one token has to be used! |
| 975 | - if (isset($context['admin-ssc_token'])) |
|
| 976 | - echo ' |
|
| 1011 | + if (isset($context['admin-ssc_token'])) { |
|
| 1012 | + echo ' |
|
| 977 | 1013 | <input type="hidden" name="', $context['admin-ssc_token_var'], '" value="', $context['admin-ssc_token'], '">'; |
| 1014 | + } |
|
| 978 | 1015 | |
| 979 | - if (isset($context['admin-dbsc_token'])) |
|
| 980 | - echo ' |
|
| 1016 | + if (isset($context['admin-dbsc_token'])) { |
|
| 1017 | + echo ' |
|
| 981 | 1018 | <input type="hidden" name="', $context['admin-dbsc_token_var'], '" value="', $context['admin-dbsc_token'], '">'; |
| 1019 | + } |
|
| 982 | 1020 | |
| 983 | - if (isset($context['admin-mp_token'])) |
|
| 984 | - echo ' |
|
| 1021 | + if (isset($context['admin-mp_token'])) { |
|
| 1022 | + echo ' |
|
| 985 | 1023 | <input type="hidden" name="', $context['admin-mp_token_var'], '" value="', $context['admin-mp_token'], '">'; |
| 1024 | + } |
|
| 986 | 1025 | |
| 987 | 1026 | echo ' |
| 988 | 1027 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 989 | 1028 | </form> |
| 990 | 1029 | </div>'; |
| 991 | 1030 | |
| 992 | - if (!empty($context['settings_post_javascript'])) |
|
| 993 | - echo ' |
|
| 1031 | + if (!empty($context['settings_post_javascript'])) { |
|
| 1032 | + echo ' |
|
| 994 | 1033 | <script> |
| 995 | 1034 | ', $context['settings_post_javascript'], ' |
| 996 | 1035 | </script>'; |
| 1036 | + } |
|
| 997 | 1037 | |
| 998 | - if (!empty($context['settings_insert_below'])) |
|
| 999 | - echo $context['settings_insert_below']; |
|
| 1038 | + if (!empty($context['settings_insert_below'])) { |
|
| 1039 | + echo $context['settings_insert_below']; |
|
| 1040 | + } |
|
| 1000 | 1041 | |
| 1001 | 1042 | // We may have added a board listing. If we did, we need to make it work. |
| 1002 | 1043 | addInlineJavascript(' |
@@ -1019,9 +1060,10 @@ discard block |
||
| 1019 | 1060 | { |
| 1020 | 1061 | global $context, $txt; |
| 1021 | 1062 | |
| 1022 | - if (!empty($context['saved_successful'])) |
|
| 1023 | - echo ' |
|
| 1063 | + if (!empty($context['saved_successful'])) { |
|
| 1064 | + echo ' |
|
| 1024 | 1065 | <div class="infobox">', $txt['settings_saved'], '</div>'; |
| 1066 | + } |
|
| 1025 | 1067 | |
| 1026 | 1068 | // Standard fields. |
| 1027 | 1069 | template_show_list('standard_profile_fields'); |
@@ -1053,11 +1095,12 @@ discard block |
||
| 1053 | 1095 | if (isset($_GET['msg'])) |
| 1054 | 1096 | { |
| 1055 | 1097 | loadLanguage('Errors'); |
| 1056 | - if (isset($txt['custom_option_' . $_GET['msg']])) |
|
| 1057 | - echo ' |
|
| 1098 | + if (isset($txt['custom_option_' . $_GET['msg']])) { |
|
| 1099 | + echo ' |
|
| 1058 | 1100 | <div class="errorbox">', |
| 1059 | 1101 | $txt['custom_option_' . $_GET['msg']], ' |
| 1060 | 1102 | </div>'; |
| 1103 | + } |
|
| 1061 | 1104 | } |
| 1062 | 1105 | |
| 1063 | 1106 | echo ' |
@@ -1123,9 +1166,10 @@ discard block |
||
| 1123 | 1166 | <dd> |
| 1124 | 1167 | <select name="placement" id="placement">'; |
| 1125 | 1168 | |
| 1126 | - foreach ($context['cust_profile_fields_placement'] as $order => $name) |
|
| 1127 | - echo ' |
|
| 1169 | + foreach ($context['cust_profile_fields_placement'] as $order => $name) { |
|
| 1170 | + echo ' |
|
| 1128 | 1171 | <option value="', $order, '"', $context['field']['placement'] == $order ? ' selected' : '', '>', $txt['custom_profile_placement_' . $name], '</option>'; |
| 1172 | + } |
|
| 1129 | 1173 | |
| 1130 | 1174 | echo ' |
| 1131 | 1175 | </select> |
@@ -1148,9 +1192,10 @@ discard block |
||
| 1148 | 1192 | </dt> |
| 1149 | 1193 | <dd> |
| 1150 | 1194 | <select name="field_type" id="field_type" onchange="updateInputBoxes();">'; |
| 1151 | - foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) |
|
| 1152 | - echo ' |
|
| 1195 | + foreach (array('text', 'textarea', 'select', 'radio', 'check') as $field_type) { |
|
| 1196 | + echo ' |
|
| 1153 | 1197 | <option value="', $field_type, '"', $context['field']['type'] == $field_type ? ' selected' : '', '>', $txt['custom_profile_type_' . $field_type], '</option>'; |
| 1198 | + } |
|
| 1154 | 1199 | |
| 1155 | 1200 | echo ' |
| 1156 | 1201 | </select> |
@@ -1251,9 +1296,10 @@ discard block |
||
| 1251 | 1296 | </fieldset> |
| 1252 | 1297 | <input type="submit" name="save" value="', $txt['save'], '" class="button">'; |
| 1253 | 1298 | |
| 1254 | - if ($context['fid']) |
|
| 1255 | - echo ' |
|
| 1299 | + if ($context['fid']) { |
|
| 1300 | + echo ' |
|
| 1256 | 1301 | <input type="submit" name="delete" value="', $txt['delete'], '" data-confirm="', $txt['custom_edit_delete_sure'], '" class="button you_sure">'; |
| 1302 | + } |
|
| 1257 | 1303 | |
| 1258 | 1304 | echo ' |
| 1259 | 1305 | </div> |
@@ -1296,8 +1342,7 @@ discard block |
||
| 1296 | 1342 | { |
| 1297 | 1343 | echo ' |
| 1298 | 1344 | <p class="centertext"><strong>', $txt['admin_search_results_none'], '</strong></p>'; |
| 1299 | - } |
|
| 1300 | - else |
|
| 1345 | + } else |
|
| 1301 | 1346 | { |
| 1302 | 1347 | echo ' |
| 1303 | 1348 | <ol class="search_results">'; |
@@ -1323,9 +1368,10 @@ discard block |
||
| 1323 | 1368 | <li> |
| 1324 | 1369 | <a href="', $result['url'], '"><strong>', $result['name'], '</strong></a> [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'], ']'; |
| 1325 | 1370 | |
| 1326 | - if ($result['help']) |
|
| 1327 | - echo ' |
|
| 1371 | + if ($result['help']) { |
|
| 1372 | + echo ' |
|
| 1328 | 1373 | <p class="double_height">', $result['help'], '</p>'; |
| 1374 | + } |
|
| 1329 | 1375 | |
| 1330 | 1376 | echo ' |
| 1331 | 1377 | </li>'; |
@@ -1365,18 +1411,20 @@ discard block |
||
| 1365 | 1411 | <strong>', $txt['setup_verification_answer'], '</strong> |
| 1366 | 1412 | </dd>'; |
| 1367 | 1413 | |
| 1368 | - if (!empty($context['qa_by_lang'][$lang_id])) |
|
| 1369 | - foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1414 | + if (!empty($context['qa_by_lang'][$lang_id])) { |
|
| 1415 | + foreach ($context['qa_by_lang'][$lang_id] as $q_id) |
|
| 1370 | 1416 | { |
| 1371 | 1417 | $question = $context['question_answers'][$q_id]; |
| 1418 | + } |
|
| 1372 | 1419 | echo ' |
| 1373 | 1420 | <dt> |
| 1374 | 1421 | <input type="text" name="question[', $lang_id, '][', $q_id, ']" value="', $question['question'], '" size="50" class="verification_question"> |
| 1375 | 1422 | </dt> |
| 1376 | 1423 | <dd>'; |
| 1377 | - foreach ($question['answers'] as $answer) |
|
| 1378 | - echo ' |
|
| 1424 | + foreach ($question['answers'] as $answer) { |
|
| 1425 | + echo ' |
|
| 1379 | 1426 | <input type="text" name="answer[', $lang_id, '][', $q_id, '][]" value="', $answer, '" size="50" class="verification_answer">'; |
| 1427 | + } |
|
| 1380 | 1428 | |
| 1381 | 1429 | echo ' |
| 1382 | 1430 | <div class="qa_add_answer"><a href="javascript:void(0);" onclick="return addAnswer(this);">[ ', $txt['setup_verification_add_answer'], ' ]</a></div> |
@@ -1415,11 +1463,12 @@ discard block |
||
| 1415 | 1463 | ', $txt['errors_found'], ': |
| 1416 | 1464 | <ul>'; |
| 1417 | 1465 | |
| 1418 | - foreach ($context['repair_errors'] as $error) |
|
| 1419 | - echo ' |
|
| 1466 | + foreach ($context['repair_errors'] as $error) { |
|
| 1467 | + echo ' |
|
| 1420 | 1468 | <li> |
| 1421 | 1469 | ', $error, ' |
| 1422 | 1470 | </li>'; |
| 1471 | + } |
|
| 1423 | 1472 | |
| 1424 | 1473 | echo ' |
| 1425 | 1474 | </ul> |
@@ -1429,16 +1478,15 @@ discard block |
||
| 1429 | 1478 | <p class="padding"> |
| 1430 | 1479 | <strong><a href="', $scripturl, '?action=admin;area=repairboards;fixErrors;', $context['session_var'], '=', $context['session_id'], '">', $txt['yes'], '</a> - <a href="', $scripturl, '?action=admin;area=maintain">', $txt['no'], '</a></strong> |
| 1431 | 1480 | </p>'; |
| 1432 | - } |
|
| 1433 | - else |
|
| 1434 | - echo ' |
|
| 1481 | + } else { |
|
| 1482 | + echo ' |
|
| 1435 | 1483 | <p>', $txt['maintain_no_errors'], '</p> |
| 1436 | 1484 | <p class="padding"> |
| 1437 | 1485 | <a href="', $scripturl, '?action=admin;area=maintain;sa=routine">', $txt['maintain_return'], '</a> |
| 1438 | 1486 | </p>'; |
| 1487 | + } |
|
| 1439 | 1488 | |
| 1440 | - } |
|
| 1441 | - else |
|
| 1489 | + } else |
|
| 1442 | 1490 | { |
| 1443 | 1491 | if (!empty($context['redirect_to_recount'])) |
| 1444 | 1492 | { |
@@ -1450,8 +1498,7 @@ discard block |
||
| 1450 | 1498 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 1451 | 1499 | <input type="submit" name="recount" id="recount_now" value="', $txt['errors_recount_now'], '"> |
| 1452 | 1500 | </form>'; |
| 1453 | - } |
|
| 1454 | - else |
|
| 1501 | + } else |
|
| 1455 | 1502 | { |
| 1456 | 1503 | echo ' |
| 1457 | 1504 | <p>', $txt['errors_fixed'], '</p> |
@@ -1603,8 +1650,8 @@ discard block |
||
| 1603 | 1650 | function template_admin_quick_search() |
| 1604 | 1651 | { |
| 1605 | 1652 | global $context, $txt; |
| 1606 | - if ($context['user']['is_admin']) |
|
| 1607 | - echo ' |
|
| 1653 | + if ($context['user']['is_admin']) { |
|
| 1654 | + echo ' |
|
| 1608 | 1655 | <span class="floatright admin_search"> |
| 1609 | 1656 | <span class="generic_icons filter centericon"></span> |
| 1610 | 1657 | <input type="search" name="search_term" value="', $txt['admin_search'], '" onclick="if (this.value == \'', $txt['admin_search'], '\') this.value = \'\';"> |
@@ -1615,6 +1662,7 @@ discard block |
||
| 1615 | 1662 | </select> |
| 1616 | 1663 | <input type="submit" name="search_go" id="search_go" value="', $txt['admin_search_go'], '" class="button"> |
| 1617 | 1664 | </span>'; |
| 1618 | -} |
|
| 1665 | + } |
|
| 1666 | + } |
|
| 1619 | 1667 | |
| 1620 | 1668 | ?> |
| 1621 | 1669 | \ No newline at end of file |