@@ -18,11 +18,12 @@ discard block |
||
| 18 | 18 | global $context, $txt, $scripturl, $modSettings; |
| 19 | 19 | |
| 20 | 20 | // If maintenance has finished tell the user. |
| 21 | - if (!empty($context['maintenance_finished'])) |
|
| 22 | - echo ' |
|
| 21 | + if (!empty($context['maintenance_finished'])) { |
|
| 22 | + echo ' |
|
| 23 | 23 | <div class="infobox"> |
| 24 | 24 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 25 | 25 | </div>'; |
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | echo ' |
| 28 | 29 | <div id="manage_maintenance"> |
@@ -107,11 +108,12 @@ discard block |
||
| 107 | 108 | <div id="manage_maintenance">'; |
| 108 | 109 | |
| 109 | 110 | // If maintenance has finished tell the user. |
| 110 | - if (!empty($context['maintenance_finished'])) |
|
| 111 | - echo ' |
|
| 111 | + if (!empty($context['maintenance_finished'])) { |
|
| 112 | + echo ' |
|
| 112 | 113 | <div class="infobox"> |
| 113 | 114 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 114 | 115 | </div>'; |
| 116 | + } |
|
| 115 | 117 | |
| 116 | 118 | echo ' |
| 117 | 119 | <div class="cat_bar"> |
@@ -243,11 +245,12 @@ discard block |
||
| 243 | 245 | <div id="manage_maintenance">'; |
| 244 | 246 | |
| 245 | 247 | // If maintenance has finished tell the user. |
| 246 | - if (!empty($context['maintenance_finished'])) |
|
| 247 | - echo ' |
|
| 248 | + if (!empty($context['maintenance_finished'])) { |
|
| 249 | + echo ' |
|
| 248 | 250 | <div class="infobox"> |
| 249 | 251 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 250 | 252 | </div>'; |
| 253 | + } |
|
| 251 | 254 | |
| 252 | 255 | echo ' |
| 253 | 256 | <div class="cat_bar"> |
@@ -311,9 +314,10 @@ discard block |
||
| 311 | 314 | </p> |
| 312 | 315 | <div style="display: none; padding: 3px" id="membersPanel">'; |
| 313 | 316 | |
| 314 | - foreach ($context['membergroups'] as $group) |
|
| 315 | - echo ' |
|
| 317 | + foreach ($context['membergroups'] as $group) { |
|
| 318 | + echo ' |
|
| 316 | 319 | <label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked> ', $group['name'], '</label><br>'; |
| 320 | + } |
|
| 317 | 321 | |
| 318 | 322 | echo ' |
| 319 | 323 | </div> |
@@ -357,11 +361,12 @@ discard block |
||
| 357 | 361 | global $scripturl, $txt, $context, $settings, $modSettings; |
| 358 | 362 | |
| 359 | 363 | // If maintenance has finished tell the user. |
| 360 | - if (!empty($context['maintenance_finished'])) |
|
| 361 | - echo ' |
|
| 364 | + if (!empty($context['maintenance_finished'])) { |
|
| 365 | + echo ' |
|
| 362 | 366 | <div class="infobox"> |
| 363 | 367 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
| 364 | 368 | </div>'; |
| 369 | + } |
|
| 365 | 370 | |
| 366 | 371 | // Bit of javascript for showing which boards to prune in an otherwise hidden list. |
| 367 | 372 | echo ' |
@@ -429,21 +434,23 @@ discard block |
||
| 429 | 434 | <ul>'; |
| 430 | 435 | |
| 431 | 436 | // Display a checkbox with every board. |
| 432 | - foreach ($category['boards'] as $board) |
|
| 433 | - echo ' |
|
| 437 | + foreach ($category['boards'] as $board) { |
|
| 438 | + echo ' |
|
| 434 | 439 | <li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"> |
| 435 | 440 | <label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked>', $board['name'], '</label> |
| 436 | 441 | </li>'; |
| 442 | + } |
|
| 437 | 443 | |
| 438 | 444 | echo ' |
| 439 | 445 | </ul> |
| 440 | 446 | </fieldset>'; |
| 441 | 447 | |
| 442 | 448 | // Increase $i, and check if we're at the middle yet. |
| 443 | - if (++$i == $middle) |
|
| 444 | - echo ' |
|
| 449 | + if (++$i == $middle) { |
|
| 450 | + echo ' |
|
| 445 | 451 | </div><!-- .floatleft --> |
| 446 | 452 | <div class="floatright" style="width: 49%;">'; |
| 453 | + } |
|
| 447 | 454 | } |
| 448 | 455 | |
| 449 | 456 | echo ' |
@@ -485,9 +492,10 @@ discard block |
||
| 485 | 492 | echo ' |
| 486 | 493 | <optgroup label="', $category['name'], '">'; |
| 487 | 494 | |
| 488 | - foreach ($category['boards'] as $board) |
|
| 489 | - echo ' |
|
| 495 | + foreach ($category['boards'] as $board) { |
|
| 496 | + echo ' |
|
| 490 | 497 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
| 498 | + } |
|
| 491 | 499 | |
| 492 | 500 | echo ' |
| 493 | 501 | </optgroup>'; |
@@ -505,9 +513,10 @@ discard block |
||
| 505 | 513 | echo ' |
| 506 | 514 | <optgroup label="', $category['name'], '">'; |
| 507 | 515 | |
| 508 | - foreach ($category['boards'] as $board) |
|
| 509 | - echo ' |
|
| 516 | + foreach ($category['boards'] as $board) { |
|
| 517 | + echo ' |
|
| 510 | 518 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
| 519 | + } |
|
| 511 | 520 | |
| 512 | 521 | echo ' |
| 513 | 522 | </optgroup>'; |
@@ -548,9 +557,10 @@ discard block |
||
| 548 | 557 | ', $txt['database_optimize_attempt'], '<br>'; |
| 549 | 558 | |
| 550 | 559 | // List each table being optimized... |
| 551 | - foreach ($context['optimized_tables'] as $table) |
|
| 552 | - echo ' |
|
| 560 | + foreach ($context['optimized_tables'] as $table) { |
|
| 561 | + echo ' |
|
| 553 | 562 | ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>'; |
| 563 | + } |
|
| 554 | 564 | |
| 555 | 565 | // How did we go? |
| 556 | 566 | echo ' |
@@ -610,13 +620,14 @@ discard block |
||
| 610 | 620 | </li> |
| 611 | 621 | </ul>'; |
| 612 | 622 | |
| 613 | - if (!empty($context['exceeding_messages_morethan'])) |
|
| 614 | - echo ' |
|
| 623 | + if (!empty($context['exceeding_messages_morethan'])) { |
|
| 624 | + echo ' |
|
| 615 | 625 | <p>', $context['exceeding_messages_morethan'], '</p>'; |
| 616 | - } |
|
| 617 | - else |
|
| 618 | - echo ' |
|
| 626 | + } |
|
| 627 | + } else { |
|
| 628 | + echo ' |
|
| 619 | 629 | <p class="infobox">', $txt['convert_to_text'], '</p>'; |
| 630 | + } |
|
| 620 | 631 | |
| 621 | 632 | echo ' |
| 622 | 633 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '"> |
@@ -31,9 +31,10 @@ discard block |
||
| 31 | 31 | <div class="selectbox floatright" id="upper_show">', $txt['who_show1'], ' |
| 32 | 32 | <select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
| 33 | 33 | |
| 34 | - foreach ($context['show_methods'] as $value => $label) |
|
| 35 | - echo ' |
|
| 34 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 35 | + echo ' |
|
| 36 | 36 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 37 | + } |
|
| 37 | 38 | echo ' |
| 38 | 39 | </select> |
| 39 | 40 | <noscript> |
@@ -71,9 +72,10 @@ discard block |
||
| 71 | 72 | ', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', ' |
| 72 | 73 | </span>'; |
| 73 | 74 | |
| 74 | - if (!empty($member['ip'])) |
|
| 75 | - echo ' |
|
| 75 | + if (!empty($member['ip'])) { |
|
| 76 | + echo ' |
|
| 76 | 77 | (<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)'; |
| 78 | + } |
|
| 77 | 79 | |
| 78 | 80 | echo ' |
| 79 | 81 | </td> |
@@ -103,9 +105,10 @@ discard block |
||
| 103 | 105 | <div class="selectbox floatright">', $txt['who_show1'], ' |
| 104 | 106 | <select name="show" onchange="document.forms.whoFilter.submit();">'; |
| 105 | 107 | |
| 106 | - foreach ($context['show_methods'] as $value => $label) |
|
| 107 | - echo ' |
|
| 108 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 109 | + echo ' |
|
| 108 | 110 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 111 | + } |
|
| 109 | 112 | echo ' |
| 110 | 113 | </select> |
| 111 | 114 | <noscript> |
@@ -134,17 +137,19 @@ discard block |
||
| 134 | 137 | |
| 135 | 138 | foreach ($context['credits'] as $section) |
| 136 | 139 | { |
| 137 | - if (isset($section['pretext'])) |
|
| 138 | - echo ' |
|
| 140 | + if (isset($section['pretext'])) { |
|
| 141 | + echo ' |
|
| 139 | 142 | <div class="windowbg noup"> |
| 140 | 143 | <p>', $section['pretext'], '</p> |
| 141 | 144 | </div>'; |
| 145 | + } |
|
| 142 | 146 | |
| 143 | - if (isset($section['title'])) |
|
| 144 | - echo ' |
|
| 147 | + if (isset($section['title'])) { |
|
| 148 | + echo ' |
|
| 145 | 149 | <div class="cat_bar"> |
| 146 | 150 | <h3 class="catbg">', $section['title'], '</h3> |
| 147 | 151 | </div>'; |
| 152 | + } |
|
| 148 | 153 | |
| 149 | 154 | echo ' |
| 150 | 155 | <div class="windowbg2 noup"> |
@@ -152,17 +157,18 @@ discard block |
||
| 152 | 157 | |
| 153 | 158 | foreach ($section['groups'] as $group) |
| 154 | 159 | { |
| 155 | - if (isset($group['title'])) |
|
| 156 | - echo ' |
|
| 160 | + if (isset($group['title'])) { |
|
| 161 | + echo ' |
|
| 157 | 162 | <dt> |
| 158 | 163 | <strong>', $group['title'], '</strong> |
| 159 | 164 | </dt> |
| 160 | 165 | <dd>'; |
| 166 | + } |
|
| 161 | 167 | |
| 162 | 168 | // Try to make this read nicely. |
| 163 | - if (count($group['members']) <= 2) |
|
| 164 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 165 | - else |
|
| 169 | + if (count($group['members']) <= 2) { |
|
| 170 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 171 | + } else |
|
| 166 | 172 | { |
| 167 | 173 | $last_peep = array_pop($group['members']); |
| 168 | 174 | echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep; |
@@ -175,9 +181,10 @@ discard block |
||
| 175 | 181 | echo ' |
| 176 | 182 | </dl>'; |
| 177 | 183 | |
| 178 | - if (isset($section['posttext'])) |
|
| 179 | - echo ' |
|
| 184 | + if (isset($section['posttext'])) { |
|
| 185 | + echo ' |
|
| 180 | 186 | <p class="posttext">', $section['posttext'], '</p>'; |
| 187 | + } |
|
| 181 | 188 | |
| 182 | 189 | echo ' |
| 183 | 190 | </div>'; |
@@ -192,26 +199,29 @@ discard block |
||
| 192 | 199 | </div> |
| 193 | 200 | <div class="windowbg noup">'; |
| 194 | 201 | |
| 195 | - if (!empty($context['credits_software_graphics']['graphics'])) |
|
| 196 | - echo ' |
|
| 202 | + if (!empty($context['credits_software_graphics']['graphics'])) { |
|
| 203 | + echo ' |
|
| 197 | 204 | <dl> |
| 198 | 205 | <dt><strong>', $txt['credits_graphics'], '</strong></dt> |
| 199 | 206 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd> |
| 200 | 207 | </dl>'; |
| 208 | + } |
|
| 201 | 209 | |
| 202 | - if (!empty($context['credits_software_graphics']['software'])) |
|
| 203 | - echo ' |
|
| 210 | + if (!empty($context['credits_software_graphics']['software'])) { |
|
| 211 | + echo ' |
|
| 204 | 212 | <dl> |
| 205 | 213 | <dt><strong>', $txt['credits_software'], '</strong></dt> |
| 206 | 214 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd> |
| 207 | 215 | </dl>'; |
| 216 | + } |
|
| 208 | 217 | |
| 209 | - if (!empty($context['credits_software_graphics']['fonts'])) |
|
| 210 | - echo ' |
|
| 218 | + if (!empty($context['credits_software_graphics']['fonts'])) { |
|
| 219 | + echo ' |
|
| 211 | 220 | <dl> |
| 212 | 221 | <dt><strong>', $txt['credits_fonts'], '</strong></dt> |
| 213 | 222 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd> |
| 214 | 223 | </dl>'; |
| 224 | + } |
|
| 215 | 225 | echo ' |
| 216 | 226 | </div>'; |
| 217 | 227 | } |
@@ -227,14 +237,16 @@ discard block |
||
| 227 | 237 | <ul>'; |
| 228 | 238 | |
| 229 | 239 | // Display the credits. |
| 230 | - if (!empty($context['credits_modifications'])) |
|
| 231 | - echo ' |
|
| 240 | + if (!empty($context['credits_modifications'])) { |
|
| 241 | + echo ' |
|
| 232 | 242 | <li>', implode('</li><li>', $context['credits_modifications']), '</li>'; |
| 243 | + } |
|
| 233 | 244 | |
| 234 | 245 | // Legacy. |
| 235 | - if (!empty($context['copyrights']['mods'])) |
|
| 236 | - echo ' |
|
| 246 | + if (!empty($context['copyrights']['mods'])) { |
|
| 247 | + echo ' |
|
| 237 | 248 | <li>', implode('</li><li>', $context['copyrights']['mods']), '</li>'; |
| 249 | + } |
|
| 238 | 250 | |
| 239 | 251 | echo ' |
| 240 | 252 | </ul> |
@@ -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 ' |
@@ -141,12 +144,13 @@ discard block |
||
| 141 | 144 | </fieldset>'; |
| 142 | 145 | |
| 143 | 146 | // If this is an edit, we can allow them to reset the vote counts. |
| 144 | - if ($context['is_edit']) |
|
| 145 | - echo ' |
|
| 147 | + if ($context['is_edit']) { |
|
| 148 | + echo ' |
|
| 146 | 149 | <fieldset id="poll_reset"> |
| 147 | 150 | <legend>', $txt['reset_votes'], '</legend> |
| 148 | 151 | <input type="checkbox" name="resetVoteCount" value="on"> ' . $txt['reset_votes_check'] . ' |
| 149 | 152 | </fieldset>'; |
| 153 | + } |
|
| 150 | 154 | echo ' |
| 151 | 155 | <input type="submit" name="post" value="', $txt['save'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button"> |
| 152 | 156 | </div><!-- .roundframe --> |
@@ -422,8 +422,8 @@ discard block |
||
| 422 | 422 | </div><!-- .attached_BBC --> |
| 423 | 423 | <div class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div> |
| 424 | 424 | <div class="attach-ui"> |
| 425 | - <a data-dz-remove class="button cancel">', $txt['modify_cancel'] ,'</a> |
|
| 426 | - <a class="button upload">', $txt['upload'] ,'</a> |
|
| 425 | + <a data-dz-remove class="button cancel">', $txt['modify_cancel'], '</a> |
|
| 426 | + <a class="button upload">', $txt['upload'], '</a> |
|
| 427 | 427 | </div> |
| 428 | 428 | </div><!-- .attach-info --> |
| 429 | 429 | </div><!-- #au-template --> |
@@ -441,10 +441,10 @@ discard block |
||
| 441 | 441 | </dt> |
| 442 | 442 | <dd class="smalltext fallback"> |
| 443 | 443 | <div id="attachUpload" class="descbox"> |
| 444 | - <h5>', $txt['attach_drop_zone'] ,'</h5> |
|
| 445 | - <a class="button" id="attach-cancelAll">', $txt['attached_cancelAll'] ,'</a> |
|
| 446 | - <a class="button" id="attach-uploadAll">', $txt['attached_uploadAll'] ,'</a> |
|
| 447 | - <a class="button fileinput-button">', $txt['attach_add'] ,'</a> |
|
| 444 | + <h5>', $txt['attach_drop_zone'], '</h5> |
|
| 445 | + <a class="button" id="attach-cancelAll">', $txt['attached_cancelAll'], '</a> |
|
| 446 | + <a class="button" id="attach-uploadAll">', $txt['attached_uploadAll'], '</a> |
|
| 447 | + <a class="button fileinput-button">', $txt['attach_add'], '</a> |
|
| 448 | 448 | <div id="total-progress" class="progressBar" role="progressBar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span></span></div> |
| 449 | 449 | <div class="fallback"> |
| 450 | 450 | <input type="file" multiple="multiple" name="attachment[]" id="attachment1" class="fallback"> (<a href="javascript:void(0);" onclick="cleanFileInput(\'attachment1\');">', $txt['clean_attach'], '</a>) |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | // Option to delete an event if user is editing one. |
| 553 | 553 | if ($context['make_event'] && !$context['event']['new']) |
| 554 | 554 | echo ' |
| 555 | - <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button you_sure">'; |
|
| 555 | + <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'], '" class="button you_sure">'; |
|
| 556 | 556 | |
| 557 | 557 | echo ' |
| 558 | 558 | </span> |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | });'; |
| 807 | 807 | |
| 808 | 808 | echo ' |
| 809 | - var oEditorID = "', $context['post_box_name'] ,'"; |
|
| 809 | + var oEditorID = "', $context['post_box_name'], '"; |
|
| 810 | 810 | var oEditorObject = oEditorHandle_', $context['post_box_name'], '; |
| 811 | 811 | </script>'; |
| 812 | 812 | |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | { |
| 839 | 839 | echo ' |
| 840 | 840 | <ul class="quickbuttons" id="msg_', $post['id'], '_quote"> |
| 841 | - <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> |
|
| 841 | + <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> |
|
| 842 | 842 | <li id="post_modify"><a href="#postmodify" onclick="return insertQuoteFast(', $post['id'], ');"><span class="generic_icons quote"></span>', $txt['quote'], '</a></li> |
| 843 | 843 | </ul>'; |
| 844 | 844 | } |
@@ -925,7 +925,7 @@ discard block |
||
| 925 | 925 | <head> |
| 926 | 926 | <meta charset="', $context['character_set'], '"> |
| 927 | 927 | <title>', $txt['spell_check'], '</title> |
| 928 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
| 928 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
| 929 | 929 | <style> |
| 930 | 930 | body, td { |
| 931 | 931 | font-size: small; |
@@ -955,8 +955,8 @@ discard block |
||
| 955 | 955 | var spell_formname = window.opener.spell_formname; |
| 956 | 956 | var spell_fieldname = window.opener.spell_fieldname; |
| 957 | 957 | </script> |
| 958 | - <script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'] ,'"></script> |
|
| 959 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 958 | + <script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'], '"></script> |
|
| 959 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 960 | 960 | <script> |
| 961 | 961 | ', $context['spell_js'], ' |
| 962 | 962 | </script> |
@@ -1000,7 +1000,7 @@ discard block |
||
| 1000 | 1000 | <head> |
| 1001 | 1001 | <meta charset="', $context['character_set'], '"> |
| 1002 | 1002 | <title>', $txt['retrieving_quote'], '</title> |
| 1003 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 1003 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 1004 | 1004 | </head> |
| 1005 | 1005 | <body> |
| 1006 | 1006 | ', $txt['retrieving_quote'], ' |
@@ -22,23 +22,25 @@ 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 | 33 | |
| 33 | - foreach ($context['icons'] as $icon) |
|
| 34 | - echo ' |
|
| 34 | + foreach ($context['icons'] as $icon) { |
|
| 35 | + echo ' |
|
| 35 | 36 | \'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ','; |
| 37 | + } |
|
| 36 | 38 | echo ' |
| 37 | 39 | };'; |
| 38 | 40 | |
| 39 | 41 | // If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations. |
| 40 | - if ($context['make_poll']) |
|
| 41 | - echo ' |
|
| 42 | + if ($context['make_poll']) { |
|
| 43 | + echo ' |
|
| 42 | 44 | var pollOptionNum = 0, pollTabIndex; |
| 43 | 45 | var pollOptionId = ', $context['last_choice_id'], '; |
| 44 | 46 | function addPollOption() |
@@ -57,11 +59,13 @@ discard block |
||
| 57 | 59 | |
| 58 | 60 | 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>'), '); |
| 59 | 61 | }'; |
| 62 | + } |
|
| 60 | 63 | |
| 61 | 64 | // If we are making a calendar event we want to ensure we show the current days in a month etc... this is done here. |
| 62 | - if ($context['make_event']) |
|
| 63 | - echo ' |
|
| 65 | + if ($context['make_event']) { |
|
| 66 | + echo ' |
|
| 64 | 67 | var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];'; |
| 68 | + } |
|
| 65 | 69 | |
| 66 | 70 | // End of the javascript, start the form and display the link tree. |
| 67 | 71 | echo ' |
@@ -82,9 +86,10 @@ discard block |
||
| 82 | 86 | </div> |
| 83 | 87 | <br>'; |
| 84 | 88 | |
| 85 | - if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) |
|
| 86 | - echo ' |
|
| 89 | + if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) { |
|
| 90 | + echo ' |
|
| 87 | 91 | <input type="hidden" name="eventid" value="', $context['event']['id'], '">'; |
| 92 | + } |
|
| 88 | 93 | |
| 89 | 94 | // Start the main table. |
| 90 | 95 | echo ' |
@@ -119,18 +124,20 @@ discard block |
||
| 119 | 124 | } |
| 120 | 125 | |
| 121 | 126 | // If it's locked, show a message to warn the replier. |
| 122 | - if (!empty($context['locked'])) |
|
| 123 | - echo ' |
|
| 127 | + if (!empty($context['locked'])) { |
|
| 128 | + echo ' |
|
| 124 | 129 | <div class="errorbox"> |
| 125 | 130 | ', $txt['topic_locked_no_reply'], ' |
| 126 | 131 | </div>'; |
| 132 | + } |
|
| 127 | 133 | |
| 128 | - if (!empty($modSettings['drafts_post_enabled'])) |
|
| 129 | - echo ' |
|
| 134 | + if (!empty($modSettings['drafts_post_enabled'])) { |
|
| 135 | + echo ' |
|
| 130 | 136 | <div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>', |
| 131 | 137 | sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), ' |
| 132 | 138 | ', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), ' |
| 133 | 139 | </div>'; |
| 140 | + } |
|
| 134 | 141 | |
| 135 | 142 | // The post header... important stuff |
| 136 | 143 | echo ' |
@@ -183,9 +190,10 @@ discard block |
||
| 183 | 190 | echo ' |
| 184 | 191 | <optgroup label="', $category['name'], '">'; |
| 185 | 192 | |
| 186 | - foreach ($category['boards'] as $board) |
|
| 187 | - echo ' |
|
| 193 | + foreach ($category['boards'] as $board) { |
|
| 194 | + echo ' |
|
| 188 | 195 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], ' </option>'; |
| 196 | + } |
|
| 189 | 197 | echo ' |
| 190 | 198 | </optgroup>'; |
| 191 | 199 | } |
@@ -221,9 +229,10 @@ discard block |
||
| 221 | 229 | <span class="label">', $txt['calendar_timezone'], '</span> |
| 222 | 230 | <select name="tz" id="tz"', !empty($context['event']['allday']) ? ' disabled' : '', '>'; |
| 223 | 231 | |
| 224 | - foreach ($context['all_timezones'] as $tz => $tzname) |
|
| 225 | - echo ' |
|
| 232 | + foreach ($context['all_timezones'] as $tz => $tzname) { |
|
| 233 | + echo ' |
|
| 226 | 234 | <option value="', $tz, '"', $tz == $context['event']['tz'] ? ' selected' : '', '>', $tzname, '</option>'; |
| 235 | + } |
|
| 227 | 236 | |
| 228 | 237 | echo ' |
| 229 | 238 | </select> |
@@ -291,14 +300,15 @@ discard block |
||
| 291 | 300 | <input type="checkbox" id="poll_change_vote" name="poll_change_vote"', !empty($context['poll']['change_vote']) ? ' checked' : '', '> |
| 292 | 301 | </dd>'; |
| 293 | 302 | |
| 294 | - if ($context['poll_options']['guest_vote_enabled']) |
|
| 295 | - echo ' |
|
| 303 | + if ($context['poll_options']['guest_vote_enabled']) { |
|
| 304 | + echo ' |
|
| 296 | 305 | <dt> |
| 297 | 306 | <label for="poll_guest_vote">', $txt['poll_guest_vote'], ':</label> |
| 298 | 307 | </dt> |
| 299 | 308 | <dd> |
| 300 | 309 | <input type="checkbox" id="poll_guest_vote" name="poll_guest_vote"', !empty($context['poll_options']['guest_vote']) ? ' checked' : '', '> |
| 301 | 310 | </dd>'; |
| 311 | + } |
|
| 302 | 312 | |
| 303 | 313 | echo ' |
| 304 | 314 | <dt> |
@@ -319,8 +329,8 @@ discard block |
||
| 319 | 329 | ', template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'); |
| 320 | 330 | |
| 321 | 331 | // If we're editing and displaying edit details, show a box where they can say why |
| 322 | - if (isset($context['editing']) && $modSettings['show_modify']) |
|
| 323 | - echo ' |
|
| 332 | + if (isset($context['editing']) && $modSettings['show_modify']) { |
|
| 333 | + echo ' |
|
| 324 | 334 | <dl> |
| 325 | 335 | <dt class="clear"> |
| 326 | 336 | <span id="caption_edit_reason">', $txt['reason_for_edit'], ':</span> |
@@ -329,20 +339,23 @@ discard block |
||
| 329 | 339 | <input type="text" name="modify_reason"', isset($context['last_modified_reason']) ? ' value="' . $context['last_modified_reason'] . '"' : '', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80"> |
| 330 | 340 | </dd> |
| 331 | 341 | </dl>'; |
| 342 | + } |
|
| 332 | 343 | |
| 333 | 344 | // If this message has been edited in the past - display when it was. |
| 334 | - if (isset($context['last_modified'])) |
|
| 335 | - echo ' |
|
| 345 | + if (isset($context['last_modified'])) { |
|
| 346 | + echo ' |
|
| 336 | 347 | <div class="padding smalltext"> |
| 337 | 348 | ', $context['last_modified_text'], ' |
| 338 | 349 | </div>'; |
| 350 | + } |
|
| 339 | 351 | |
| 340 | 352 | // If the admin has enabled the hiding of the additional options - show a link and image for it. |
| 341 | - if (!empty($modSettings['additional_options_collapsable'])) |
|
| 342 | - echo ' |
|
| 353 | + if (!empty($modSettings['additional_options_collapsable'])) { |
|
| 354 | + echo ' |
|
| 343 | 355 | <div id="postAdditionalOptionsHeader"> |
| 344 | 356 | <strong><a href="#" id="postMoreExpandLink"> ', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong> |
| 345 | 357 | </div>'; |
| 358 | + } |
|
| 346 | 359 | |
| 347 | 360 | echo ' |
| 348 | 361 | <div id="postAdditionalOptions">'; |
@@ -375,19 +388,21 @@ discard block |
||
| 375 | 388 | ', $txt['uncheck_unwatchd_attach'], ': |
| 376 | 389 | </dd>'; |
| 377 | 390 | |
| 378 | - foreach ($context['current_attachments'] as $attachment) |
|
| 379 | - echo ' |
|
| 391 | + foreach ($context['current_attachments'] as $attachment) { |
|
| 392 | + echo ' |
|
| 380 | 393 | <dd class="smalltext"> |
| 381 | 394 | <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'] . ')' : ''), |
| 382 | 395 | !empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit']) ? sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0)) : '', '</label> |
| 383 | 396 | </dd>'; |
| 397 | + } |
|
| 384 | 398 | |
| 385 | 399 | echo ' |
| 386 | 400 | </dl>'; |
| 387 | 401 | |
| 388 | - if (!empty($context['files_in_session_warning'])) |
|
| 389 | - echo ' |
|
| 402 | + if (!empty($context['files_in_session_warning'])) { |
|
| 403 | + echo ' |
|
| 390 | 404 | <div class="smalltext">', $context['files_in_session_warning'], '</div>'; |
| 405 | + } |
|
| 391 | 406 | } |
| 392 | 407 | |
| 393 | 408 | // Is the user allowed to post any additional ones? If so give them the boxes to do it! |
@@ -451,8 +466,8 @@ discard block |
||
| 451 | 466 | ', empty($modSettings['attachmentSizeLimit']) ? '' : ('<input type="hidden" name="MAX_FILE_SIZE" value="' . $modSettings['attachmentSizeLimit'] * 1024 . '">'); |
| 452 | 467 | |
| 453 | 468 | // Show more boxes if they aren't approaching that limit. |
| 454 | - if ($context['num_allowed_attachments'] > 1) |
|
| 455 | - echo ' |
|
| 469 | + if ($context['num_allowed_attachments'] > 1) { |
|
| 470 | + echo ' |
|
| 456 | 471 | <script> |
| 457 | 472 | var allowed_attachments = ', $context['num_allowed_attachments'], '; |
| 458 | 473 | var current_attachment = 1; |
@@ -473,9 +488,10 @@ discard block |
||
| 473 | 488 | </div><!-- .fallback --> |
| 474 | 489 | </div><!-- #attachUpload --> |
| 475 | 490 | </dd>'; |
| 476 | - else |
|
| 477 | - echo ' |
|
| 491 | + } else { |
|
| 492 | + echo ' |
|
| 478 | 493 | </dd>'; |
| 494 | + } |
|
| 479 | 495 | |
| 480 | 496 | // Add any template changes for an alternative upload system here. |
| 481 | 497 | call_integration_hook('integrate_upload_template'); |
@@ -484,21 +500,25 @@ discard block |
||
| 484 | 500 | <dd class="smalltext">'; |
| 485 | 501 | |
| 486 | 502 | // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. |
| 487 | - if (!empty($modSettings['attachmentCheckExtensions'])) |
|
| 488 | - echo ' |
|
| 503 | + if (!empty($modSettings['attachmentCheckExtensions'])) { |
|
| 504 | + echo ' |
|
| 489 | 505 | ', $txt['allowed_types'], ': ', $context['allowed_extensions'], '<br>'; |
| 506 | + } |
|
| 490 | 507 | |
| 491 | - if (!empty($context['attachment_restrictions'])) |
|
| 492 | - echo ' |
|
| 508 | + if (!empty($context['attachment_restrictions'])) { |
|
| 509 | + echo ' |
|
| 493 | 510 | ', $txt['attach_restrictions'], ' ', implode(', ', $context['attachment_restrictions']), '<br>'; |
| 511 | + } |
|
| 494 | 512 | |
| 495 | - if ($context['num_allowed_attachments'] == 0) |
|
| 496 | - echo ' |
|
| 513 | + if ($context['num_allowed_attachments'] == 0) { |
|
| 514 | + echo ' |
|
| 497 | 515 | ', $txt['attach_limit_nag'], '<br>'; |
| 516 | + } |
|
| 498 | 517 | |
| 499 | - if (!$context['can_post_attachment_unapproved']) |
|
| 500 | - echo ' |
|
| 518 | + if (!$context['can_post_attachment_unapproved']) { |
|
| 519 | + echo ' |
|
| 501 | 520 | <span class="alert">', $txt['attachment_requires_approval'], '</span>', '<br>'; |
| 521 | + } |
|
| 502 | 522 | |
| 503 | 523 | echo ' |
| 504 | 524 | </dd> |
@@ -522,10 +542,11 @@ discard block |
||
| 522 | 542 | <dt><strong>', $txt['subject'], '</strong></dt> |
| 523 | 543 | <dd><strong>', $txt['draft_saved_on'], '</strong></dd>'; |
| 524 | 544 | |
| 525 | - foreach ($context['drafts'] as $draft) |
|
| 526 | - echo ' |
|
| 545 | + foreach ($context['drafts'] as $draft) { |
|
| 546 | + echo ' |
|
| 527 | 547 | <dt>', $draft['link'], '</dt> |
| 528 | 548 | <dd>', $draft['poster_time'], '</dd>'; |
| 549 | + } |
|
| 529 | 550 | echo ' |
| 530 | 551 | </dl> |
| 531 | 552 | </div>'; |
@@ -550,9 +571,10 @@ discard block |
||
| 550 | 571 | ', template_control_richedit_buttons($context['post_box_name']); |
| 551 | 572 | |
| 552 | 573 | // Option to delete an event if user is editing one. |
| 553 | - if ($context['make_event'] && !$context['event']['new']) |
|
| 554 | - echo ' |
|
| 574 | + if ($context['make_event'] && !$context['event']['new']) { |
|
| 575 | + echo ' |
|
| 555 | 576 | <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" data-confirm="', $txt['event_delete_confirm'] ,'" class="button you_sure">'; |
| 577 | + } |
|
| 556 | 578 | |
| 557 | 579 | echo ' |
| 558 | 580 | </span> |
@@ -561,9 +583,10 @@ discard block |
||
| 561 | 583 | <br class="clear">'; |
| 562 | 584 | |
| 563 | 585 | // Assuming this isn't a new topic pass across the last message id. |
| 564 | - if (isset($context['topic_last_message'])) |
|
| 565 | - echo ' |
|
| 586 | + if (isset($context['topic_last_message'])) { |
|
| 587 | + echo ' |
|
| 566 | 588 | <input type="hidden" name="last_msg" value="', $context['topic_last_message'], '">'; |
| 589 | + } |
|
| 567 | 590 | |
| 568 | 591 | echo ' |
| 569 | 592 | <input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '"> |
@@ -705,9 +728,10 @@ discard block |
||
| 705 | 728 | |
| 706 | 729 | 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>\';'; |
| 707 | 730 | |
| 708 | - if ($context['can_quote']) |
|
| 709 | - echo ' |
|
| 731 | + if ($context['can_quote']) { |
|
| 732 | + echo ' |
|
| 710 | 733 | 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>\';'; |
| 734 | + } |
|
| 711 | 735 | |
| 712 | 736 | echo ' |
| 713 | 737 | newPostsHTML += \'<br class="clear">\'; |
@@ -750,8 +774,8 @@ discard block |
||
| 750 | 774 | }'; |
| 751 | 775 | |
| 752 | 776 | // Code for showing and hiding additional options. |
| 753 | - if (!empty($modSettings['additional_options_collapsable'])) |
|
| 754 | - echo ' |
|
| 777 | + if (!empty($modSettings['additional_options_collapsable'])) { |
|
| 778 | + echo ' |
|
| 755 | 779 | var oSwapAdditionalOptions = new smc_Toggle({ |
| 756 | 780 | bToggleEnabled: true, |
| 757 | 781 | bCurrentlyCollapsed: ', $context['show_additional_options'] ? 'false' : 'true', ', |
@@ -779,10 +803,11 @@ discard block |
||
| 779 | 803 | } |
| 780 | 804 | ] |
| 781 | 805 | });'; |
| 806 | + } |
|
| 782 | 807 | |
| 783 | 808 | // Code for showing and hiding drafts |
| 784 | - if (!empty($context['drafts'])) |
|
| 785 | - echo ' |
|
| 809 | + if (!empty($context['drafts'])) { |
|
| 810 | + echo ' |
|
| 786 | 811 | var oSwapDraftOptions = new smc_Toggle({ |
| 787 | 812 | bToggleEnabled: true, |
| 788 | 813 | bCurrentlyCollapsed: true, |
@@ -804,6 +829,7 @@ discard block |
||
| 804 | 829 | } |
| 805 | 830 | ] |
| 806 | 831 | });'; |
| 832 | + } |
|
| 807 | 833 | |
| 808 | 834 | echo ' |
| 809 | 835 | var oEditorID = "', $context['post_box_name'] ,'"; |
@@ -824,8 +850,9 @@ discard block |
||
| 824 | 850 | foreach ($context['previous_posts'] as $post) |
| 825 | 851 | { |
| 826 | 852 | $ignoring = false; |
| 827 | - if (!empty($post['is_ignored'])) |
|
| 828 | - $ignored_posts[] = $ignoring = $post['id']; |
|
| 853 | + if (!empty($post['is_ignored'])) { |
|
| 854 | + $ignored_posts[] = $ignoring = $post['id']; |
|
| 855 | + } |
|
| 829 | 856 | |
| 830 | 857 | echo ' |
| 831 | 858 | <div class="windowbg"> |
@@ -1007,10 +1034,10 @@ discard block |
||
| 1007 | 1034 | <div id="temporary_posting_area" style="display: none;"></div> |
| 1008 | 1035 | <script>'; |
| 1009 | 1036 | |
| 1010 | - if ($context['close_window']) |
|
| 1011 | - echo ' |
|
| 1037 | + if ($context['close_window']) { |
|
| 1038 | + echo ' |
|
| 1012 | 1039 | window.close();'; |
| 1013 | - else |
|
| 1040 | + } else |
|
| 1014 | 1041 | { |
| 1015 | 1042 | // Lucky for us, Internet Explorer has an "innerText" feature which basically converts entities <--> text. Use it if possible ;) |
| 1016 | 1043 | echo ' |
@@ -1064,11 +1091,12 @@ discard block |
||
| 1064 | 1091 | </p> |
| 1065 | 1092 | <ul>'; |
| 1066 | 1093 | |
| 1067 | - foreach ($context['groups'] as $group) |
|
| 1068 | - echo ' |
|
| 1094 | + foreach ($context['groups'] as $group) { |
|
| 1095 | + echo ' |
|
| 1069 | 1096 | <li> |
| 1070 | 1097 | <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> |
| 1071 | 1098 | </li>'; |
| 1099 | + } |
|
| 1072 | 1100 | |
| 1073 | 1101 | echo ' |
| 1074 | 1102 | <li> |
@@ -148,8 +148,8 @@ discard block |
||
| 148 | 148 | </thead> |
| 149 | 149 | <tbody>'; |
| 150 | 150 | |
| 151 | - foreach ($context['membergroups'] as $membergroup) |
|
| 152 | - echo ' |
|
| 151 | + foreach ($context['membergroups'] as $membergroup) { |
|
| 152 | + echo ' |
|
| 153 | 153 | <tr class="windowbg"> |
| 154 | 154 | <td>', $membergroup['name'], '</td> |
| 155 | 155 | <td class="centercol"> |
@@ -159,6 +159,7 @@ discard block |
||
| 159 | 159 | ', $membergroup['can_be_additional'] ? '<input type="checkbox" name="membergroups[2][]" value="' . $membergroup['id'] . '" checked>' : '', ' |
| 160 | 160 | </td> |
| 161 | 161 | </tr>'; |
| 162 | + } |
|
| 162 | 163 | |
| 163 | 164 | echo ' |
| 164 | 165 | <tr class="windowbg"> |
@@ -185,8 +186,8 @@ discard block |
||
| 185 | 186 | </thead> |
| 186 | 187 | <tbody>'; |
| 187 | 188 | |
| 188 | - foreach ($context['postgroups'] as $postgroup) |
|
| 189 | - echo ' |
|
| 189 | + foreach ($context['postgroups'] as $postgroup) { |
|
| 190 | + echo ' |
|
| 190 | 191 | <tr class="windowbg"> |
| 191 | 192 | <td> |
| 192 | 193 | ', $postgroup['name'], ' |
@@ -195,6 +196,7 @@ discard block |
||
| 195 | 196 | <input type="checkbox" name="postgroups[]" value="', $postgroup['id'], '" checked> |
| 196 | 197 | </td> |
| 197 | 198 | </tr>'; |
| 199 | + } |
|
| 198 | 200 | |
| 199 | 201 | echo ' |
| 200 | 202 | <tr class="windowbg"> |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | <div class="windowbg2 noup"> |
| 128 | 128 | <dl class="settings">'; |
| 129 | 129 | |
| 130 | - if (!empty($context['table_info'])) |
|
| 131 | - echo ' |
|
| 130 | + if (!empty($context['table_info'])) { |
|
| 131 | + echo ' |
|
| 132 | 132 | <dt> |
| 133 | 133 | <strong>', $txt['search_method_messages_table_space'], ':</strong> |
| 134 | 134 | </dt> |
@@ -141,6 +141,7 @@ discard block |
||
| 141 | 141 | <dd> |
| 142 | 142 | ', $context['table_info']['index_length'], ' |
| 143 | 143 | </dd>'; |
| 144 | + } |
|
| 144 | 145 | echo ' |
| 145 | 146 | </dl> |
| 146 | 147 | ', $context['double_index'] ? '<div class="noticebox"> |
@@ -163,17 +164,17 @@ discard block |
||
| 163 | 164 | <dd> |
| 164 | 165 | <span class="smalltext">'; |
| 165 | 166 | |
| 166 | - if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) |
|
| 167 | - echo ' |
|
| 167 | + if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext'])) { |
|
| 168 | + echo ' |
|
| 168 | 169 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_create'], '</a>]'; |
| 169 | - |
|
| 170 | - elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) |
|
| 171 | - echo ' |
|
| 170 | + } elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext'])) { |
|
| 171 | + echo ' |
|
| 172 | 172 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create']; |
| 173 | - else |
|
| 174 | - echo ' |
|
| 173 | + } else { |
|
| 174 | + echo ' |
|
| 175 | 175 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_method_fulltext_remove'], '</a>]<br> |
| 176 | 176 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length']; |
| 177 | + } |
|
| 177 | 178 | echo ' |
| 178 | 179 | </span> |
| 179 | 180 | </dd>'; |
@@ -187,26 +188,27 @@ discard block |
||
| 187 | 188 | <dd> |
| 188 | 189 | <span class="smalltext">'; |
| 189 | 190 | |
| 190 | - if ($context['custom_index']) |
|
| 191 | - echo ' |
|
| 191 | + if ($context['custom_index']) { |
|
| 192 | + echo ' |
|
| 192 | 193 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>]<br> |
| 193 | 194 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
| 194 | - |
|
| 195 | - elseif ($context['partial_custom_index']) |
|
| 196 | - echo ' |
|
| 195 | + } elseif ($context['partial_custom_index']) { |
|
| 196 | + echo ' |
|
| 197 | 197 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], ';', $context['admin-msm_token_var'], '=', $context['admin-msm_token'], '">', $txt['search_index_custom_resume'], '</a>]<br> |
| 198 | 198 | <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length']; |
| 199 | - else |
|
| 200 | - echo ' |
|
| 199 | + } else { |
|
| 200 | + echo ' |
|
| 201 | 201 | <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>]'; |
| 202 | + } |
|
| 202 | 203 | echo ' |
| 203 | 204 | </span> |
| 204 | 205 | </dd>'; |
| 205 | 206 | |
| 206 | 207 | foreach ($context['search_apis'] as $api) |
| 207 | 208 | { |
| 208 | - if (empty($api['label']) || $api['has_template']) |
|
| 209 | - continue; |
|
| 209 | + if (empty($api['label']) || $api['has_template']) { |
|
| 210 | + continue; |
|
| 211 | + } |
|
| 210 | 212 | |
| 211 | 213 | echo ' |
| 212 | 214 | <dt> |
@@ -214,12 +216,13 @@ discard block |
||
| 214 | 216 | ', $api['label'], ' |
| 215 | 217 | </dt>'; |
| 216 | 218 | |
| 217 | - if ($api['desc']) |
|
| 218 | - echo ' |
|
| 219 | + if ($api['desc']) { |
|
| 220 | + echo ' |
|
| 219 | 221 | <dd> |
| 220 | 222 | <span class="smalltext">', $api['desc'], '</span> |
| 221 | 223 | </dd>'; |
| 222 | 224 | } |
| 225 | + } |
|
| 223 | 226 | |
| 224 | 227 | echo ' |
| 225 | 228 | </dl> |
@@ -91,8 +91,9 @@ discard block |
||
| 91 | 91 | foreach ($section['areas'] as $i => $area) |
| 92 | 92 | { |
| 93 | 93 | // Not supposed to be printed? |
| 94 | - if (empty($area['label'])) |
|
| 95 | - continue; |
|
| 94 | + if (empty($area['label'])) { |
|
| 95 | + continue; |
|
| 96 | + } |
|
| 96 | 97 | |
| 97 | 98 | echo ' |
| 98 | 99 | <li', !empty($area['subsections']) ? ' class="subsections"' : '', '>'; |
@@ -101,8 +102,9 @@ discard block |
||
| 101 | 102 | <a class="', $area['icon_class'], !empty($area['selected']) ? ' chosen ' : '', '" href="', (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i), $menu_context['extra_parameters'], '">', $area['icon'], $area['label'], '</a>'; |
| 102 | 103 | |
| 103 | 104 | // Is this the current area, or just some area? |
| 104 | - if (!empty($area['selected']) && empty($context['tabs'])) |
|
| 105 | - $context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array(); |
|
| 105 | + if (!empty($area['selected']) && empty($context['tabs'])) { |
|
| 106 | + $context['tabs'] = isset($area['subsections']) ? $area['subsections'] : array(); |
|
| 107 | + } |
|
| 106 | 108 | |
| 107 | 109 | // Are there any subsections? |
| 108 | 110 | if (!empty($area['subsections'])) |
@@ -112,8 +114,9 @@ discard block |
||
| 112 | 114 | |
| 113 | 115 | foreach ($area['subsections'] as $sa => $sub) |
| 114 | 116 | { |
| 115 | - if (!empty($sub['disabled'])) |
|
| 116 | - continue; |
|
| 117 | + if (!empty($sub['disabled'])) { |
|
| 118 | + continue; |
|
| 119 | + } |
|
| 117 | 120 | |
| 118 | 121 | $url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa; |
| 119 | 122 | |
@@ -160,8 +163,9 @@ discard block |
||
| 160 | 163 | <h3 class="catbg">'; |
| 161 | 164 | |
| 162 | 165 | // The function is in Admin.template.php, but since this template is used elsewhere too better check if the function is available |
| 163 | - if (function_exists('template_admin_quick_search')) |
|
| 164 | - template_admin_quick_search(); |
|
| 166 | + if (function_exists('template_admin_quick_search')) { |
|
| 167 | + template_admin_quick_search(); |
|
| 168 | + } |
|
| 165 | 169 | |
| 166 | 170 | // Exactly how many tabs do we have? |
| 167 | 171 | if (!empty($context['tabs'])) |
@@ -176,30 +180,36 @@ discard block |
||
| 176 | 180 | } |
| 177 | 181 | |
| 178 | 182 | // Did this not even exist - or do we not have a label? |
| 179 | - if (!isset($tab_context['tabs'][$id])) |
|
| 180 | - $tab_context['tabs'][$id] = array('label' => $tab['label']); |
|
| 181 | - elseif (!isset($tab_context['tabs'][$id]['label'])) |
|
| 182 | - $tab_context['tabs'][$id]['label'] = $tab['label']; |
|
| 183 | + if (!isset($tab_context['tabs'][$id])) { |
|
| 184 | + $tab_context['tabs'][$id] = array('label' => $tab['label']); |
|
| 185 | + } elseif (!isset($tab_context['tabs'][$id]['label'])) { |
|
| 186 | + $tab_context['tabs'][$id]['label'] = $tab['label']; |
|
| 187 | + } |
|
| 183 | 188 | |
| 184 | 189 | // Has a custom URL defined in the main admin structure? |
| 185 | - if (isset($tab['url']) && !isset($tab_context['tabs'][$id]['url'])) |
|
| 186 | - $tab_context['tabs'][$id]['url'] = $tab['url']; |
|
| 190 | + if (isset($tab['url']) && !isset($tab_context['tabs'][$id]['url'])) { |
|
| 191 | + $tab_context['tabs'][$id]['url'] = $tab['url']; |
|
| 192 | + } |
|
| 187 | 193 | |
| 188 | 194 | // Any additional paramaters for the url? |
| 189 | - if (isset($tab['add_params']) && !isset($tab_context['tabs'][$id]['add_params'])) |
|
| 190 | - $tab_context['tabs'][$id]['add_params'] = $tab['add_params']; |
|
| 195 | + if (isset($tab['add_params']) && !isset($tab_context['tabs'][$id]['add_params'])) { |
|
| 196 | + $tab_context['tabs'][$id]['add_params'] = $tab['add_params']; |
|
| 197 | + } |
|
| 191 | 198 | |
| 192 | 199 | // Has it been deemed selected? |
| 193 | - if (!empty($tab['is_selected'])) |
|
| 194 | - $tab_context['tabs'][$id]['is_selected'] = true; |
|
| 200 | + if (!empty($tab['is_selected'])) { |
|
| 201 | + $tab_context['tabs'][$id]['is_selected'] = true; |
|
| 202 | + } |
|
| 195 | 203 | |
| 196 | 204 | // Does it have its own help? |
| 197 | - if (!empty($tab['help'])) |
|
| 198 | - $tab_context['tabs'][$id]['help'] = $tab['help']; |
|
| 205 | + if (!empty($tab['help'])) { |
|
| 206 | + $tab_context['tabs'][$id]['help'] = $tab['help']; |
|
| 207 | + } |
|
| 199 | 208 | |
| 200 | 209 | // Is this the last one? |
| 201 | - if (!empty($tab['is_last']) && !isset($tab_context['override_last'])) |
|
| 202 | - $tab_context['tabs'][$id]['is_last'] = true; |
|
| 210 | + if (!empty($tab['is_last']) && !isset($tab_context['override_last'])) { |
|
| 211 | + $tab_context['tabs'][$id]['is_last'] = true; |
|
| 212 | + } |
|
| 203 | 213 | } |
| 204 | 214 | |
| 205 | 215 | // Find the selected tab |
@@ -216,20 +226,21 @@ discard block |
||
| 216 | 226 | // Show an icon and/or a help item? |
| 217 | 227 | if (!empty($selected_tab['icon_class']) || !empty($tab_context['icon_class']) || !empty($selected_tab['icon']) || !empty($tab_context['icon']) || !empty($selected_tab['help']) || !empty($tab_context['help'])) |
| 218 | 228 | { |
| 219 | - if (!empty($selected_tab['icon_class']) || !empty($tab_context['icon_class'])) |
|
| 220 | - echo ' |
|
| 229 | + if (!empty($selected_tab['icon_class']) || !empty($tab_context['icon_class'])) { |
|
| 230 | + echo ' |
|
| 221 | 231 | <span class="', !empty($selected_tab['icon_class']) ? $selected_tab['icon_class'] : $tab_context['icon_class'], ' icon"></span>'; |
| 222 | - elseif (!empty($selected_tab['icon']) || !empty($tab_context['icon'])) |
|
| 223 | - echo ' |
|
| 232 | + } elseif (!empty($selected_tab['icon']) || !empty($tab_context['icon'])) { |
|
| 233 | + echo ' |
|
| 224 | 234 | <img src="', $settings['images_url'], '/icons/', !empty($selected_tab['icon']) ? $selected_tab['icon'] : $tab_context['icon'], '" alt="" class="icon">'; |
| 235 | + } |
|
| 225 | 236 | |
| 226 | - if (!empty($selected_tab['help']) || !empty($tab_context['help'])) |
|
| 227 | - echo ' |
|
| 237 | + if (!empty($selected_tab['help']) || !empty($tab_context['help'])) { |
|
| 238 | + echo ' |
|
| 228 | 239 | <a href="', $scripturl, '?action=helpadmin;help=', !empty($selected_tab['help']) ? $selected_tab['help'] : $tab_context['help'], '" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a>'; |
| 240 | + } |
|
| 229 | 241 | |
| 230 | 242 | echo $tab_context['title']; |
| 231 | - } |
|
| 232 | - else |
|
| 243 | + } else |
|
| 233 | 244 | { |
| 234 | 245 | echo ' |
| 235 | 246 | ', $tab_context['title']; |
@@ -242,11 +253,12 @@ discard block |
||
| 242 | 253 | } |
| 243 | 254 | |
| 244 | 255 | // Shall we use the tabs? Yes, it's the only known way! |
| 245 | - if (!empty($selected_tab['description']) || !empty($tab_context['description'])) |
|
| 246 | - echo ' |
|
| 256 | + if (!empty($selected_tab['description']) || !empty($tab_context['description'])) { |
|
| 257 | + echo ' |
|
| 247 | 258 | <p class="information"> |
| 248 | 259 | ', !empty($selected_tab['description']) ? $selected_tab['description'] : $tab_context['description'], ' |
| 249 | 260 | </p>'; |
| 261 | + } |
|
| 250 | 262 | |
| 251 | 263 | // Print out all the items in this tab (if any). |
| 252 | 264 | if (!empty($context['tabs'])) |
@@ -258,8 +270,9 @@ discard block |
||
| 258 | 270 | |
| 259 | 271 | foreach ($tab_context['tabs'] as $sa => $tab) |
| 260 | 272 | { |
| 261 | - if (!empty($tab['disabled'])) |
|
| 262 | - continue; |
|
| 273 | + if (!empty($tab['disabled'])) { |
|
| 274 | + continue; |
|
| 275 | + } |
|
| 263 | 276 | |
| 264 | 277 | if (!empty($tab['is_selected'])) |
| 265 | 278 | { |
@@ -267,12 +280,12 @@ discard block |
||
| 267 | 280 | <li> |
| 268 | 281 | <a class="active" href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">', $tab['label'], '</a> |
| 269 | 282 | </li>'; |
| 270 | - } |
|
| 271 | - else |
|
| 272 | - echo ' |
|
| 283 | + } else { |
|
| 284 | + echo ' |
|
| 273 | 285 | <li> |
| 274 | 286 | <a href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '">', $tab['label'], '</a> |
| 275 | 287 | </li>'; |
| 288 | + } |
|
| 276 | 289 | } |
| 277 | 290 | |
| 278 | 291 | // The end of tabs |
@@ -20,13 +20,12 @@ |
||
| 20 | 20 | // We completed some tasks? |
| 21 | 21 | if (!empty($context['tasks_were_run'])) |
| 22 | 22 | { |
| 23 | - if (empty($context['scheduled_errors'])) |
|
| 24 | - echo ' |
|
| 23 | + if (empty($context['scheduled_errors'])) { |
|
| 24 | + echo ' |
|
| 25 | 25 | <div class="infobox"> |
| 26 | 26 | ', $txt['scheduled_tasks_were_run'], ' |
| 27 | 27 | </div>'; |
| 28 | - |
|
| 29 | - else |
|
| 28 | + } else |
|
| 30 | 29 | { |
| 31 | 30 | echo ' |
| 32 | 31 | <div class="errorbox" id="errors"> |
@@ -25,18 +25,20 @@ discard block |
||
| 25 | 25 | </div> |
| 26 | 26 | <div class="windowbg2 noup">'; |
| 27 | 27 | |
| 28 | - if (!empty($context['move_board'])) |
|
| 29 | - echo ' |
|
| 28 | + if (!empty($context['move_board'])) { |
|
| 29 | + echo ' |
|
| 30 | 30 | <div class="noticebox"> |
| 31 | 31 | ', $context['move_title'], ' [<a href="', $scripturl, '?action=admin;area=manageboards">', $txt['mboards_cancel_moving'], '</a>]', ' |
| 32 | 32 | </div>'; |
| 33 | + } |
|
| 33 | 34 | |
| 34 | 35 | // No categories so show a label. |
| 35 | - if (empty($context['categories'])) |
|
| 36 | - echo ' |
|
| 36 | + if (empty($context['categories'])) { |
|
| 37 | + echo ' |
|
| 37 | 38 | <div class="windowbg centertext"> |
| 38 | 39 | ', $txt['mboards_no_cats'], ' |
| 39 | 40 | </div>'; |
| 41 | + } |
|
| 40 | 42 | |
| 41 | 43 | // Loop through every category, listing the boards in each as we go. |
| 42 | 44 | foreach ($context['categories'] as $category) |
@@ -54,9 +56,10 @@ discard block |
||
| 54 | 56 | <form action="', $scripturl, '?action=admin;area=manageboards;sa=newboard;cat=', $category['id'], '" method="post" accept-charset="', $context['character_set'], '"> |
| 55 | 57 | <ul id="category_', $category['id'], '" class="nolist">'; |
| 56 | 58 | |
| 57 | - if (!empty($category['move_link'])) |
|
| 58 | - echo ' |
|
| 59 | + if (!empty($category['move_link'])) { |
|
| 60 | + echo ' |
|
| 59 | 61 | <li><a href="', $category['move_link']['href'], '" title="', $category['move_link']['label'], '"><span class="generic_icons select_above"></span></a></li>'; |
| 62 | + } |
|
| 60 | 63 | |
| 61 | 64 | $recycle_board = '<a href="' . $scripturl . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.png" alt="' . $txt['recycle_board'] . '" title="' . $txt['recycle_board'] . '"></a>'; |
| 62 | 65 | $redirect_board = '<img src="' . $settings['images_url'] . '/new_redirect.png" alt="' . $txt['redirect_board_desc'] . '" title="' . $txt['redirect_board_desc'] . '">'; |
@@ -81,9 +84,10 @@ discard block |
||
| 81 | 84 | echo ' |
| 82 | 85 | <li class="windowbg" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">'; |
| 83 | 86 | |
| 84 | - foreach ($board['move_links'] as $link) |
|
| 85 | - echo ' |
|
| 87 | + foreach ($board['move_links'] as $link) { |
|
| 88 | + echo ' |
|
| 86 | 89 | <a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><span class="generic_icons select_', $link['class'], '" title="', $link['label'], '"></span></a>'; |
| 90 | + } |
|
| 87 | 91 | |
| 88 | 92 | echo ' |
| 89 | 93 | </li>'; |
@@ -132,9 +136,10 @@ discard block |
||
| 132 | 136 | <select name="cat_order">'; |
| 133 | 137 | |
| 134 | 138 | // Print every existing category into a select box. |
| 135 | - foreach ($context['category_order'] as $order) |
|
| 136 | - echo ' |
|
| 139 | + foreach ($context['category_order'] as $order) { |
|
| 140 | + echo ' |
|
| 137 | 141 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
| 142 | + } |
|
| 138 | 143 | echo ' |
| 139 | 144 | </select> |
| 140 | 145 | </dd>'; |
@@ -169,14 +174,15 @@ discard block |
||
| 169 | 174 | { |
| 170 | 175 | foreach ($context['custom_category_settings'] as $catset_id => $catset) |
| 171 | 176 | { |
| 172 | - if (!empty($catset['dt']) && !empty($catset['dd'])) |
|
| 173 | - echo ' |
|
| 177 | + if (!empty($catset['dt']) && !empty($catset['dd'])) { |
|
| 178 | + echo ' |
|
| 174 | 179 | <dt class="clear', !is_numeric($catset_id) ? ' catset_' . $catset_id : '', '"> |
| 175 | 180 | ', $catset['dt'], ' |
| 176 | 181 | </dt> |
| 177 | 182 | <dd', !is_numeric($catset_id) ? ' class="catset_' . $catset_id . '"' : '', '> |
| 178 | 183 | ', $catset['dd'], ' |
| 179 | 184 | </dd>'; |
| 185 | + } |
|
| 180 | 186 | } |
| 181 | 187 | } |
| 182 | 188 | |
@@ -184,21 +190,23 @@ discard block |
||
| 184 | 190 | echo ' |
| 185 | 191 | </dl>'; |
| 186 | 192 | |
| 187 | - if (isset($context['category']['is_new'])) |
|
| 188 | - echo ' |
|
| 193 | + if (isset($context['category']['is_new'])) { |
|
| 194 | + echo ' |
|
| 189 | 195 | <input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button">'; |
| 190 | - else |
|
| 191 | - echo ' |
|
| 196 | + } else { |
|
| 197 | + echo ' |
|
| 192 | 198 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button"> |
| 193 | 199 | <input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button you_sure">'; |
| 200 | + } |
|
| 194 | 201 | echo ' |
| 195 | 202 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 196 | 203 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
| 197 | 204 | |
| 198 | 205 | // If this category is empty we don't bother with the next confirmation screen. |
| 199 | - if ($context['category']['is_empty']) |
|
| 200 | - echo ' |
|
| 206 | + if ($context['category']['is_empty']) { |
|
| 207 | + echo ' |
|
| 201 | 208 | <input type="hidden" name="empty" value="1">'; |
| 209 | + } |
|
| 202 | 210 | |
| 203 | 211 | echo ' |
| 204 | 212 | </div><!-- .windowbg2 --> |
@@ -225,9 +233,10 @@ discard block |
||
| 225 | 233 | <p>', $txt['mboards_delete_cat_contains'], ':</p> |
| 226 | 234 | <ul>'; |
| 227 | 235 | |
| 228 | - foreach ($context['category']['children'] as $child) |
|
| 229 | - echo ' |
|
| 236 | + foreach ($context['category']['children'] as $child) { |
|
| 237 | + echo ' |
|
| 230 | 238 | <li>', $child, '</li>'; |
| 239 | + } |
|
| 231 | 240 | |
| 232 | 241 | echo ' |
| 233 | 242 | </ul> |
@@ -241,10 +250,11 @@ discard block |
||
| 241 | 250 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1"', count($context['category_order']) == 1 ? ' disabled' : '', '>', $txt['mboards_delete_option2'], '</label>: |
| 242 | 251 | <select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>'; |
| 243 | 252 | |
| 244 | - foreach ($context['category_order'] as $cat) |
|
| 245 | - if ($cat['id'] != 0) |
|
| 253 | + foreach ($context['category_order'] as $cat) { |
|
| 254 | + if ($cat['id'] != 0) |
|
| 246 | 255 | echo ' |
| 247 | 256 | <option value="', $cat['id'], '">', $cat['true_name'], '</option>'; |
| 257 | + } |
|
| 248 | 258 | |
| 249 | 259 | echo ' |
| 250 | 260 | </select> |
@@ -287,9 +297,10 @@ discard block |
||
| 287 | 297 | <dd> |
| 288 | 298 | <select name="new_cat" onchange="if (this.form.order) {this.form.order.disabled = this.options[this.selectedIndex].value != 0; this.form.board_order.disabled = this.options[this.selectedIndex].value != 0 || this.form.order.options[this.form.order.selectedIndex].value == \'\';}">'; |
| 289 | 299 | |
| 290 | - foreach ($context['categories'] as $category) |
|
| 291 | - echo ' |
|
| 300 | + foreach ($context['categories'] as $category) { |
|
| 301 | + echo ' |
|
| 292 | 302 | <option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>'; |
| 303 | + } |
|
| 293 | 304 | echo ' |
| 294 | 305 | </select> |
| 295 | 306 | </dd>'; |
@@ -317,9 +328,10 @@ discard block |
||
| 317 | 328 | <select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '> |
| 318 | 329 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : ''; |
| 319 | 330 | |
| 320 | - foreach ($context['board_order'] as $order) |
|
| 321 | - echo ' |
|
| 331 | + foreach ($context['board_order'] as $order) { |
|
| 332 | + echo ' |
|
| 322 | 333 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
| 334 | + } |
|
| 323 | 335 | echo ' |
| 324 | 336 | </select> |
| 325 | 337 | </dd>'; |
@@ -348,13 +360,15 @@ discard block |
||
| 348 | 360 | <dd> |
| 349 | 361 | <select name="profile">'; |
| 350 | 362 | |
| 351 | - if (isset($context['board']['is_new'])) |
|
| 352 | - echo ' |
|
| 363 | + if (isset($context['board']['is_new'])) { |
|
| 364 | + echo ' |
|
| 353 | 365 | <option value="-1">[', $txt['permission_profile_inherit'], ']</option>'; |
| 366 | + } |
|
| 354 | 367 | |
| 355 | - foreach ($context['profiles'] as $id => $profile) |
|
| 356 | - echo ' |
|
| 368 | + foreach ($context['profiles'] as $id => $profile) { |
|
| 369 | + echo ' |
|
| 357 | 370 | <option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
| 371 | + } |
|
| 358 | 372 | |
| 359 | 373 | echo ' |
| 360 | 374 | </select> |
@@ -367,8 +381,8 @@ discard block |
||
| 367 | 381 | </dt> |
| 368 | 382 | <dd>'; |
| 369 | 383 | |
| 370 | - if (!empty($modSettings['deny_boards_access'])) |
|
| 371 | - echo ' |
|
| 384 | + if (!empty($modSettings['deny_boards_access'])) { |
|
| 385 | + echo ' |
|
| 372 | 386 | <table> |
| 373 | 387 | <tr> |
| 374 | 388 | <td></td> |
@@ -376,10 +390,11 @@ discard block |
||
| 376 | 390 | <th>', $txt['permissions_option_off'], '</th> |
| 377 | 391 | <th>', $txt['permissions_option_deny'], '</th> |
| 378 | 392 | </tr>'; |
| 393 | + } |
|
| 379 | 394 | |
| 380 | 395 | // List all the membergroups so the user can choose who may access this board. |
| 381 | - foreach ($context['groups'] as $group) |
|
| 382 | - if (empty($modSettings['deny_boards_access'])) |
|
| 396 | + foreach ($context['groups'] as $group) { |
|
| 397 | + if (empty($modSettings['deny_boards_access'])) |
|
| 383 | 398 | echo ' |
| 384 | 399 | <label for="groups_', $group['id'], '"> |
| 385 | 400 | <input type="checkbox" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), '> |
@@ -387,8 +402,9 @@ discard block |
||
| 387 | 402 | ', $group['name'], ' |
| 388 | 403 | </span> |
| 389 | 404 | </label><br>'; |
| 390 | - else |
|
| 391 | - echo ' |
|
| 405 | + } |
|
| 406 | + else { |
|
| 407 | + echo ' |
|
| 392 | 408 | <tr> |
| 393 | 409 | <td> |
| 394 | 410 | <label for="groups_', $group['id'], '_a"> |
@@ -408,16 +424,17 @@ discard block |
||
| 408 | 424 | </td> |
| 409 | 425 | <td></td> |
| 410 | 426 | </tr>'; |
| 427 | + } |
|
| 411 | 428 | |
| 412 | - if (empty($modSettings['deny_boards_access'])) |
|
| 413 | - echo ' |
|
| 429 | + if (empty($modSettings['deny_boards_access'])) { |
|
| 430 | + echo ' |
|
| 414 | 431 | <span class="select_all_box"> |
| 415 | 432 | <em>', $txt['check_all'], '</em> <input type="checkbox" onclick="invertAll(this, this.form, \'groups[\');"> |
| 416 | 433 | </span> |
| 417 | 434 | <br><br> |
| 418 | 435 | </dd>'; |
| 419 | - else |
|
| 420 | - echo ' |
|
| 436 | + } else { |
|
| 437 | + echo ' |
|
| 421 | 438 | <tr class="select_all_box"> |
| 422 | 439 | <td> |
| 423 | 440 | </td> |
@@ -436,6 +453,7 @@ discard block |
||
| 436 | 453 | </tr> |
| 437 | 454 | </table> |
| 438 | 455 | </dd>'; |
| 456 | + } |
|
| 439 | 457 | |
| 440 | 458 | // Options to choose moderators, specify as announcement board and choose whether to count posts here. |
| 441 | 459 | echo ' |
@@ -490,8 +508,8 @@ discard block |
||
| 490 | 508 | </dl> |
| 491 | 509 | </div>'; |
| 492 | 510 | |
| 493 | - if ($context['board']['redirect']) |
|
| 494 | - echo ' |
|
| 511 | + if ($context['board']['redirect']) { |
|
| 512 | + echo ' |
|
| 495 | 513 | <div id="reset_redirect_div"> |
| 496 | 514 | <dl class="settings"> |
| 497 | 515 | <dt> |
@@ -504,6 +522,7 @@ discard block |
||
| 504 | 522 | </dd> |
| 505 | 523 | </dl> |
| 506 | 524 | </div>'; |
| 525 | + } |
|
| 507 | 526 | } |
| 508 | 527 | |
| 509 | 528 | echo ' |
@@ -531,9 +550,10 @@ discard block |
||
| 531 | 550 | <select name="boardtheme" id="boardtheme" onchange="refreshOptions();"> |
| 532 | 551 | <option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>'; |
| 533 | 552 | |
| 534 | - foreach ($context['themes'] as $theme) |
|
| 535 | - echo ' |
|
| 553 | + foreach ($context['themes'] as $theme) { |
|
| 554 | + echo ' |
|
| 536 | 555 | <option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
| 556 | + } |
|
| 537 | 557 | |
| 538 | 558 | echo ' |
| 539 | 559 | </select> |
@@ -562,14 +582,15 @@ discard block |
||
| 562 | 582 | |
| 563 | 583 | foreach ($context['custom_board_settings'] as $cbs_id => $cbs) |
| 564 | 584 | { |
| 565 | - if (!empty($cbs['dt']) && !empty($cbs['dd'])) |
|
| 566 | - echo ' |
|
| 585 | + if (!empty($cbs['dt']) && !empty($cbs['dd'])) { |
|
| 586 | + echo ' |
|
| 567 | 587 | <dt class="clear', !is_numeric($cbs_id) ? ' cbs_' . $cbs_id : '', '"> |
| 568 | 588 | ', $cbs['dt'], ' |
| 569 | 589 | </dt> |
| 570 | 590 | <dd', !is_numeric($cbs_id) ? ' class="cbs_' . $cbs_id . '"' : '', '> |
| 571 | 591 | ', $cbs['dd'], ' |
| 572 | 592 | </dd>'; |
| 593 | + } |
|
| 573 | 594 | } |
| 574 | 595 | |
| 575 | 596 | echo ' |
@@ -577,9 +598,10 @@ discard block |
||
| 577 | 598 | </div>'; |
| 578 | 599 | } |
| 579 | 600 | |
| 580 | - if (!empty($context['board']['is_recycle'])) |
|
| 581 | - echo ' |
|
| 601 | + if (!empty($context['board']['is_recycle'])) { |
|
| 602 | + echo ' |
|
| 582 | 603 | <div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>'; |
| 604 | + } |
|
| 583 | 605 | |
| 584 | 606 | echo ' |
| 585 | 607 | <input type="hidden" name="rid" value="', $context['redirect_location'], '"> |
@@ -587,21 +609,24 @@ discard block |
||
| 587 | 609 | <input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">'; |
| 588 | 610 | |
| 589 | 611 | // If this board has no children don't bother with the next confirmation screen. |
| 590 | - if ($context['board']['no_children']) |
|
| 591 | - echo ' |
|
| 612 | + if ($context['board']['no_children']) { |
|
| 613 | + echo ' |
|
| 592 | 614 | <input type="hidden" name="no_children" value="1">'; |
| 615 | + } |
|
| 593 | 616 | |
| 594 | - if (isset($context['board']['is_new'])) |
|
| 595 | - echo ' |
|
| 617 | + if (isset($context['board']['is_new'])) { |
|
| 618 | + echo ' |
|
| 596 | 619 | <input type="hidden" name="cur_cat" value="', $context['board']['category'], '"> |
| 597 | 620 | <input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
| 598 | - else |
|
| 599 | - echo ' |
|
| 621 | + } else { |
|
| 622 | + echo ' |
|
| 600 | 623 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button">'; |
| 624 | + } |
|
| 601 | 625 | |
| 602 | - if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) |
|
| 603 | - echo ' |
|
| 626 | + if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) { |
|
| 627 | + echo ' |
|
| 604 | 628 | <input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button you_sure">'; |
| 629 | + } |
|
| 605 | 630 | echo ' |
| 606 | 631 | </div><!-- .windowbg2 --> |
| 607 | 632 | </form> |
@@ -622,12 +647,13 @@ discard block |
||
| 622 | 647 | sItemListContainerId: \'moderator_container\', |
| 623 | 648 | aListItems: ['; |
| 624 | 649 | |
| 625 | - foreach ($context['board']['moderators'] as $id_member => $member_name) |
|
| 626 | - echo ' |
|
| 650 | + foreach ($context['board']['moderators'] as $id_member => $member_name) { |
|
| 651 | + echo ' |
|
| 627 | 652 | { |
| 628 | 653 | sItemId: ', JavaScriptEscape($id_member), ', |
| 629 | 654 | sItemName: ', JavaScriptEscape($member_name), ' |
| 630 | 655 | }', $id_member == $context['board']['last_moderator_id'] ? '' : ','; |
| 656 | + } |
|
| 631 | 657 | |
| 632 | 658 | echo ' |
| 633 | 659 | ] |
@@ -647,12 +673,13 @@ discard block |
||
| 647 | 673 | sItemListContainerId: \'moderator_group_container\', |
| 648 | 674 | aListItems: ['; |
| 649 | 675 | |
| 650 | - foreach ($context['board']['moderator_groups'] as $id_group => $group_name) |
|
| 651 | - echo ' |
|
| 676 | + foreach ($context['board']['moderator_groups'] as $id_group => $group_name) { |
|
| 677 | + echo ' |
|
| 652 | 678 | { |
| 653 | 679 | sItemId: ', JavaScriptEscape($id_group), ', |
| 654 | 680 | sItemName: ', JavaScriptEscape($group_name), ' |
| 655 | 681 | }', $id_group == $context['board']['last_moderator_group_id'] ? '' : ','; |
| 682 | + } |
|
| 656 | 683 | |
| 657 | 684 | echo ' |
| 658 | 685 | ] |
@@ -678,17 +705,19 @@ discard block |
||
| 678 | 705 | echo ' |
| 679 | 706 | document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";'; |
| 680 | 707 | |
| 681 | - if ($context['board']['redirect']) |
|
| 682 | - echo ' |
|
| 708 | + if ($context['board']['redirect']) { |
|
| 709 | + echo ' |
|
| 683 | 710 | document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";'; |
| 711 | + } |
|
| 684 | 712 | } |
| 685 | 713 | |
| 686 | 714 | // Include any JavaScript added by mods using the 'integrate_edit_board' hook. |
| 687 | 715 | if (!empty($context['custom_refreshOptions']) && is_array($context['custom_refreshOptions'])) |
| 688 | 716 | { |
| 689 | - foreach ($context['custom_refreshOptions'] as $refreshOption) |
|
| 690 | - echo ' |
|
| 717 | + foreach ($context['custom_refreshOptions'] as $refreshOption) { |
|
| 718 | + echo ' |
|
| 691 | 719 | ', $refreshOption; |
| 720 | + } |
|
| 692 | 721 | } |
| 693 | 722 | |
| 694 | 723 | echo ' |
@@ -717,9 +746,10 @@ discard block |
||
| 717 | 746 | <p>', $txt['mboards_delete_board_contains'], '</p> |
| 718 | 747 | <ul>'; |
| 719 | 748 | |
| 720 | - foreach ($context['children'] as $child) |
|
| 721 | - echo ' |
|
| 749 | + foreach ($context['children'] as $child) { |
|
| 750 | + echo ' |
|
| 722 | 751 | <li>', $child['node']['name'], '</li>'; |
| 752 | + } |
|
| 723 | 753 | |
| 724 | 754 | echo ' |
| 725 | 755 | </ul> |
@@ -733,10 +763,11 @@ discard block |
||
| 733 | 763 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1"', empty($context['can_move_children']) ? ' disabled' : '', '>', $txt['mboards_delete_board_option2'], '</label>: |
| 734 | 764 | <select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>'; |
| 735 | 765 | |
| 736 | - foreach ($context['board_order'] as $board) |
|
| 737 | - if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
| 766 | + foreach ($context['board_order'] as $board) { |
|
| 767 | + if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
| 738 | 768 | echo ' |
| 739 | 769 | <option value="', $board['id'], '">', $board['name'], '</option>'; |
| 770 | + } |
|
| 740 | 771 | |
| 741 | 772 | echo ' |
| 742 | 773 | </select> |