@@ -68,7 +68,9 @@ discard block |
||
68 | 68 | foreach ($tabs as $tab) |
69 | 69 | { |
70 | 70 | if (isset($context['summarytabs'][$tab]['href'])) |
71 | - continue; |
|
71 | + { |
|
72 | + continue; |
|
73 | + } |
|
72 | 74 | |
73 | 75 | // Start a tab |
74 | 76 | $tab_num++; |
@@ -130,10 +132,12 @@ discard block |
||
130 | 132 | |
131 | 133 | // No posts? Just end the table with a informative message. |
132 | 134 | if (empty($context['posts'])) |
133 | - echo ' |
|
135 | + { |
|
136 | + echo ' |
|
134 | 137 | <div class="content"> |
135 | 138 | ', $context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none'], ' |
136 | 139 | </div>'; |
140 | + } |
|
137 | 141 | else |
138 | 142 | { |
139 | 143 | // For every post to be displayed, give it its own div, and show the important details of the post. |
@@ -144,11 +148,13 @@ discard block |
||
144 | 148 | $post['class'] = 'content'; |
145 | 149 | |
146 | 150 | if (!$post['approved']) |
147 | - $post['body'] = ' |
|
151 | + { |
|
152 | + $post['body'] = ' |
|
148 | 153 | <div class="approve_post"> |
149 | 154 | <em>' . $txt['post_awaiting_approval'] . '</em> |
150 | 155 | </div>' . ' |
151 | 156 | ' . $post['body']; |
157 | + } |
|
152 | 158 | |
153 | 159 | template_simple_message($post); |
154 | 160 | } |
@@ -191,8 +197,10 @@ discard block |
||
191 | 197 | <div class="content smalltext">', $txt['showPermissions_restricted_boards_desc'], ':<br />'; |
192 | 198 | |
193 | 199 | foreach ($context['no_access_boards'] as $no_access_board) |
194 | - echo ' |
|
200 | + { |
|
201 | + echo ' |
|
195 | 202 | ', $no_access_board['name'], $no_access_board['is_last'] ? '' : ', '; |
203 | + } |
|
196 | 204 | |
197 | 205 | echo ' |
198 | 206 | </div>'; |
@@ -225,11 +233,14 @@ discard block |
||
225 | 233 | <td class="smalltext">'; |
226 | 234 | |
227 | 235 | if ($permission['is_denied']) |
228 | - echo ' |
|
236 | + { |
|
237 | + echo ' |
|
229 | 238 | <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>'; |
230 | - else |
|
231 | - echo ' |
|
239 | + } |
|
240 | + else { |
|
241 | + echo ' |
|
232 | 242 | ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); |
243 | + } |
|
233 | 244 | |
234 | 245 | echo ' |
235 | 246 | </td> |
@@ -241,9 +252,10 @@ discard block |
||
241 | 252 | </table> |
242 | 253 | </div><br />'; |
243 | 254 | } |
244 | - else |
|
245 | - echo ' |
|
255 | + else { |
|
256 | + echo ' |
|
246 | 257 | <p class="description">', $txt['showPermissions_none_general'], '</p>'; |
258 | + } |
|
247 | 259 | |
248 | 260 | // Board permission section. |
249 | 261 | echo ' |
@@ -255,13 +267,17 @@ discard block |
||
255 | 267 | <option value="0"', $context['board'] == 0 ? ' selected="selected"' : '', '>', $txt['showPermissions_global'], ' </option>'; |
256 | 268 | |
257 | 269 | if (!empty($context['boards'])) |
258 | - echo ' |
|
270 | + { |
|
271 | + echo ' |
|
259 | 272 | <option value="" disabled="disabled">', str_repeat('—', strlen($txt['showPermissions_global'])), '</option>'; |
273 | + } |
|
260 | 274 | |
261 | 275 | // Fill the box with any local permission boards. |
262 | 276 | foreach ($context['boards'] as $board) |
263 | - echo ' |
|
277 | + { |
|
278 | + echo ' |
|
264 | 279 | <option value="', $board['id'], '"', $board['selected'] ? ' selected="selected"' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>'; |
280 | + } |
|
265 | 281 | |
266 | 282 | echo ' |
267 | 283 | </select> |
@@ -290,11 +306,14 @@ discard block |
||
290 | 306 | <td class="smalltext">'; |
291 | 307 | |
292 | 308 | if ($permission['is_denied']) |
293 | - echo ' |
|
309 | + { |
|
310 | + echo ' |
|
294 | 311 | <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>'; |
295 | - else |
|
296 | - echo ' |
|
312 | + } |
|
313 | + else { |
|
314 | + echo ' |
|
297 | 315 | ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); |
316 | + } |
|
298 | 317 | |
299 | 318 | echo ' |
300 | 319 | </td> |
@@ -305,9 +324,10 @@ discard block |
||
305 | 324 | </tbody> |
306 | 325 | </table>'; |
307 | 326 | } |
308 | - else |
|
309 | - echo ' |
|
327 | + else { |
|
328 | + echo ' |
|
310 | 329 | <p class="description">', $txt['showPermissions_none_board'], '</p>'; |
330 | + } |
|
311 | 331 | |
312 | 332 | echo ' |
313 | 333 | </div> |
@@ -353,8 +373,10 @@ discard block |
||
353 | 373 | |
354 | 374 | // If they haven't post at all, don't draw the graph. |
355 | 375 | if (empty($context['posts_by_time'])) |
356 | - echo ' |
|
376 | + { |
|
377 | + echo ' |
|
357 | 378 | <span class="centertext">', $txt['statPanel_noPosts'], '</span>'; |
379 | + } |
|
358 | 380 | // Otherwise do! |
359 | 381 | else |
360 | 382 | { |
@@ -394,8 +416,10 @@ discard block |
||
394 | 416 | <div class="content content_noframe">'; |
395 | 417 | |
396 | 418 | if (empty($context['popular_boards'])) |
397 | - echo ' |
|
419 | + { |
|
420 | + echo ' |
|
398 | 421 | <span class="centertext">', $txt['statPanel_noPosts'], '</span>'; |
422 | + } |
|
399 | 423 | |
400 | 424 | else |
401 | 425 | { |
@@ -431,8 +455,10 @@ discard block |
||
431 | 455 | <div class="content content_noframe">'; |
432 | 456 | |
433 | 457 | if (empty($context['board_activity'])) |
434 | - echo ' |
|
458 | + { |
|
459 | + echo ' |
|
435 | 460 | <span>', $txt['statPanel_noPosts'], '</span>'; |
461 | + } |
|
436 | 462 | else |
437 | 463 | { |
438 | 464 | echo ' |
@@ -498,13 +524,15 @@ discard block |
||
498 | 524 | |
499 | 525 | // There's some impact of this? |
500 | 526 | if (!empty($context['level_effects'][$context['current_level']])) |
501 | - echo ' |
|
527 | + { |
|
528 | + echo ' |
|
502 | 529 | <dt> |
503 | 530 | <strong>', $txt['profile_viewwarning_impact'], ':</strong> |
504 | 531 | </dt> |
505 | 532 | <dd> |
506 | 533 | ', $context['level_effects'][$context['current_level']], ' |
507 | 534 | </dd>'; |
535 | + } |
|
508 | 536 | |
509 | 537 | echo ' |
510 | 538 | </dl> |
@@ -545,37 +573,49 @@ discard block |
||
545 | 573 | |
546 | 574 | // The username if allowed |
547 | 575 | if ($context['user']['is_owner'] || $context['user']['is_admin']) |
548 | - echo ' |
|
576 | + { |
|
577 | + echo ' |
|
549 | 578 | <dt>', $txt['username'], ':</dt> |
550 | 579 | <dd>', $context['member']['username'], '</dd>'; |
580 | + } |
|
551 | 581 | |
552 | 582 | // Some posts stats for fun |
553 | 583 | if (!isset($context['disabled_fields']['posts'])) |
554 | - echo ' |
|
584 | + { |
|
585 | + echo ' |
|
555 | 586 | <dt>', $txt['profile_posts'], ':</dt> |
556 | 587 | <dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>'; |
588 | + } |
|
557 | 589 | |
558 | 590 | // Title? |
559 | 591 | if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title'])) |
560 | - echo ' |
|
592 | + { |
|
593 | + echo ' |
|
561 | 594 | <dt>', $txt['custom_title'], ':</dt> |
562 | 595 | <dd>', $context['member']['title'], '</dd>'; |
596 | + } |
|
563 | 597 | |
564 | 598 | // If karma is enabled show the members karma. |
565 | 599 | if ($modSettings['karmaMode'] == '1') |
566 | - echo ' |
|
600 | + { |
|
601 | + echo ' |
|
567 | 602 | <dt>', $modSettings['karmaLabel'], '</dt> |
568 | 603 | <dd>', ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '</dd>'; |
604 | + } |
|
569 | 605 | elseif ($modSettings['karmaMode'] == '2') |
570 | - echo ' |
|
606 | + { |
|
607 | + echo ' |
|
571 | 608 | <dt>', $modSettings['karmaLabel'], '</dt> |
572 | 609 | <dd>+', $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], '</dd>'; |
610 | + } |
|
573 | 611 | |
574 | 612 | // What do they like? |
575 | 613 | if (!empty($modSettings['likes_enabled'])) |
576 | - echo ' |
|
614 | + { |
|
615 | + echo ' |
|
577 | 616 | <dt>', $txt['likes'], ': </dt> |
578 | 617 | <dd>', $txt['likes_profile_given'], ': ', $context['member']['likes']['given'], ' / ', $txt['likes_profile_received'], ': ', $context['member']['likes']['received'], '</dd>'; |
618 | + } |
|
579 | 619 | |
580 | 620 | // Some links to this users fine work |
581 | 621 | echo ' |
@@ -585,9 +625,11 @@ discard block |
||
585 | 625 | <br />'; |
586 | 626 | |
587 | 627 | if ($context['user']['is_owner'] && !empty($modSettings['drafts_enabled'])) |
588 | - echo ' |
|
628 | + { |
|
629 | + echo ' |
|
589 | 630 | <a href="', $scripturl, '?action=profile;area=showdrafts;u=', $context['id_member'], '">', $txt['drafts_show'], '</a> |
590 | 631 | <br />'; |
632 | + } |
|
591 | 633 | echo ' |
592 | 634 | <a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a> |
593 | 635 | </dd>'; |
@@ -635,21 +677,27 @@ discard block |
||
635 | 677 | if ($context['can_see_ip']) |
636 | 678 | { |
637 | 679 | if (!empty($context['member']['ip'])) |
638 | - echo ' |
|
680 | + { |
|
681 | + echo ' |
|
639 | 682 | <dt>', $txt['ip'], ':</dt> |
640 | 683 | <dd><a href="', $scripturl, '?action=profile;area=history;sa=ip;searchip=', $context['member']['ip'], ';u=', $context['member']['id'], '">', $context['member']['ip'], '</a></dd>'; |
684 | + } |
|
641 | 685 | |
642 | 686 | if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip'])) |
643 | - echo ' |
|
687 | + { |
|
688 | + echo ' |
|
644 | 689 | <dt>', $txt['hostname'], ':</dt> |
645 | 690 | <dd>', $context['member']['hostname'], '</dd>'; |
691 | + } |
|
646 | 692 | } |
647 | 693 | |
648 | 694 | // Users language |
649 | 695 | if (!empty($modSettings['userLanguage']) && !empty($context['member']['language'])) |
650 | - echo ' |
|
696 | + { |
|
697 | + echo ' |
|
651 | 698 | <dt>', $txt['language'], ':</dt> |
652 | 699 | <dd>', $context['member']['language'], '</dd>'; |
700 | + } |
|
653 | 701 | |
654 | 702 | // And their time settings |
655 | 703 | echo ' |
@@ -658,9 +706,11 @@ discard block |
||
658 | 706 | |
659 | 707 | // What are they up to? |
660 | 708 | if (!isset($context['disabled_fields']['action']) && !empty($context['member']['action'])) |
661 | - echo ' |
|
709 | + { |
|
710 | + echo ' |
|
662 | 711 | <dt>', $txt['profile_action'], ':</dt> |
663 | 712 | <dd>', $context['member']['action'], '</dd>'; |
713 | + } |
|
664 | 714 | |
665 | 715 | // nuff about them, lets get back to me! |
666 | 716 | echo ' |
@@ -769,14 +819,18 @@ discard block |
||
769 | 819 | } |
770 | 820 | |
771 | 821 | if (!empty($cf_show)) |
772 | - echo ' |
|
822 | + { |
|
823 | + echo ' |
|
773 | 824 | </ul>'; |
825 | + } |
|
774 | 826 | } |
775 | 827 | |
776 | 828 | // No way to contact this member at all ... welcome home freak! |
777 | 829 | if ($ci_empty === true) |
778 | - echo |
|
830 | + { |
|
831 | + echo |
|
779 | 832 | $txt['profile_contact_no']; |
833 | + } |
|
780 | 834 | |
781 | 835 | echo ' |
782 | 836 | </div> |
@@ -807,7 +861,9 @@ discard block |
||
807 | 861 | foreach ($context['custom_fields'] as $field) |
808 | 862 | { |
809 | 863 | if ($field['placement'] != 2 || empty($field['output_html'])) |
810 | - continue; |
|
864 | + { |
|
865 | + continue; |
|
866 | + } |
|
811 | 867 | |
812 | 868 | if (empty($shown)) |
813 | 869 | { |
@@ -840,10 +896,13 @@ discard block |
||
840 | 896 | } |
841 | 897 | |
842 | 898 | if (empty($shown)) |
843 | - echo $txt['profile_signature_no']; |
|
844 | - else |
|
845 | - echo ' |
|
899 | + { |
|
900 | + echo $txt['profile_signature_no']; |
|
901 | + } |
|
902 | + else { |
|
903 | + echo ' |
|
846 | 904 | </dl>'; |
905 | + } |
|
847 | 906 | |
848 | 907 | // Done with this block |
849 | 908 | echo ' |
@@ -889,12 +948,16 @@ discard block |
||
889 | 948 | } |
890 | 949 | |
891 | 950 | if (!empty($shown)) |
892 | - echo ' |
|
951 | + { |
|
952 | + echo ' |
|
893 | 953 | </dl>'; |
954 | + } |
|
894 | 955 | } |
895 | 956 | |
896 | 957 | if (empty($shown)) |
897 | - echo $txt['profile_additonal_no']; |
|
958 | + { |
|
959 | + echo $txt['profile_additonal_no']; |
|
960 | + } |
|
898 | 961 | |
899 | 962 | echo ' |
900 | 963 | </div> |
@@ -933,8 +996,10 @@ discard block |
||
933 | 996 | |
934 | 997 | // Can we provide information on what this means? |
935 | 998 | if (!empty($context['warning_status'])) |
936 | - echo ' |
|
999 | + { |
|
1000 | + echo ' |
|
937 | 1001 | <span class="smalltext">(', $context['warning_status'], ')</span>'; |
1002 | + } |
|
938 | 1003 | |
939 | 1004 | echo ' |
940 | 1005 | </dd> |
@@ -949,10 +1014,12 @@ discard block |
||
949 | 1014 | |
950 | 1015 | // If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves. |
951 | 1016 | if (!empty($context['activate_message'])) |
952 | - echo ' |
|
1017 | + { |
|
1018 | + echo ' |
|
953 | 1019 | <dt class="clear"> |
954 | 1020 | <span class="alert">', $context['activate_message'], '</span> (<a href="' . $context['activate_url'] . '"', ($context['activate_type'] == 4 ? ' onclick="return confirm(\'' . $txt['profileConfirm'] . '\');"' : ''), '>', $context['activate_link_text'], '</a>) |
955 | 1021 | </dt>'; |
1022 | + } |
|
956 | 1023 | |
957 | 1024 | // If the current member is banned, show a message and possibly a link to the ban. |
958 | 1025 | if (!empty($context['member']['bans'])) |
@@ -966,9 +1033,11 @@ discard block |
||
966 | 1033 | <strong>', $txt['user_banned_by_following'], ':</strong>'; |
967 | 1034 | |
968 | 1035 | foreach ($context['member']['bans'] as $ban) |
969 | - echo ' |
|
1036 | + { |
|
1037 | + echo ' |
|
970 | 1038 | <br /> |
971 | 1039 | <span class="smalltext">', $ban['explanation'], '</span>'; |
1040 | + } |
|
972 | 1041 | |
973 | 1042 | echo ' |
974 | 1043 | </dd>'; |
@@ -1124,11 +1193,12 @@ discard block |
||
1124 | 1193 | } |
1125 | 1194 | } |
1126 | 1195 | // No data for this member |
1127 | - else |
|
1128 | - echo ' |
|
1196 | + else { |
|
1197 | + echo ' |
|
1129 | 1198 | <div class="infobox"> |
1130 | 1199 | ', $txt['profile_attachments_no'], ' |
1131 | 1200 | </div>'; |
1201 | + } |
|
1132 | 1202 | |
1133 | 1203 | // All done |
1134 | 1204 | echo ' |
@@ -1163,20 +1233,23 @@ discard block |
||
1163 | 1233 | </tr>'; |
1164 | 1234 | |
1165 | 1235 | foreach ($context['posts'] as $post) |
1166 | - echo ' |
|
1236 | + { |
|
1237 | + echo ' |
|
1167 | 1238 | <tr> |
1168 | 1239 | <td class="recentpost">', $post['body'], '</td> |
1169 | 1240 | <td class="recentboard">', $post['board']['link'], '</td> |
1170 | 1241 | <td class="recentsubject">', $post['link'], '</td> |
1171 | 1242 | <td class="recenttime">', $post['time'], '</td> |
1172 | 1243 | </tr>'; |
1244 | + } |
|
1173 | 1245 | } |
1174 | 1246 | // No data for this member |
1175 | - else |
|
1176 | - echo ' |
|
1247 | + else { |
|
1248 | + echo ' |
|
1177 | 1249 | <tr> |
1178 | 1250 | <td class="norecent">', (isset($context['loadaverage']) ? $txt['profile_loadavg'] : $txt['profile_posts_no']), '</td> |
1179 | 1251 | </tr>'; |
1252 | + } |
|
1180 | 1253 | |
1181 | 1254 | // All done |
1182 | 1255 | echo ' |
@@ -1211,19 +1284,22 @@ discard block |
||
1211 | 1284 | </tr>'; |
1212 | 1285 | |
1213 | 1286 | foreach ($context['topics'] as $post) |
1214 | - echo ' |
|
1287 | + { |
|
1288 | + echo ' |
|
1215 | 1289 | <tr> |
1216 | 1290 | <td class="recenttopic">', $post['link'], '</td> |
1217 | 1291 | <td class="recentboard">', $post['board']['link'], '</td> |
1218 | 1292 | <td class="recenttime">', $post['time'], '</td> |
1219 | 1293 | </tr>'; |
1294 | + } |
|
1220 | 1295 | } |
1221 | 1296 | // No data for this member |
1222 | - else |
|
1223 | - echo ' |
|
1297 | + else { |
|
1298 | + echo ' |
|
1224 | 1299 | <tr> |
1225 | 1300 | <td class="norecent">', $txt['profile_topics_no'], '</td> |
1226 | 1301 | </tr>'; |
1302 | + } |
|
1227 | 1303 | |
1228 | 1304 | // All done |
1229 | 1305 | echo ' |
@@ -123,13 +123,15 @@ discard block |
||
123 | 123 | </dd>'; |
124 | 124 | |
125 | 125 | if (!empty($modSettings['enableOTP'])) |
126 | - echo ' |
|
126 | + { |
|
127 | + echo ' |
|
127 | 128 | <dt> |
128 | 129 | <label for="otp">', $txt['disable_otp'], ':</label> |
129 | 130 | </dt> |
130 | 131 | <dd> |
131 | 132 | <input id="otp" type="checkbox" name="otp" /> |
132 | 133 | </dd>'; |
134 | + } |
|
133 | 135 | |
134 | 136 | echo ' |
135 | 137 | </dl> |
@@ -182,7 +184,8 @@ discard block |
||
182 | 184 | </dd>'; |
183 | 185 | |
184 | 186 | if ($context['account_type'] === 'password') |
185 | - echo ' |
|
187 | + { |
|
188 | + echo ' |
|
186 | 189 | <dt> |
187 | 190 | <label for="elk_autov_pwmain">', $txt['choose_pass'], ':</label> |
188 | 191 | </dt> |
@@ -201,6 +204,7 @@ discard block |
||
201 | 204 | <i id="elk_autov_pwverify_img" class="icon i-check" alt="*"></i> |
202 | 205 | </span> |
203 | 206 | </dd>'; |
207 | + } |
|
204 | 208 | |
205 | 209 | echo ' |
206 | 210 | </dl> |
@@ -215,7 +219,8 @@ discard block |
||
215 | 219 | </form>'; |
216 | 220 | |
217 | 221 | if ($context['account_type'] === 'password') |
218 | - echo ' |
|
222 | + { |
|
223 | + echo ' |
|
219 | 224 | <script> |
220 | 225 | var regTextStrings = { |
221 | 226 | "password_short": "', $txt['registration_password_short'], '", |
@@ -227,4 +232,5 @@ discard block |
||
227 | 232 | |
228 | 233 | var verificationHandle = new elkRegister("creator", ', empty($modSettings['password_strength']) ? 0 : $modSettings['password_strength'], ', regTextStrings); |
229 | 234 | </script>'; |
230 | -} |
|
231 | 235 | \ No newline at end of file |
236 | + } |
|
237 | + } |
|
232 | 238 | \ No newline at end of file |
@@ -36,7 +36,9 @@ discard block |
||
36 | 36 | { |
37 | 37 | // If there are no parent boards we can see, avoid showing an empty category (unless its collapsed). |
38 | 38 | if (empty($category['boards']) && !$category['is_collapsed']) |
39 | - continue; |
|
39 | + { |
|
40 | + continue; |
|
41 | + } |
|
40 | 42 | |
41 | 43 | // @todo - Invent nifty class name for boardindex header bars. |
42 | 44 | echo ' |
@@ -45,8 +47,10 @@ discard block |
||
45 | 47 | |
46 | 48 | // If this category even can collapse, show a link to collapse it. |
47 | 49 | if ($category['can_collapse']) |
48 | - echo ' |
|
50 | + { |
|
51 | + echo ' |
|
49 | 52 | <a class="chevricon i-chevron-', $category['is_collapsed'] ? 'down' : 'up', '" href="', $category['collapse_href'], '" title="', $category['is_collapsed'] ? $txt['show'] : $txt['hide'], '"></a>'; |
53 | + } |
|
50 | 54 | |
51 | 55 | // The "category link" is only a link for logged in members. Guests just get the name. |
52 | 56 | echo ' |
@@ -56,7 +60,9 @@ discard block |
||
56 | 60 | |
57 | 61 | // Assuming the category hasn't been collapsed... |
58 | 62 | if (!$category['is_collapsed']) |
59 | - template_list_boards($category['boards'], 'category_' . $category['id'] . '_boards'); |
|
63 | + { |
|
64 | + template_list_boards($category['boards'], 'category_' . $category['id'] . '_boards'); |
|
65 | + } |
|
60 | 66 | |
61 | 67 | echo ' |
62 | 68 | </section>'; |
@@ -99,12 +105,16 @@ discard block |
||
99 | 105 | |
100 | 106 | // Show the mark all as read button? |
101 | 107 | if ($settings['show_mark_read'] && !$context['user']['is_guest'] && !empty($context['categories'])) |
102 | - echo ' |
|
108 | + { |
|
109 | + echo ' |
|
103 | 110 | ', template_button_strip($context['mark_read_button'], 'right'); |
111 | + } |
|
104 | 112 | |
105 | 113 | if ($context['user']['is_logged']) |
106 | - echo ' |
|
114 | + { |
|
115 | + echo ' |
|
107 | 116 | <p title="', $txt['new_posts'], '"><i class="icon i-board-new"></i>', $txt['new_posts'], '</p>'; |
117 | + } |
|
108 | 118 | |
109 | 119 | echo ' |
110 | 120 | <p title="', $txt['old_posts'], '"><i class="icon i-board-off"></i>', $txt['old_posts'], '</p> |
@@ -252,8 +262,10 @@ discard block |
||
252 | 262 | |
253 | 263 | // Holidays like "Christmas", "Hanukkah", and "We Love [Unknown] Day" :P. |
254 | 264 | if (!empty($context['calendar_holidays'])) |
255 | - echo ' |
|
265 | + { |
|
266 | + echo ' |
|
256 | 267 | <p class="inline holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</p>'; |
268 | + } |
|
257 | 269 | |
258 | 270 | // People's birthdays. Like mine. And yours, I guess. Kidding. |
259 | 271 | if (!empty($context['calendar_birthdays'])) |
@@ -264,8 +276,10 @@ discard block |
||
264 | 276 | |
265 | 277 | // Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) |
266 | 278 | foreach ($context['calendar_birthdays'] as $member) |
267 | - echo ' |
|
279 | + { |
|
280 | + echo ' |
|
268 | 281 | <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', '; |
282 | + } |
|
269 | 283 | |
270 | 284 | echo ' |
271 | 285 | </p>'; |
@@ -281,8 +295,10 @@ discard block |
||
281 | 295 | // Each event in calendar_events should have: |
282 | 296 | // title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. |
283 | 297 | foreach ($context['calendar_events'] as $event) |
284 | - echo ' |
|
298 | + { |
|
299 | + echo ' |
|
285 | 300 | ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '" class="icon i-modify"></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', '; |
301 | + } |
|
286 | 302 | |
287 | 303 | echo ' |
288 | 304 | </p>'; |
@@ -328,16 +344,24 @@ discard block |
||
328 | 344 | // Handle hidden users and buddies. |
329 | 345 | $bracketList = array(); |
330 | 346 | if ($context['show_buddies']) |
331 | - $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
347 | + { |
|
348 | + $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
349 | + } |
|
332 | 350 | |
333 | 351 | if (!empty($context['num_spiders'])) |
334 | - $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
352 | + { |
|
353 | + $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
354 | + } |
|
335 | 355 | |
336 | 356 | if (!empty($context['num_users_hidden'])) |
337 | - $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_users_hidden'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
357 | + { |
|
358 | + $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_users_hidden'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
359 | + } |
|
338 | 360 | |
339 | 361 | if (!empty($bracketList)) |
340 | - echo ' (' . implode(', ', $bracketList) . ')'; |
|
362 | + { |
|
363 | + echo ' (' . implode(', ', $bracketList) . ')'; |
|
364 | + } |
|
341 | 365 | |
342 | 366 | echo $context['show_who'] ? '</a>' : '', ' |
343 | 367 | </h3>'; |
@@ -350,8 +374,10 @@ discard block |
||
350 | 374 | |
351 | 375 | // Showing membergroups? |
352 | 376 | if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) |
353 | - echo ' |
|
377 | + { |
|
378 | + echo ' |
|
354 | 379 | <p class="inline membergroups">[' . implode(', ', $context['membergroups']) . ']</p>'; |
380 | + } |
|
355 | 381 | } |
356 | 382 | echo ' |
357 | 383 | </li>'; |
@@ -95,8 +95,10 @@ |
||
95 | 95 | </div>'; |
96 | 96 | |
97 | 97 | if ($context['back_to_topic']) |
98 | - echo ' |
|
98 | + { |
|
99 | + echo ' |
|
99 | 100 | <input type="hidden" name="goback" value="1" />'; |
101 | + } |
|
100 | 102 | |
101 | 103 | echo ' |
102 | 104 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -32,8 +32,10 @@ discard block |
||
32 | 32 | <select name="show_top" id="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
33 | 33 | |
34 | 34 | foreach ($context['show_methods'] as $value => $label) |
35 | - $extra .= ' |
|
35 | + { |
|
36 | + $extra .= ' |
|
36 | 37 | <option value="' . $value . '" ' . ($value == $context['show_by'] ? ' selected="selected"' : '') . '>' . $label . '</option>'; |
38 | + } |
|
37 | 39 | |
38 | 40 | $extra .= ' |
39 | 41 | </select> |
@@ -76,8 +78,10 @@ discard block |
||
76 | 78 | </span>'; |
77 | 79 | |
78 | 80 | if (!empty($member['ip'])) |
79 | - echo ' |
|
81 | + { |
|
82 | + echo ' |
|
80 | 83 | <a class="track_ip" href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=history;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>'; |
84 | + } |
|
81 | 85 | |
82 | 86 | echo ' |
83 | 87 | </div> |
@@ -91,10 +95,12 @@ discard block |
||
91 | 95 | |
92 | 96 | // No members? |
93 | 97 | if (empty($context['members'])) |
94 | - echo ' |
|
98 | + { |
|
99 | + echo ' |
|
95 | 100 | <div class="well centertext"> |
96 | 101 | ', $txt['who_no_online_' . ($context['show_by'] == 'guests' || $context['show_by'] == 'spiders' ? $context['show_by'] : 'members')], ' |
97 | 102 | </div>'; |
103 | + } |
|
98 | 104 | |
99 | 105 | echo ' |
100 | 106 | </div>'; |
@@ -112,8 +118,10 @@ discard block |
||
112 | 118 | <select name="show" id="show" onchange="document.forms.whoFilter.submit();">'; |
113 | 119 | |
114 | 120 | foreach ($context['show_methods'] as $value => $label) |
115 | - $extra .= ' |
|
121 | + { |
|
122 | + $extra .= ' |
|
116 | 123 | <option value="' . $value . '" ' . ($value == $context['show_by'] ? ' selected="selected"' : '') . '>' . $label . '</option>'; |
124 | + } |
|
117 | 125 | |
118 | 126 | $extra .= ' |
119 | 127 | </select> |
@@ -144,14 +152,18 @@ discard block |
||
144 | 152 | foreach ($context['credits'] as $section) |
145 | 153 | { |
146 | 154 | if (isset($section['pretext'])) |
147 | - echo ' |
|
155 | + { |
|
156 | + echo ' |
|
148 | 157 | <div class="content"> |
149 | 158 | ', $section['pretext'], ' |
150 | 159 | </div>'; |
160 | + } |
|
151 | 161 | |
152 | 162 | if (isset($section['title'])) |
153 | - echo ' |
|
163 | + { |
|
164 | + echo ' |
|
154 | 165 | <h2 class="category_header">', $section['title'], '</h2>'; |
166 | + } |
|
155 | 167 | |
156 | 168 | echo ' |
157 | 169 | <div class="content"> |
@@ -160,15 +172,19 @@ discard block |
||
160 | 172 | foreach ($section['groups'] as $group) |
161 | 173 | { |
162 | 174 | if (isset($group['title'])) |
163 | - echo ' |
|
175 | + { |
|
176 | + echo ' |
|
164 | 177 | <dt> |
165 | 178 | <strong>', $group['title'], '</strong> |
166 | 179 | </dt> |
167 | 180 | <dd>'; |
181 | + } |
|
168 | 182 | |
169 | 183 | // Try to make this read nicely. |
170 | 184 | if (count($group['members']) <= 2) |
171 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
185 | + { |
|
186 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
187 | + } |
|
172 | 188 | else |
173 | 189 | { |
174 | 190 | $last_peep = array_pop($group['members']); |
@@ -183,8 +199,10 @@ discard block |
||
183 | 199 | </dl>'; |
184 | 200 | |
185 | 201 | if (isset($section['posttext'])) |
186 | - echo ' |
|
202 | + { |
|
203 | + echo ' |
|
187 | 204 | <p><em>', $section['posttext'], '</em></p>'; |
205 | + } |
|
188 | 206 | |
189 | 207 | echo ' |
190 | 208 | </div>'; |
@@ -198,13 +216,15 @@ discard block |
||
198 | 216 | <div class="content">'; |
199 | 217 | |
200 | 218 | foreach ($context['credits_software_graphics'] as $section => $credits) |
201 | - echo ' |
|
219 | + { |
|
220 | + echo ' |
|
202 | 221 | <dl> |
203 | 222 | <dt> |
204 | 223 | <strong>', $txt['credits_' . $section], '</strong> |
205 | 224 | </dt> |
206 | 225 | <dd>', implode('</dd><dd>', $credits), '</dd> |
207 | 226 | </dl>'; |
227 | + } |
|
208 | 228 | |
209 | 229 | echo ' |
210 | 230 | </div>'; |
@@ -109,11 +109,14 @@ discard block |
||
109 | 109 | |
110 | 110 | // Which option is set, text or text&images |
111 | 111 | if (!empty($context['viewing_attach'])) |
112 | - echo ' |
|
112 | + { |
|
113 | + echo ' |
|
113 | 114 | <a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a> | <strong><a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a></strong>'; |
114 | - else |
|
115 | - echo ' |
|
115 | + } |
|
116 | + else { |
|
117 | + echo ' |
|
116 | 118 | <strong><a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a></strong> | <a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a>'; |
119 | + } |
|
117 | 120 | |
118 | 121 | echo ' |
119 | 122 | </div> |
@@ -137,10 +140,12 @@ discard block |
||
137 | 140 | |
138 | 141 | $print_options = 1; |
139 | 142 | foreach ($context['poll']['options'] as $option) |
140 | - echo ' |
|
143 | + { |
|
144 | + echo ' |
|
141 | 145 | <div class="', $option['voted_this'] ? 'voted' : '', '">', $txt['option'], ' ', $print_options++, ': <strong>', $option['option'], '</strong> |
142 | 146 | ', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', ' |
143 | 147 | </div>'; |
148 | + } |
|
144 | 149 | |
145 | 150 | echo ' |
146 | 151 | </div>'; |
@@ -171,8 +176,10 @@ discard block |
||
171 | 176 | <hr />'; |
172 | 177 | |
173 | 178 | foreach ($context['printattach'][$post['id_msg']] as $attach) |
174 | - echo ' |
|
179 | + { |
|
180 | + echo ' |
|
175 | 181 | <img style="width:' . $attach['width'] . 'px; height:' . $attach['height'] . 'px;" src="', $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attach['id_attach'] . '" alt="" />'; |
182 | + } |
|
176 | 183 | } |
177 | 184 | |
178 | 185 | echo ' |
@@ -193,11 +200,14 @@ discard block |
||
193 | 200 | |
194 | 201 | // Show the text / image links |
195 | 202 | if (!empty($context['viewing_attach'])) |
196 | - echo ' |
|
203 | + { |
|
204 | + echo ' |
|
197 | 205 | <a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a> | <strong><a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a></strong>'; |
198 | - else |
|
199 | - echo ' |
|
206 | + } |
|
207 | + else { |
|
208 | + echo ' |
|
200 | 209 | <strong><a href="', $context['view_attach_mode']['text'], '">', $txt['print_page_text'], '</a></strong> | <a href="', $context['view_attach_mode']['images'], '">', $txt['print_page_images'], '</a>'; |
210 | + } |
|
201 | 211 | |
202 | 212 | echo ' |
203 | 213 | </div> |
@@ -42,8 +42,10 @@ discard block |
||
42 | 42 | |
43 | 43 | // Show a list of all the years we allow... |
44 | 44 | for ($year = $context['cal_minyear']; $year <= $context['cal_maxyear']; $year++) |
45 | - echo ' |
|
45 | + { |
|
46 | + echo ' |
|
46 | 47 | <option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected="selected"' : '', '>', $year, '</option>'; |
48 | + } |
|
47 | 49 | |
48 | 50 | echo ' |
49 | 51 | </select> |
@@ -52,8 +54,10 @@ discard block |
||
52 | 54 | |
53 | 55 | // There are 12 months per year - ensure that they all get listed. |
54 | 56 | for ($month = 1; $month <= 12; $month++) |
55 | - echo ' |
|
57 | + { |
|
58 | + echo ' |
|
56 | 59 | <option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>'; |
60 | + } |
|
57 | 61 | |
58 | 62 | echo ' |
59 | 63 | </select> |
@@ -62,8 +66,10 @@ discard block |
||
62 | 66 | |
63 | 67 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
64 | 68 | for ($day = 1; $day <= $context['holiday']['last_day']; $day++) |
65 | - echo ' |
|
69 | + { |
|
70 | + echo ' |
|
66 | 71 | <option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected="selected"' : '', '>', $day, '</option>'; |
72 | + } |
|
67 | 73 | |
68 | 74 | echo ' |
69 | 75 | </select> |
@@ -73,13 +79,16 @@ discard block |
||
73 | 79 | <div class="submitbutton">'; |
74 | 80 | |
75 | 81 | if ($context['is_new']) |
76 | - echo ' |
|
82 | + { |
|
83 | + echo ' |
|
77 | 84 | <input type="submit" value="', $txt['holidays_button_add'], '" />'; |
78 | - else |
|
79 | - echo ' |
|
85 | + } |
|
86 | + else { |
|
87 | + echo ' |
|
80 | 88 | <input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" /> |
81 | 89 | <input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" /> |
82 | 90 | <input type="hidden" name="holiday" value="', $context['holiday']['id'], '" />'; |
91 | + } |
|
83 | 92 | |
84 | 93 | echo ' |
85 | 94 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
@@ -28,8 +28,10 @@ discard block |
||
28 | 28 | </h2>'; |
29 | 29 | |
30 | 30 | if ($context['ban']['is_new']) |
31 | - echo ' |
|
31 | + { |
|
32 | + echo ' |
|
32 | 33 | <div class="information">', $txt['ban_add_notes'], '</div>'; |
34 | + } |
|
33 | 35 | |
34 | 36 | // If there were errors creating the ban, show them. |
35 | 37 | template_show_error('ban_errors'); |
@@ -45,7 +47,8 @@ discard block |
||
45 | 47 | </dd>'; |
46 | 48 | |
47 | 49 | if (isset($context['ban']['reason'])) |
48 | - echo ' |
|
50 | + { |
|
51 | + echo ' |
|
49 | 52 | <dt> |
50 | 53 | <label for="reason">', $txt['ban_reason'], ':</label><br /> |
51 | 54 | <span class="smalltext">', $txt['ban_reason_desc'], '</span> |
@@ -53,9 +56,11 @@ discard block |
||
53 | 56 | <dd> |
54 | 57 | <textarea name="reason" id="reason" cols="40" rows="3" class="ban_text">', $context['ban']['reason'], '</textarea> |
55 | 58 | </dd>'; |
59 | + } |
|
56 | 60 | |
57 | 61 | if (isset($context['ban']['notes'])) |
58 | - echo ' |
|
62 | + { |
|
63 | + echo ' |
|
59 | 64 | <dt> |
60 | 65 | <label for="ban_notes">', $txt['ban_notes'], ':</label><br /> |
61 | 66 | <span class="smalltext">', $txt['ban_notes_desc'], '</span> |
@@ -63,6 +68,7 @@ discard block |
||
63 | 68 | <dd> |
64 | 69 | <textarea name="notes" id="ban_notes" cols="40" rows="3" class="ban_text">', $context['ban']['notes'], '</textarea> |
65 | 70 | </dd>'; |
71 | + } |
|
66 | 72 | |
67 | 73 | echo ' |
68 | 74 | </dl> |
@@ -102,7 +108,8 @@ discard block |
||
102 | 108 | </dd>'; |
103 | 109 | |
104 | 110 | if (empty($modSettings['disableHostnameLookup'])) |
105 | - echo ' |
|
111 | + { |
|
112 | + echo ' |
|
106 | 113 | <dt> |
107 | 114 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" ', !empty($context['ban_suggestions']['hostname']) ? 'checked="checked" ' : '', '/> |
108 | 115 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -110,6 +117,7 @@ discard block |
||
110 | 117 | <dd> |
111 | 118 | <input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text" /> |
112 | 119 | </dd>'; |
120 | + } |
|
113 | 121 | |
114 | 122 | echo ' |
115 | 123 | <dt> |
@@ -140,13 +148,15 @@ discard block |
||
140 | 148 | |
141 | 149 | $count = 0; |
142 | 150 | foreach ($ban_ips as $ip) |
143 | - echo ' |
|
151 | + { |
|
152 | + echo ' |
|
144 | 153 | <dt> |
145 | 154 | <input type="checkbox" id="suggestions_', $key, '_', $count, '" name="ban_suggestions[', $key, '][]" ', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? 'checked="checked" ' : '', 'value="', $ip, '" /> |
146 | 155 | </dt> |
147 | 156 | <dd> |
148 | 157 | <label for="suggestions_', $key, '_', ($count++), '">', $ip, '</label> |
149 | 158 | </dd>'; |
159 | + } |
|
150 | 160 | |
151 | 161 | echo ' |
152 | 162 | </dl>'; |
@@ -183,7 +193,8 @@ discard block |
||
183 | 193 | |
184 | 194 | // Auto suggest only needed for adding new bans, not editing |
185 | 195 | if (!empty($context['use_autosuggest'])) |
186 | - echo ' |
|
196 | + { |
|
197 | + echo ' |
|
187 | 198 | <script> |
188 | 199 | var oAddMemberSuggest = new smc_AutoSuggest({ |
189 | 200 | sSelf: \'oAddMemberSuggest\', |
@@ -198,7 +209,8 @@ discard block |
||
198 | 209 | |
199 | 210 | oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\'); |
200 | 211 | </script>'; |
201 | -} |
|
212 | + } |
|
213 | + } |
|
202 | 214 | |
203 | 215 | /** |
204 | 216 | * Template to edit ban triggers |
@@ -228,7 +240,8 @@ discard block |
||
228 | 240 | </dd>'; |
229 | 241 | |
230 | 242 | if (empty($modSettings['disableHostnameLookup'])) |
231 | - echo ' |
|
243 | + { |
|
244 | + echo ' |
|
232 | 245 | <dt> |
233 | 246 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname" ', $context['ban_trigger']['hostname']['selected'] ? 'checked="checked" ' : '', '/> |
234 | 247 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -236,6 +249,7 @@ discard block |
||
236 | 249 | <dd> |
237 | 250 | <input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;" class="input_text" /> |
238 | 251 | </dd>'; |
252 | + } |
|
239 | 253 | |
240 | 254 | echo ' |
241 | 255 | <dt> |