@@ -72,9 +72,10 @@ discard block |
||
72 | 72 | |
73 | 73 | // Allow css/js files to be disable for this specific theme. |
74 | 74 | // Add the identifier as an array key. IE array('smf_script'); Some external files might not add identifiers, on those cases SMF uses its filename as reference. |
75 | - if (!isset($settings['disable_files'])) |
|
76 | - $settings['disable_files'] = array(); |
|
77 | -} |
|
75 | + if (!isset($settings['disable_files'])) { |
|
76 | + $settings['disable_files'] = array(); |
|
77 | + } |
|
78 | + } |
|
78 | 79 | |
79 | 80 | /** |
80 | 81 | * The main sub template above the content. |
@@ -111,8 +112,9 @@ discard block |
||
111 | 112 | echo ' |
112 | 113 | <meta'; |
113 | 114 | |
114 | - foreach ($meta_tag as $meta_key => $meta_value) |
|
115 | - echo ' ', $meta_key, '="', $meta_value, '"'; |
|
115 | + foreach ($meta_tag as $meta_key => $meta_value) { |
|
116 | + echo ' ', $meta_key, '="', $meta_value, '"'; |
|
117 | + } |
|
116 | 118 | |
117 | 119 | echo '>'; |
118 | 120 | } |
@@ -123,14 +125,16 @@ discard block |
||
123 | 125 | <meta name="theme-color" content="#557EA0">'; |
124 | 126 | |
125 | 127 | // Please don't index these Mr Robot. |
126 | - if (!empty($context['robot_no_index'])) |
|
127 | - echo ' |
|
128 | + if (!empty($context['robot_no_index'])) { |
|
129 | + echo ' |
|
128 | 130 | <meta name="robots" content="noindex">'; |
131 | + } |
|
129 | 132 | |
130 | 133 | // Present a canonical url for search engines to prevent duplicate content in their indices. |
131 | - if (!empty($context['canonical_url'])) |
|
132 | - echo ' |
|
134 | + if (!empty($context['canonical_url'])) { |
|
135 | + echo ' |
|
133 | 136 | <link rel="canonical" href="', $context['canonical_url'], '">'; |
137 | + } |
|
134 | 138 | |
135 | 139 | // Show all the relative links, such as help, search, contents, and the like. |
136 | 140 | echo ' |
@@ -139,10 +143,11 @@ discard block |
||
139 | 143 | <link rel="search" href="' . $scripturl . '?action=search">' : ''); |
140 | 144 | |
141 | 145 | // If RSS feeds are enabled, advertise the presence of one. |
142 | - if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) |
|
143 | - echo ' |
|
146 | + if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged'])) { |
|
147 | + echo ' |
|
144 | 148 | <link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['rss'], '" href="', $scripturl, '?type=rss2;action=.xml"> |
145 | 149 | <link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['atom'], '" href="', $scripturl, '?type=atom;action=.xml">'; |
150 | + } |
|
146 | 151 | |
147 | 152 | // If we're viewing a topic, these should be the previous and next topics, respectively. |
148 | 153 | if (!empty($context['links']['next'])) |
@@ -158,9 +163,10 @@ discard block |
||
158 | 163 | } |
159 | 164 | |
160 | 165 | // If we're in a board, or a topic for that matter, the index will be the board's index. |
161 | - if (!empty($context['current_board'])) |
|
162 | - echo ' |
|
166 | + if (!empty($context['current_board'])) { |
|
167 | + echo ' |
|
163 | 168 | <link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0">'; |
169 | + } |
|
164 | 170 | |
165 | 171 | // Output any remaining HTML headers. (from mods, maybe?) |
166 | 172 | echo $context['html_headers']; |
@@ -191,8 +197,9 @@ discard block |
||
191 | 197 | <ul class="floatleft" id="top_info"> |
192 | 198 | <li> |
193 | 199 | <a href="', $scripturl, '?action=profile"', !empty($context['self_profile']) ? ' class="active"' : '', ' id="profile_menu_top" onclick="return false;">'; |
194 | - if (!empty($context['user']['avatar'])) |
|
195 | - echo $context['user']['avatar']['image']; |
|
200 | + if (!empty($context['user']['avatar'])) { |
|
201 | + echo $context['user']['avatar']['image']; |
|
202 | + } |
|
196 | 203 | echo $context['user']['name'], '</a> |
197 | 204 | <div id="profile_menu" class="top_menu"></div> |
198 | 205 | </li>'; |
@@ -219,11 +226,12 @@ discard block |
||
219 | 226 | </ul>'; |
220 | 227 | } |
221 | 228 | // Otherwise they're a guest. Ask them to either register or login. |
222 | - else |
|
223 | - echo ' |
|
229 | + else { |
|
230 | + echo ' |
|
224 | 231 | <ul class="floatleft welcome"> |
225 | 232 | <li>', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $context['forum_name_html_safe'], $scripturl . '?action=login', 'return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ');', $scripturl . '?action=signup'), '</li> |
226 | 233 | </ul>'; |
234 | + } |
|
227 | 235 | |
228 | 236 | if (!empty($modSettings['userLanguage']) && !empty($context['languages']) && count($context['languages']) > 1) |
229 | 237 | { |
@@ -231,9 +239,10 @@ discard block |
||
231 | 239 | <form id="languages_form" method="get" class="floatright"> |
232 | 240 | <select id="language_select" name="language" onchange="this.form.submit()">'; |
233 | 241 | |
234 | - foreach ($context['languages'] as $language) |
|
235 | - echo ' |
|
242 | + foreach ($context['languages'] as $language) { |
|
243 | + echo ' |
|
236 | 244 | <option value="', $language['filename'], '"', isset($context['user']['language']) && $context['user']['language'] == $language['filename'] ? ' selected="selected"' : '', '>', str_replace('-utf8', '', $language['name']), '</option>'; |
245 | + } |
|
237 | 246 | |
238 | 247 | echo ' |
239 | 248 | </select> |
@@ -257,31 +266,36 @@ discard block |
||
257 | 266 | <option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>'; |
258 | 267 | |
259 | 268 | // Can't limit it to a specific topic if we are not in one |
260 | - if (!empty($context['current_topic'])) |
|
261 | - echo ' |
|
269 | + if (!empty($context['current_topic'])) { |
|
270 | + echo ' |
|
262 | 271 | <option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>'; |
272 | + } |
|
263 | 273 | |
264 | 274 | // Can't limit it to a specific board if we are not in one |
265 | - if (!empty($context['current_board'])) |
|
266 | - echo ' |
|
275 | + if (!empty($context['current_board'])) { |
|
276 | + echo ' |
|
267 | 277 | <option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisbrd'], '</option>'; |
278 | + } |
|
268 | 279 | |
269 | 280 | // Can't search for members if we can't see the memberlist |
270 | - if (!empty($context['allow_memberlist'])) |
|
271 | - echo ' |
|
281 | + if (!empty($context['allow_memberlist'])) { |
|
282 | + echo ' |
|
272 | 283 | <option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>'; |
284 | + } |
|
273 | 285 | |
274 | 286 | echo ' |
275 | 287 | </select>'; |
276 | 288 | |
277 | 289 | // Search within current topic? |
278 | - if (!empty($context['current_topic'])) |
|
279 | - echo ' |
|
290 | + if (!empty($context['current_topic'])) { |
|
291 | + echo ' |
|
280 | 292 | <input type="hidden" name="sd_topic" value="', $context['current_topic'], '">'; |
293 | + } |
|
281 | 294 | // If we're on a certain board, limit it to this board ;). |
282 | - elseif (!empty($context['current_board'])) |
|
283 | - echo ' |
|
295 | + elseif (!empty($context['current_board'])) { |
|
296 | + echo ' |
|
284 | 297 | <input type="hidden" name="sd_brd" value="', $context['current_board'], '">'; |
298 | + } |
|
285 | 299 | |
286 | 300 | echo ' |
287 | 301 | <input type="submit" name="search2" value="', $txt['search'], '" class="button_submit"> |
@@ -311,12 +325,13 @@ discard block |
||
311 | 325 | ', $context['current_time'], ' |
312 | 326 | </div>'; |
313 | 327 | // Show a random news item? (or you could pick one from news_lines...) |
314 | - if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) |
|
315 | - echo ' |
|
328 | + if (!empty($settings['enable_news']) && !empty($context['random_news_line'])) { |
|
329 | + echo ' |
|
316 | 330 | <div class="news"> |
317 | 331 | <h2>', $txt['news'], ': </h2> |
318 | 332 | <p>', $context['random_news_line'], '</p> |
319 | 333 | </div>'; |
334 | + } |
|
320 | 335 | |
321 | 336 | echo ' |
322 | 337 | <hr class="clear"> |
@@ -379,9 +394,10 @@ discard block |
||
379 | 394 | </ul>'; |
380 | 395 | |
381 | 396 | // Show the load time? |
382 | - if ($context['show_load_time']) |
|
383 | - echo ' |
|
397 | + if ($context['show_load_time']) { |
|
398 | + echo ' |
|
384 | 399 | <p>', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</p>'; |
400 | + } |
|
385 | 401 | |
386 | 402 | echo ' |
387 | 403 | </div>'; |
@@ -411,19 +427,21 @@ discard block |
||
411 | 427 | global $context, $shown_linktree, $scripturl, $txt; |
412 | 428 | |
413 | 429 | // If linktree is empty, just return - also allow an override. |
414 | - if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) |
|
415 | - return; |
|
430 | + if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show)) { |
|
431 | + return; |
|
432 | + } |
|
416 | 433 | |
417 | 434 | echo ' |
418 | 435 | <div class="navigate_section"> |
419 | 436 | <ul>'; |
420 | 437 | |
421 | - if ($context['user']['is_logged']) |
|
422 | - echo ' |
|
438 | + if ($context['user']['is_logged']) { |
|
439 | + echo ' |
|
423 | 440 | <li class="unread_links"> |
424 | 441 | <a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a> |
425 | 442 | <a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a> |
426 | 443 | </li>'; |
444 | + } |
|
427 | 445 | |
428 | 446 | // Each tree item has a URL and name. Some may have extra_before and extra_after. |
429 | 447 | foreach ($context['linktree'] as $link_num => $tree) |
@@ -434,25 +452,29 @@ discard block |
||
434 | 452 | // Don't show a separator for the first one. |
435 | 453 | // Better here. Always points to the next level when the linktree breaks to a second line. |
436 | 454 | // Picked a better looking HTML entity, and added support for RTL plus a span for styling. |
437 | - if ($link_num != 0) |
|
438 | - echo ' |
|
455 | + if ($link_num != 0) { |
|
456 | + echo ' |
|
439 | 457 | <span class="dividers">', $context['right_to_left'] ? ' ◄ ' : ' ► ', '</span>'; |
458 | + } |
|
440 | 459 | |
441 | 460 | // Show something before the link? |
442 | - if (isset($tree['extra_before'])) |
|
443 | - echo $tree['extra_before'], ' '; |
|
461 | + if (isset($tree['extra_before'])) { |
|
462 | + echo $tree['extra_before'], ' '; |
|
463 | + } |
|
444 | 464 | |
445 | 465 | // Show the link, including a URL if it should have one. |
446 | - if (isset($tree['url'])) |
|
447 | - echo ' |
|
466 | + if (isset($tree['url'])) { |
|
467 | + echo ' |
|
448 | 468 | <a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>'; |
449 | - else |
|
450 | - echo ' |
|
469 | + } else { |
|
470 | + echo ' |
|
451 | 471 | <span>' . $tree['name'] . '</span>'; |
472 | + } |
|
452 | 473 | |
453 | 474 | // Show something after the link...? |
454 | - if (isset($tree['extra_after'])) |
|
455 | - echo ' ', $tree['extra_after']; |
|
475 | + if (isset($tree['extra_after'])) { |
|
476 | + echo ' ', $tree['extra_after']; |
|
477 | + } |
|
456 | 478 | |
457 | 479 | echo ' |
458 | 480 | </li>'; |
@@ -502,13 +524,14 @@ discard block |
||
502 | 524 | echo ' |
503 | 525 | <ul>'; |
504 | 526 | |
505 | - foreach ($childbutton['sub_buttons'] as $grandchildbutton) |
|
506 | - echo ' |
|
527 | + foreach ($childbutton['sub_buttons'] as $grandchildbutton) { |
|
528 | + echo ' |
|
507 | 529 | <li> |
508 | 530 | <a href="', $grandchildbutton['href'], '"' , isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '> |
509 | 531 | ', $grandchildbutton['title'], ' |
510 | 532 | </a> |
511 | 533 | </li>'; |
534 | + } |
|
512 | 535 | |
513 | 536 | echo ' |
514 | 537 | </ul>'; |
@@ -539,8 +562,9 @@ discard block |
||
539 | 562 | { |
540 | 563 | global $context, $txt; |
541 | 564 | |
542 | - if (!is_array($strip_options)) |
|
543 | - $strip_options = array(); |
|
565 | + if (!is_array($strip_options)) { |
|
566 | + $strip_options = array(); |
|
567 | + } |
|
544 | 568 | |
545 | 569 | // Create the buttons... |
546 | 570 | $buttons = array(); |
@@ -549,8 +573,9 @@ discard block |
||
549 | 573 | // As of 2.1, the 'test' for each button happens while the array is being generated. The extra 'test' check here is deprecated but kept for backward compatibility (update your mods, folks!) |
550 | 574 | if (!isset($value['test']) || !empty($context[$value['test']])) |
551 | 575 | { |
552 | - if (!isset($value['id'])) |
|
553 | - $value['id'] = $key; |
|
576 | + if (!isset($value['id'])) { |
|
577 | + $value['id'] = $key; |
|
578 | + } |
|
554 | 579 | |
555 | 580 | $button = ' |
556 | 581 | <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' '. $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="'. $value['url'] .'"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>'; |
@@ -563,13 +588,15 @@ discard block |
||
563 | 588 | <div class="overview">'; |
564 | 589 | foreach ($value['sub_buttons'] as $element) |
565 | 590 | { |
566 | - if (isset($element['test']) && empty($context[$element['test']])) |
|
567 | - continue; |
|
591 | + if (isset($element['test']) && empty($context[$element['test']])) { |
|
592 | + continue; |
|
593 | + } |
|
568 | 594 | |
569 | 595 | $button .= ' |
570 | 596 | <a href="' . $element['url'] . '"><strong>' . $txt[$element['text']] . '</strong>'; |
571 | - if (isset($txt[$element['text'] . '_desc'])) |
|
572 | - $button .= '<br /><span>' . $txt[$element['text'] . '_desc'] . '</span>'; |
|
597 | + if (isset($txt[$element['text'] . '_desc'])) { |
|
598 | + $button .= '<br /><span>' . $txt[$element['text'] . '_desc'] . '</span>'; |
|
599 | + } |
|
573 | 600 | $button .= '</a>'; |
574 | 601 | } |
575 | 602 | $button .= ' |
@@ -583,8 +610,9 @@ discard block |
||
583 | 610 | } |
584 | 611 | |
585 | 612 | // No buttons? No button strip either. |
586 | - if (empty($buttons)) |
|
587 | - return; |
|
613 | + if (empty($buttons)) { |
|
614 | + return; |
|
615 | + } |
|
588 | 616 | |
589 | 617 | echo ' |
590 | 618 | <div class="buttonlist', !empty($direction) ? ' float' . $direction : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '> |
@@ -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" class="new_win"><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_link" 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>'; |
@@ -62,16 +62,17 @@ |
||
62 | 62 | <div id="error_box" class="errorbox"> |
63 | 63 | <ul id="error_list">'; |
64 | 64 | |
65 | - foreach ($context['post_errors'] as $key => $error) |
|
66 | - echo ' |
|
65 | + foreach ($context['post_errors'] as $key => $error) { |
|
66 | + echo ' |
|
67 | 67 | <li id="error_', $key, '" class="error">', $error, '</li>'; |
68 | + } |
|
68 | 69 | |
69 | 70 | echo ' |
70 | 71 | </ul>'; |
71 | - } |
|
72 | - else |
|
73 | - echo ' |
|
72 | + } else { |
|
73 | + echo ' |
|
74 | 74 | <div style="display:none" id="error_box" class="errorbox">'; |
75 | + } |
|
75 | 76 | |
76 | 77 | echo ' |
77 | 78 | </div>'; |
@@ -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>'; |
@@ -168,21 +173,23 @@ discard block |
||
168 | 173 | echo ' |
169 | 174 | </dl>'; |
170 | 175 | |
171 | - if (isset($context['category']['is_new'])) |
|
172 | - echo ' |
|
176 | + if (isset($context['category']['is_new'])) { |
|
177 | + echo ' |
|
173 | 178 | <input type="submit" name="add" value="', $txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit">'; |
174 | - else |
|
175 | - echo ' |
|
179 | + } else { |
|
180 | + echo ' |
|
176 | 181 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', $context['tabindex']++, '" class="button_submit"> |
177 | 182 | <input type="submit" name="delete" value="', $txt['mboards_delete_cat'], '" data-confirm="', $txt['catConfirm'], '" class="button_submit you_sure">'; |
183 | + } |
|
178 | 184 | echo ' |
179 | 185 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
180 | 186 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
181 | 187 | |
182 | 188 | // If this category is empty we don't bother with the next confirmation screen. |
183 | - if ($context['category']['is_empty']) |
|
184 | - echo ' |
|
189 | + if ($context['category']['is_empty']) { |
|
190 | + echo ' |
|
185 | 191 | <input type="hidden" name="empty" value="1">'; |
192 | + } |
|
186 | 193 | |
187 | 194 | echo ' |
188 | 195 | </div> |
@@ -209,9 +216,10 @@ discard block |
||
209 | 216 | <p>', $txt['mboards_delete_cat_contains'], ':</p> |
210 | 217 | <ul>'; |
211 | 218 | |
212 | - foreach ($context['category']['children'] as $child) |
|
213 | - echo ' |
|
219 | + foreach ($context['category']['children'] as $child) { |
|
220 | + echo ' |
|
214 | 221 | <li>', $child, '</li>'; |
222 | + } |
|
215 | 223 | |
216 | 224 | echo ' |
217 | 225 | </ul> |
@@ -225,10 +233,11 @@ discard block |
||
225 | 233 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', count($context['category_order']) == 1 ? ' disabled' : '', '>', $txt['mboards_delete_option2'], '</label>: |
226 | 234 | <select name="cat_to"', count($context['category_order']) == 1 ? ' disabled' : '', '>'; |
227 | 235 | |
228 | - foreach ($context['category_order'] as $cat) |
|
229 | - if ($cat['id'] != 0) |
|
236 | + foreach ($context['category_order'] as $cat) { |
|
237 | + if ($cat['id'] != 0) |
|
230 | 238 | echo ' |
231 | 239 | <option value="', $cat['id'], '">', $cat['true_name'], '</option>'; |
240 | + } |
|
232 | 241 | |
233 | 242 | echo ' |
234 | 243 | </select> |
@@ -272,9 +281,10 @@ discard block |
||
272 | 281 | </dt> |
273 | 282 | <dd> |
274 | 283 | <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 == \'\';}">'; |
275 | - foreach ($context['categories'] as $category) |
|
276 | - echo ' |
|
284 | + foreach ($context['categories'] as $category) { |
|
285 | + echo ' |
|
277 | 286 | <option', $category['selected'] ? ' selected' : '', ' value="', $category['id'], '">', $category['name'], '</option>'; |
287 | + } |
|
278 | 288 | echo ' |
279 | 289 | </select> |
280 | 290 | </dd>'; |
@@ -301,9 +311,10 @@ discard block |
||
301 | 311 | echo ' |
302 | 312 | <select id="board_order" name="board_order"', !isset($context['board']['is_new']) ? ' disabled' : '', '> |
303 | 313 | ', !isset($context['board']['is_new']) ? '<option value="">(' . $txt['mboards_unchanged'] . ')</option>' : ''; |
304 | - foreach ($context['board_order'] as $order) |
|
305 | - echo ' |
|
314 | + foreach ($context['board_order'] as $order) { |
|
315 | + echo ' |
|
306 | 316 | <option', $order['selected'] ? ' selected' : '', ' value="', $order['id'], '">', $order['name'], '</option>'; |
317 | + } |
|
307 | 318 | echo ' |
308 | 319 | </select> |
309 | 320 | </dd>'; |
@@ -332,13 +343,15 @@ discard block |
||
332 | 343 | <dd> |
333 | 344 | <select name="profile">'; |
334 | 345 | |
335 | - if (isset($context['board']['is_new'])) |
|
336 | - echo ' |
|
346 | + if (isset($context['board']['is_new'])) { |
|
347 | + echo ' |
|
337 | 348 | <option value="-1">[', $txt['permission_profile_inherit'], ']</option>'; |
349 | + } |
|
338 | 350 | |
339 | - foreach ($context['profiles'] as $id => $profile) |
|
340 | - echo ' |
|
351 | + foreach ($context['profiles'] as $id => $profile) { |
|
352 | + echo ' |
|
341 | 353 | <option value="', $id, '"', $id == $context['board']['profile'] ? ' selected' : '', '>', $profile['name'], '</option>'; |
354 | + } |
|
342 | 355 | |
343 | 356 | echo ' |
344 | 357 | </select> |
@@ -351,8 +364,8 @@ discard block |
||
351 | 364 | </dt> |
352 | 365 | <dd>'; |
353 | 366 | |
354 | - if (!empty($modSettings['deny_boards_access'])) |
|
355 | - echo ' |
|
367 | + if (!empty($modSettings['deny_boards_access'])) { |
|
368 | + echo ' |
|
356 | 369 | <table> |
357 | 370 | <tr> |
358 | 371 | <td></td> |
@@ -360,10 +373,11 @@ discard block |
||
360 | 373 | <th>', $txt['permissions_option_off'], '</th> |
361 | 374 | <th>', $txt['permissions_option_deny'], '</th> |
362 | 375 | </tr>'; |
376 | + } |
|
363 | 377 | |
364 | 378 | // List all the membergroups so the user can choose who may access this board. |
365 | - foreach ($context['groups'] as $group) |
|
366 | - if (empty($modSettings['deny_boards_access'])) |
|
379 | + foreach ($context['groups'] as $group) { |
|
380 | + if (empty($modSettings['deny_boards_access'])) |
|
367 | 381 | echo ' |
368 | 382 | <label for="groups_', $group['id'], '"> |
369 | 383 | <input type="checkbox" name="groups[', $group['id'], ']" value="allow" id="groups_', $group['id'], '"', in_array($group['id'], $context['board_managers']) ? ' checked disabled' : ($group['allow'] ? ' checked' : ''), ' class="input_check"> |
@@ -371,8 +385,9 @@ discard block |
||
371 | 385 | ', $group['name'], ' |
372 | 386 | </span> |
373 | 387 | </label><br>'; |
374 | - else |
|
375 | - echo ' |
|
388 | + } |
|
389 | + else { |
|
390 | + echo ' |
|
376 | 391 | <tr> |
377 | 392 | <td> |
378 | 393 | <label for="groups_', $group['id'], '_a"> |
@@ -392,16 +407,17 @@ discard block |
||
392 | 407 | </td> |
393 | 408 | <td></td> |
394 | 409 | </tr>'; |
410 | + } |
|
395 | 411 | |
396 | - if (empty($modSettings['deny_boards_access'])) |
|
397 | - echo ' |
|
412 | + if (empty($modSettings['deny_boards_access'])) { |
|
413 | + echo ' |
|
398 | 414 | <span class="select_all_box"> |
399 | 415 | <em>', $txt['check_all'], '</em> <input type="checkbox" class="input_check" onclick="invertAll(this, this.form, \'groups[\');"> |
400 | 416 | </span> |
401 | 417 | <br><br> |
402 | 418 | </dd>'; |
403 | - else |
|
404 | - echo ' |
|
419 | + } else { |
|
420 | + echo ' |
|
405 | 421 | <tr class="select_all_box"> |
406 | 422 | <td> |
407 | 423 | </td> |
@@ -420,6 +436,7 @@ discard block |
||
420 | 436 | </tr> |
421 | 437 | </table> |
422 | 438 | </dd>'; |
439 | + } |
|
423 | 440 | |
424 | 441 | // Options to choose moderators, specify as announcement board and choose whether to count posts here. |
425 | 442 | echo ' |
@@ -474,8 +491,8 @@ discard block |
||
474 | 491 | </dl> |
475 | 492 | </div>'; |
476 | 493 | |
477 | - if ($context['board']['redirect']) |
|
478 | - echo ' |
|
494 | + if ($context['board']['redirect']) { |
|
495 | + echo ' |
|
479 | 496 | <div id="reset_redirect_div"> |
480 | 497 | <dl class="settings"> |
481 | 498 | <dt> |
@@ -488,6 +505,7 @@ discard block |
||
488 | 505 | </dd> |
489 | 506 | </dl> |
490 | 507 | </div>'; |
508 | + } |
|
491 | 509 | } |
492 | 510 | |
493 | 511 | echo ' |
@@ -515,9 +533,10 @@ discard block |
||
515 | 533 | <select name="boardtheme" id="boardtheme" onchange="refreshOptions();"> |
516 | 534 | <option value="0"', $context['board']['theme'] == 0 ? ' selected' : '', '>', $txt['mboards_theme_default'], '</option>'; |
517 | 535 | |
518 | - foreach ($context['themes'] as $theme) |
|
519 | - echo ' |
|
536 | + foreach ($context['themes'] as $theme) { |
|
537 | + echo ' |
|
520 | 538 | <option value="', $theme['id'], '"', $context['board']['theme'] == $theme['id'] ? ' selected' : '', '>', $theme['name'], '</option>'; |
539 | + } |
|
521 | 540 | |
522 | 541 | echo ' |
523 | 542 | </select> |
@@ -536,9 +555,10 @@ discard block |
||
536 | 555 | </dl> |
537 | 556 | </div>'; |
538 | 557 | |
539 | - if (!empty($context['board']['is_recycle'])) |
|
540 | - echo ' |
|
558 | + if (!empty($context['board']['is_recycle'])) { |
|
559 | + echo ' |
|
541 | 560 | <div class="noticebox">', $txt['mboards_recycle_disabled_delete'], '</div>'; |
561 | + } |
|
542 | 562 | |
543 | 563 | echo ' |
544 | 564 | <input type="hidden" name="rid" value="', $context['redirect_location'], '"> |
@@ -546,21 +566,24 @@ discard block |
||
546 | 566 | <input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '">'; |
547 | 567 | |
548 | 568 | // If this board has no children don't bother with the next confirmation screen. |
549 | - if ($context['board']['no_children']) |
|
550 | - echo ' |
|
569 | + if ($context['board']['no_children']) { |
|
570 | + echo ' |
|
551 | 571 | <input type="hidden" name="no_children" value="1">'; |
572 | + } |
|
552 | 573 | |
553 | - if (isset($context['board']['is_new'])) |
|
554 | - echo ' |
|
574 | + if (isset($context['board']['is_new'])) { |
|
575 | + echo ' |
|
555 | 576 | <input type="hidden" name="cur_cat" value="', $context['board']['category'], '"> |
556 | 577 | <input type="submit" name="add" value="', $txt['mboards_new_board'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">'; |
557 | - else |
|
558 | - echo ' |
|
578 | + } else { |
|
579 | + echo ' |
|
559 | 580 | <input type="submit" name="edit" value="', $txt['modify'], '" onclick="return !isEmptyText(this.form.board_name);" class="button_submit">'; |
581 | + } |
|
560 | 582 | |
561 | - if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) |
|
562 | - echo ' |
|
583 | + if (!isset($context['board']['is_new']) && empty($context['board']['is_recycle'])) { |
|
584 | + echo ' |
|
563 | 585 | <input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" data-confirm="', $txt['boardConfirm'], '" class="button_submit you_sure">'; |
586 | + } |
|
564 | 587 | echo ' |
565 | 588 | </div> |
566 | 589 | </form> |
@@ -581,12 +604,13 @@ discard block |
||
581 | 604 | sItemListContainerId: \'moderator_container\', |
582 | 605 | aListItems: ['; |
583 | 606 | |
584 | - foreach ($context['board']['moderators'] as $id_member => $member_name) |
|
585 | - echo ' |
|
607 | + foreach ($context['board']['moderators'] as $id_member => $member_name) { |
|
608 | + echo ' |
|
586 | 609 | { |
587 | 610 | sItemId: ', JavaScriptEscape($id_member), ', |
588 | 611 | sItemName: ', JavaScriptEscape($member_name), ' |
589 | 612 | }', $id_member == $context['board']['last_moderator_id'] ? '' : ','; |
613 | + } |
|
590 | 614 | |
591 | 615 | echo ' |
592 | 616 | ] |
@@ -606,12 +630,13 @@ discard block |
||
606 | 630 | sItemListContainerId: \'moderator_group_container\', |
607 | 631 | aListItems: ['; |
608 | 632 | |
609 | - foreach ($context['board']['moderator_groups'] as $id_group => $group_name) |
|
610 | - echo ' |
|
633 | + foreach ($context['board']['moderator_groups'] as $id_group => $group_name) { |
|
634 | + echo ' |
|
611 | 635 | { |
612 | 636 | sItemId: ', JavaScriptEscape($id_group), ', |
613 | 637 | sItemName: ', JavaScriptEscape($group_name), ' |
614 | 638 | }', $id_group == $context['board']['last_moderator_group_id'] ? '' : ','; |
639 | + } |
|
615 | 640 | |
616 | 641 | echo ' |
617 | 642 | ] |
@@ -637,9 +662,10 @@ discard block |
||
637 | 662 | echo ' |
638 | 663 | document.getElementById("redirect_address_div").style.display = redirectEnabled ? "" : "none";'; |
639 | 664 | |
640 | - if ($context['board']['redirect']) |
|
641 | - echo ' |
|
665 | + if ($context['board']['redirect']) { |
|
666 | + echo ' |
|
642 | 667 | document.getElementById("reset_redirect_div").style.display = redirectEnabled ? "" : "none";'; |
668 | + } |
|
643 | 669 | } |
644 | 670 | |
645 | 671 | echo ' |
@@ -668,9 +694,10 @@ discard block |
||
668 | 694 | <p>', $txt['mboards_delete_board_contains'], '</p> |
669 | 695 | <ul>'; |
670 | 696 | |
671 | - foreach ($context['children'] as $child) |
|
672 | - echo ' |
|
697 | + foreach ($context['children'] as $child) { |
|
698 | + echo ' |
|
673 | 699 | <li>', $child['node']['name'], '</li>'; |
700 | + } |
|
674 | 701 | |
675 | 702 | echo ' |
676 | 703 | </ul> |
@@ -684,10 +711,11 @@ discard block |
||
684 | 711 | <label for="delete_action1"><input type="radio" id="delete_action1" name="delete_action" value="1" class="input_radio"', empty($context['can_move_children']) ? ' disabled' : '', '>', $txt['mboards_delete_board_option2'], '</label>: |
685 | 712 | <select name="board_to"', empty($context['can_move_children']) ? ' disabled' : '', '>'; |
686 | 713 | |
687 | - foreach ($context['board_order'] as $board) |
|
688 | - if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
714 | + foreach ($context['board_order'] as $board) { |
|
715 | + if ($board['id'] != $context['board']['id'] && empty($board['is_child'])) |
|
689 | 716 | echo ' |
690 | 717 | <option value="', $board['id'], '">', $board['name'], '</option>'; |
718 | + } |
|
691 | 719 | |
692 | 720 | echo ' |
693 | 721 | </select> |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | <meta charset="', $context['character_set'], '"> |
25 | 25 | <meta name="robots" content="noindex"> |
26 | 26 | <title>', $context['page_title'], '</title> |
27 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
28 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
27 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
28 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
29 | 29 | </head> |
30 | 30 | <body id="help_popup"> |
31 | 31 | <div class="windowbg description"> |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | <title>', $txt['find_members'], '</title> |
51 | 51 | <meta charset="', $context['character_set'], '"> |
52 | 52 | <meta name="robots" content="noindex"> |
53 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
54 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
53 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
54 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
55 | 55 | <script> |
56 | 56 | var membersAdded = []; |
57 | 57 | function addMember(name) |
@@ -86,9 +86,10 @@ discard block |
||
86 | 86 | <span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br>'; |
87 | 87 | |
88 | 88 | // Only offer to search for buddies if we have some! |
89 | - if (!empty($context['show_buddies'])) |
|
90 | - echo ' |
|
89 | + if (!empty($context['show_buddies'])) { |
|
90 | + echo ' |
|
91 | 91 | <span class="smalltext"><label for="buddies"><input type="checkbox" class="input_check" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked' : '', '> ', $txt['find_buddies'], '</label></span><br>'; |
92 | + } |
|
92 | 93 | |
93 | 94 | echo ' |
94 | 95 | <div class="padding righttext"> |
@@ -103,10 +104,10 @@ discard block |
||
103 | 104 | <h3 class="catbg">', $txt['find_results'], '</h3> |
104 | 105 | </div>'; |
105 | 106 | |
106 | - if (empty($context['results'])) |
|
107 | - echo ' |
|
107 | + if (empty($context['results'])) { |
|
108 | + echo ' |
|
108 | 109 | <p class="error">', $txt['find_no_results'], '</p>'; |
109 | - else |
|
110 | + } else |
|
110 | 111 | { |
111 | 112 | echo ' |
112 | 113 | <ul class="padding">'; |
@@ -135,11 +136,12 @@ discard block |
||
135 | 136 | <input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '"> |
136 | 137 | </form>'; |
137 | 138 | |
138 | - if (empty($context['results'])) |
|
139 | - echo ' |
|
139 | + if (empty($context['results'])) { |
|
140 | + echo ' |
|
140 | 141 | <script> |
141 | 142 | document.getElementById("search").focus(); |
142 | 143 | </script>'; |
144 | + } |
|
143 | 145 | |
144 | 146 | echo ' |
145 | 147 | </body> |
@@ -183,8 +185,8 @@ discard block |
||
183 | 185 | { |
184 | 186 | global $txt, $context, $modSettings; |
185 | 187 | |
186 | - if (!empty($modSettings['requireAgreement'])) |
|
187 | - echo ' |
|
188 | + if (!empty($modSettings['requireAgreement'])) { |
|
189 | + echo ' |
|
188 | 190 | <div class="cat_bar"> |
189 | 191 | <h3 class="catbg"> |
190 | 192 | ', $txt['terms_and_rules'], ' - ', $context['forum_name_html_safe'], ' |
@@ -193,11 +195,12 @@ discard block |
||
193 | 195 | <div class="roundframe"> |
194 | 196 | ', $context['agreement'], ' |
195 | 197 | </div>'; |
196 | - else |
|
197 | - echo ' |
|
198 | + } else { |
|
199 | + echo ' |
|
198 | 200 | <div class="noticebox"> |
199 | 201 | ', $txt['agreement_disabled'], ' |
200 | 202 | </div>'; |
201 | -} |
|
203 | + } |
|
204 | + } |
|
202 | 205 | |
203 | 206 | ?> |
204 | 207 | \ No newline at end of file |
@@ -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"> |
@@ -238,11 +240,12 @@ discard block |
||
238 | 240 | <div id="manage_maintenance">'; |
239 | 241 | |
240 | 242 | // If maintenance has finished tell the user. |
241 | - if (!empty($context['maintenance_finished'])) |
|
242 | - echo ' |
|
243 | + if (!empty($context['maintenance_finished'])) { |
|
244 | + echo ' |
|
243 | 245 | <div class="infobox"> |
244 | 246 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
245 | 247 | </div>'; |
248 | + } |
|
246 | 249 | |
247 | 250 | echo ' |
248 | 251 | <div class="cat_bar"> |
@@ -300,9 +303,10 @@ discard block |
||
300 | 303 | <p><a href="#membersLink" onclick="swapMembers();"><img src="', $settings['images_url'], '/selected.png" alt="+" id="membersIcon"></a> <a href="#membersLink" onclick="swapMembers();" id="membersText" style="font-weight: bold;">', $txt['maintain_members_all'], '</a></p> |
301 | 304 | <div style="display: none; padding: 3px" id="membersPanel">'; |
302 | 305 | |
303 | - foreach ($context['membergroups'] as $group) |
|
304 | - echo ' |
|
306 | + foreach ($context['membergroups'] as $group) { |
|
307 | + echo ' |
|
305 | 308 | <label for="groups', $group['id'], '"><input type="checkbox" name="groups[', $group['id'], ']" id="groups', $group['id'], '" checked class="input_check"> ', $group['name'], '</label><br>'; |
309 | + } |
|
306 | 310 | |
307 | 311 | echo ' |
308 | 312 | </div> |
@@ -346,11 +350,12 @@ discard block |
||
346 | 350 | global $scripturl, $txt, $context, $settings, $modSettings; |
347 | 351 | |
348 | 352 | // If maintenance has finished tell the user. |
349 | - if (!empty($context['maintenance_finished'])) |
|
350 | - echo ' |
|
353 | + if (!empty($context['maintenance_finished'])) { |
|
354 | + echo ' |
|
351 | 355 | <div class="infobox"> |
352 | 356 | ', sprintf($txt['maintain_done'], $context['maintenance_finished']), ' |
353 | 357 | </div>'; |
358 | + } |
|
354 | 359 | |
355 | 360 | // Bit of javascript for showing which boards to prune in an otherwise hidden list. |
356 | 361 | echo ' |
@@ -418,19 +423,21 @@ discard block |
||
418 | 423 | <ul>'; |
419 | 424 | |
420 | 425 | // Display a checkbox with every board. |
421 | - foreach ($category['boards'] as $board) |
|
422 | - echo ' |
|
426 | + foreach ($category['boards'] as $board) { |
|
427 | + echo ' |
|
423 | 428 | <li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;"><label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked class="input_check">', $board['name'], '</label></li>'; |
429 | + } |
|
424 | 430 | |
425 | 431 | echo ' |
426 | 432 | </ul> |
427 | 433 | </fieldset>'; |
428 | 434 | |
429 | 435 | // Increase $i, and check if we're at the middle yet. |
430 | - if (++$i == $middle) |
|
431 | - echo ' |
|
436 | + if (++$i == $middle) { |
|
437 | + echo ' |
|
432 | 438 | </div> |
433 | 439 | <div class="floatright" style="width: 49%;">'; |
440 | + } |
|
434 | 441 | } |
435 | 442 | |
436 | 443 | echo ' |
@@ -469,9 +476,10 @@ discard block |
||
469 | 476 | echo ' |
470 | 477 | <optgroup label="', $category['name'], '">'; |
471 | 478 | |
472 | - foreach ($category['boards'] as $board) |
|
473 | - echo ' |
|
479 | + foreach ($category['boards'] as $board) { |
|
480 | + echo ' |
|
474 | 481 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
482 | + } |
|
475 | 483 | |
476 | 484 | echo ' |
477 | 485 | </optgroup>'; |
@@ -489,9 +497,10 @@ discard block |
||
489 | 497 | echo ' |
490 | 498 | <optgroup label="', $category['name'], '">'; |
491 | 499 | |
492 | - foreach ($category['boards'] as $board) |
|
493 | - echo ' |
|
500 | + foreach ($category['boards'] as $board) { |
|
501 | + echo ' |
|
494 | 502 | <option value="', $board['id'], '"> ', str_repeat('==', $board['child_level']), '=> ', $board['name'], '</option>'; |
503 | + } |
|
495 | 504 | |
496 | 505 | echo ' |
497 | 506 | </optgroup>'; |
@@ -531,9 +540,10 @@ discard block |
||
531 | 540 | ', $txt['database_optimize_attempt'], '<br>'; |
532 | 541 | |
533 | 542 | // List each table being optimized... |
534 | - foreach ($context['optimized_tables'] as $table) |
|
535 | - echo ' |
|
543 | + foreach ($context['optimized_tables'] as $table) { |
|
544 | + echo ' |
|
536 | 545 | ', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '<br>'; |
546 | + } |
|
537 | 547 | |
538 | 548 | // How did we go? |
539 | 549 | echo ' |
@@ -590,13 +600,14 @@ discard block |
||
590 | 600 | ', implode('</li><li>', $context['exceeding_messages']), ' |
591 | 601 | </li> |
592 | 602 | </ul>'; |
593 | - if (!empty($context['exceeding_messages_morethan'])) |
|
594 | - echo ' |
|
603 | + if (!empty($context['exceeding_messages_morethan'])) { |
|
604 | + echo ' |
|
595 | 605 | <p>', $context['exceeding_messages_morethan'], '</p>'; |
596 | - } |
|
597 | - else |
|
598 | - echo ' |
|
606 | + } |
|
607 | + } else { |
|
608 | + echo ' |
|
599 | 609 | <p class="infobox">', $txt['convert_to_text'], '</p>'; |
610 | + } |
|
600 | 611 | |
601 | 612 | echo ' |
602 | 613 | <form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertmsgbody" method="post" accept-charset="', $context['character_set'], '"> |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | </div> |
102 | 102 | <ul id="messages_not_selected" class="split_messages smalltext">'; |
103 | 103 | |
104 | - foreach ($context['not_selected']['messages'] as $message) |
|
105 | - echo ' |
|
104 | + foreach ($context['not_selected']['messages'] as $message) { |
|
105 | + echo ' |
|
106 | 106 | <li class="windowbg" id="not_selected_', $message['id'], '"> |
107 | 107 | <div class="message_header"> |
108 | 108 | <a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><span class="generic_icons split_sel" title="->"></span></a> |
@@ -111,6 +111,7 @@ discard block |
||
111 | 111 | </div> |
112 | 112 | <div class="post">', $message['body'], '</div> |
113 | 113 | </li>'; |
114 | + } |
|
114 | 115 | |
115 | 116 | echo ' |
116 | 117 | <li class="dummy"> |
@@ -130,8 +131,8 @@ discard block |
||
130 | 131 | </div> |
131 | 132 | <ul id="messages_selected" class="split_messages smalltext">'; |
132 | 133 | |
133 | - if (!empty($context['selected']['messages'])) |
|
134 | - foreach ($context['selected']['messages'] as $message) |
|
134 | + if (!empty($context['selected']['messages'])) { |
|
135 | + foreach ($context['selected']['messages'] as $message) |
|
135 | 136 | echo ' |
136 | 137 | <li class="windowbg" id="selected_', $message['id'], '"> |
137 | 138 | <div class="message_header"> |
@@ -141,6 +142,7 @@ discard block |
||
141 | 142 | </div> |
142 | 143 | <div class="post">', $message['body'], '</div> |
143 | 144 | </li>'; |
145 | + } |
|
144 | 146 | |
145 | 147 | echo ' |
146 | 148 | <li class="dummy"> |
@@ -28,14 +28,16 @@ discard block |
||
28 | 28 | <form class="login" action="', $context['login_url'], '" name="frmLogin" id="frmLogin" method="post" accept-charset="', $context['character_set'], '">'; |
29 | 29 | |
30 | 30 | // Did they make a mistake last time? |
31 | - if (!empty($context['login_errors'])) |
|
32 | - echo ' |
|
31 | + if (!empty($context['login_errors'])) { |
|
32 | + echo ' |
|
33 | 33 | <div class="errorbox">', implode('<br>', $context['login_errors']), '</div><br>'; |
34 | + } |
|
34 | 35 | |
35 | 36 | // Or perhaps there's some special description for this time? |
36 | - if (isset($context['description'])) |
|
37 | - echo ' |
|
37 | + if (isset($context['description'])) { |
|
38 | + echo ' |
|
38 | 39 | <div class="information">', $context['description'], '</div>'; |
40 | + } |
|
39 | 41 | |
40 | 42 | // Now just get the basic information - username, password, etc. |
41 | 43 | echo ' |
@@ -51,10 +53,11 @@ discard block |
||
51 | 53 | <dt>', $txt['always_logged_in'], ':</dt> |
52 | 54 | <dd><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked' : '', ' class="input_check" onclick="this.form.cookielength.disabled = this.checked;"></dd>'; |
53 | 55 | // If they have deleted their account, give them a chance to change their mind. |
54 | - if (isset($context['login_show_undelete'])) |
|
55 | - echo ' |
|
56 | + if (isset($context['login_show_undelete'])) { |
|
57 | + echo ' |
|
56 | 58 | <dt class="alert">', $txt['undelete_account'], ':</dt> |
57 | 59 | <dd><input type="checkbox" name="undelete" class="input_check"></dd>'; |
60 | + } |
|
58 | 61 | echo ' |
59 | 62 | </dl> |
60 | 63 | <p><input type="submit" value="', $txt['login'], '" class="button_submit"></p> |
@@ -66,8 +69,8 @@ discard block |
||
66 | 69 | setTimeout(function() { |
67 | 70 | document.getElementById("', !empty($context['from_ajax']) ? 'ajax_' : '', isset($context['default_username']) && $context['default_username'] != '' ? 'loginpass' : 'loginuser', '").focus(); |
68 | 71 | }, 150);'; |
69 | - if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) |
|
70 | - echo ' |
|
72 | + if (!empty($context['from_ajax']) && (empty($modSettings['force_ssl']) || $modSettings['force_ssl'] == 2)) { |
|
73 | + echo ' |
|
71 | 74 | form = $("#frmLogin"); |
72 | 75 | form.submit(function(e) { |
73 | 76 | e.preventDefault(); |
@@ -100,16 +103,18 @@ discard block |
||
100 | 103 | |
101 | 104 | return false; |
102 | 105 | });'; |
106 | + } |
|
103 | 107 | |
104 | 108 | echo ' |
105 | 109 | </script> |
106 | 110 | </form>'; |
107 | 111 | |
108 | 112 | // It is a long story as to why we have this when we're clearly not going to use it. |
109 | - if (!empty($context['from_ajax'])) |
|
110 | - echo ' |
|
113 | + if (!empty($context['from_ajax'])) { |
|
114 | + echo ' |
|
111 | 115 | <br> |
112 | 116 | <a href="javascript:self.close();"></a>'; |
117 | + } |
|
113 | 118 | echo ' |
114 | 119 | </div> |
115 | 120 | </div>'; |
@@ -130,9 +135,10 @@ discard block |
||
130 | 135 | </h3> |
131 | 136 | </div> |
132 | 137 | <div class="roundframe noup">'; |
133 | - if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) |
|
134 | - echo ' |
|
138 | + if (!empty($context['tfa_error']) || !empty($context['tfa_backup_error'])) { |
|
139 | + echo ' |
|
135 | 140 | <div class="error">', $txt['tfa_' . (!empty($context['tfa_error']) ? 'code_' : 'backup_') . 'invalid'], '</div>'; |
141 | + } |
|
136 | 142 | echo ' |
137 | 143 | <form action="', $context['tfa_url'], '" method="post" id="frmTfa"> |
138 | 144 | <div id="tfaCode"> |
@@ -155,8 +161,8 @@ discard block |
||
155 | 161 | </form> |
156 | 162 | <script> |
157 | 163 | form = $("#frmTfa");'; |
158 | - if (!empty($context['from_ajax'])) |
|
159 | - echo ' |
|
164 | + if (!empty($context['from_ajax'])) { |
|
165 | + echo ' |
|
160 | 166 | form.submit(function(e) { |
161 | 167 | // If we are submitting backup code, let normal workflow follow since it redirects a couple times into a different page |
162 | 168 | if (form.find("input[name=tfa_backup]:first").val().length > 0) |
@@ -175,6 +181,7 @@ discard block |
||
175 | 181 | |
176 | 182 | return false; |
177 | 183 | });'; |
184 | + } |
|
178 | 185 | echo ' |
179 | 186 | form.find("input[name=backup]").click(function(e) { |
180 | 187 | $("#tfaBackup").show(); |
@@ -206,10 +213,11 @@ discard block |
||
206 | 213 | ', empty($context['kick_message']) ? $txt['only_members_can_access'] : $context['kick_message'], '<br>'; |
207 | 214 | |
208 | 215 | |
209 | - if ($context['can_register']) |
|
210 | - echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
211 | - else |
|
212 | - echo $txt['login_below']; |
|
216 | + if ($context['can_register']) { |
|
217 | + echo sprintf($txt['login_below_or_register'], $scripturl . '?action=signup', $context['forum_name_html_safe']); |
|
218 | + } else { |
|
219 | + echo $txt['login_below']; |
|
220 | + } |
|
213 | 221 | |
214 | 222 | // And now the login information. |
215 | 223 | echo ' |
@@ -305,9 +313,10 @@ discard block |
||
305 | 313 | </div> |
306 | 314 | <div class="roundframe centertext noup">'; |
307 | 315 | |
308 | - if (!empty($context['incorrect_password'])) |
|
309 | - echo ' |
|
316 | + if (!empty($context['incorrect_password'])) { |
|
317 | + echo ' |
|
310 | 318 | <div class="error">', $txt['admin_incorrect_password'], '</div>'; |
319 | + } |
|
311 | 320 | |
312 | 321 | echo ' |
313 | 322 | <strong>', $txt['password'], ':</strong> |
@@ -347,11 +356,12 @@ discard block |
||
347 | 356 | <div class="roundframe">'; |
348 | 357 | |
349 | 358 | // You didn't even have an ID? |
350 | - if (empty($context['member_id'])) |
|
351 | - echo ' |
|
359 | + if (empty($context['member_id'])) { |
|
360 | + echo ' |
|
352 | 361 | <dl> |
353 | 362 | <dt>', $txt['invalid_activation_username'], ':</dt> |
354 | 363 | <dd><input type="text" name="user" size="30" class="input_text"></dd>'; |
364 | + } |
|
355 | 365 | |
356 | 366 | echo ' |
357 | 367 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
@@ -388,13 +398,14 @@ discard block |
||
388 | 398 | <dd><input type="password" name="passwd" size="30" class="input_password"></dd> |
389 | 399 | </dl>'; |
390 | 400 | |
391 | - if ($context['can_activate']) |
|
392 | - echo ' |
|
401 | + if ($context['can_activate']) { |
|
402 | + echo ' |
|
393 | 403 | <p>', $txt['invalid_activation_known'], '</p> |
394 | 404 | <dl> |
395 | 405 | <dt>', $txt['invalid_activation_retry'], ':</dt> |
396 | 406 | <dd><input type="text" name="code" size="30" class="input_text"></dd> |
397 | 407 | </dl>'; |
408 | + } |
|
398 | 409 | |
399 | 410 | echo ' |
400 | 411 | <p><input type="submit" value="', $txt['invalid_activation_resend'], '" class="button_submit"></p> |
@@ -20,12 +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 | - else |
|
28 | + } else |
|
29 | 29 | { |
30 | 30 | echo ' |
31 | 31 | <div class="errorbox" id="errors"> |