@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | echo ' |
56 | 56 | <div class="profile_user_avatar floatleft"> |
57 | - <a href="', $scripturl, '?action=profile;u=', $context['user']['id'], '">', $context['member']['avatar']['image'],'</a> |
|
57 | + <a href="', $scripturl, '?action=profile;u=', $context['user']['id'], '">', $context['member']['avatar']['image'], '</a> |
|
58 | 58 | </div> |
59 | 59 | <div class="profile_user_info floatleft"> |
60 | 60 | <span class="profile_username"><a href="', $scripturl, '?action=profile;u=', $context['user']['id'], '">', $context['user']['name'], '</a></span> |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | echo ' |
330 | 330 | <dt>', $txt['profile_warning_level'], ': </dt> |
331 | 331 | <dd> |
332 | - <a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=', ($context['can_issue_warning'] && !$context['user']['is_owner'] ? 'issuewarning' : 'viewwarning') , '">', $context['member']['warning'], '%</a>'; |
|
332 | + <a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=', ($context['can_issue_warning'] && !$context['user']['is_owner'] ? 'issuewarning' : 'viewwarning'), '">', $context['member']['warning'], '%</a>'; |
|
333 | 333 | |
334 | 334 | // Can we provide information on what this means? |
335 | 335 | if (!empty($context['warning_status'])) |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | // If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves. |
348 | 348 | if (!empty($context['activate_message'])) |
349 | 349 | echo ' |
350 | - <dt class="clear"><span class="alert">', $context['activate_message'], '</span> (<a href="', $context['activate_link'], '"', ($context['activate_type'] == 4 ? ' class="you_sure" data-confirm="'. $txt['profileConfirm'] .'"' : ''), '>', $context['activate_link_text'], '</a>)</dt>'; |
|
350 | + <dt class="clear"><span class="alert">', $context['activate_message'], '</span> (<a href="', $context['activate_link'], '"', ($context['activate_type'] == 4 ? ' class="you_sure" data-confirm="' . $txt['profileConfirm'] . '"' : ''), '>', $context['activate_link_text'], '</a>)</dt>'; |
|
351 | 351 | |
352 | 352 | // If the current member is banned, show a message and possibly a link to the ban. |
353 | 353 | if (!empty($context['member']['bans'])) |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | foreach ($context['posts'] as $post) |
474 | 474 | { |
475 | 475 | echo ' |
476 | - <div class="', $post['css_class'] ,'"> |
|
476 | + <div class="', $post['css_class'], '"> |
|
477 | 477 | <div class="counter">', $post['counter'], '</div> |
478 | 478 | <div class="topic_details"> |
479 | 479 | <h5><strong><a href="', $scripturl, '?board=', $post['board']['id'], '.0">', $post['board']['name'], '</a> / <a href="', $scripturl, '?topic=', $post['topic'], '.', $post['start'], '#msg', $post['id'], '">', $post['subject'], '</a></strong></h5> |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | // How about... even... remove it entirely?! |
510 | 510 | if ($post['can_delete']) |
511 | 511 | echo ' |
512 | - <li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>'; |
|
512 | + <li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>'; |
|
513 | 513 | |
514 | 514 | if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
515 | 515 | echo ' |
@@ -580,9 +580,9 @@ discard block |
||
580 | 580 | <td>', $alert['time'], '</td> |
581 | 581 | <td> |
582 | 582 | <ul class="quickbuttons"> |
583 | - <li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=remove;aid=', $id ,';', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['delete'] ,'</a></li> |
|
584 | - <li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=', ($alert['is_read'] != 0 ? 'unread' : 'read') ,';aid=', $id ,';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons ', $alert['is_read'] != 0 ? 'unread_button' : 'read_button','"></span>', ($alert['is_read'] != 0 ? $txt['mark_unread'] : $txt['mark_read_short']),'</a></li> |
|
585 | - <li><input type="checkbox" name="mark[', $id ,']" value="', $id ,'"></li> |
|
583 | + <li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=remove;aid=', $id, ';', $context['session_var'], '=', $context['session_id'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['delete'], '</a></li> |
|
584 | + <li><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=showalerts;do=', ($alert['is_read'] != 0 ? 'unread' : 'read'), ';aid=', $id, ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons ', $alert['is_read'] != 0 ? 'unread_button' : 'read_button', '"></span>', ($alert['is_read'] != 0 ? $txt['mark_unread'] : $txt['mark_read_short']), '</a></li> |
|
585 | + <li><input type="checkbox" name="mark[', $id, ']" value="', $id, '"></li> |
|
586 | 586 | </ul> |
587 | 587 | </td> |
588 | 588 | </tr>'; |
@@ -592,17 +592,17 @@ discard block |
||
592 | 592 | </table> |
593 | 593 | <div class="pagesection"> |
594 | 594 | <div class="floatleft"> |
595 | - ', $context['pagination'] ,' |
|
595 | + ', $context['pagination'], ' |
|
596 | 596 | </div> |
597 | 597 | <div class="floatright"> |
598 | - ', $txt['check_all'] ,': <input type="checkbox" name="select_all" id="select_all"> |
|
598 | + ', $txt['check_all'], ': <input type="checkbox" name="select_all" id="select_all"> |
|
599 | 599 | <select name="mark_as"> |
600 | - <option value="read">', $txt['quick_mod_markread'] ,'</option> |
|
601 | - <option value="unread">', $txt['quick_mod_markunread'] ,'</option> |
|
602 | - <option value="remove">', $txt['quick_mod_remove'] ,'</option> |
|
600 | + <option value="read">', $txt['quick_mod_markread'], '</option> |
|
601 | + <option value="unread">', $txt['quick_mod_markunread'], '</option> |
|
602 | + <option value="remove">', $txt['quick_mod_remove'], '</option> |
|
603 | 603 | </select> |
604 | 604 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
605 | - <input type="submit" name="req" value="', $txt['quick_mod_go'] ,'" class="button_submit you_sure"> |
|
605 | + <input type="submit" name="req" value="', $txt['quick_mod_go'], '" class="button_submit you_sure"> |
|
606 | 606 | </div> |
607 | 607 | </div> |
608 | 608 | </form>'; |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | <div class="floatright"> |
660 | 660 | <ul class="quickbuttons"> |
661 | 661 | <li><a href="', $scripturl, '?action=post;', (empty($draft['topic']['id']) ? 'board=' . $draft['board']['id'] : 'topic=' . $draft['topic']['id']), '.0;id_draft=', $draft['id_draft'], '"><span class="generic_icons reply_button"></span>', $txt['draft_edit'], '</a></li> |
662 | - <li><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';area=showdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li> |
|
662 | + <li><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';area=showdrafts;delete=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['draft_remove'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['draft_delete'], '</a></li> |
|
663 | 663 | </ul> |
664 | 664 | </div> |
665 | 665 | </div>'; |
@@ -715,7 +715,7 @@ discard block |
||
715 | 715 | if (empty($context['buddies'])) |
716 | 716 | echo ' |
717 | 717 | <tr class="windowbg"> |
718 | - <td colspan="', allowedTo('moderate_forum') ? '10' : '9','"><strong>', $txt['no_buddies'], '</strong></td> |
|
718 | + <td colspan="', allowedTo('moderate_forum') ? '10' : '9', '"><strong>', $txt['no_buddies'], '</strong></td> |
|
719 | 719 | </tr>'; |
720 | 720 | |
721 | 721 | // Now loop through each buddy showing info on each. |
@@ -818,14 +818,14 @@ discard block |
||
818 | 818 | <th scope="col">', $txt['email'], '</th>'; |
819 | 819 | |
820 | 820 | echo ' |
821 | - <th scope="col">', $txt['ignore_remove'] ,'</th> |
|
821 | + <th scope="col">', $txt['ignore_remove'], '</th> |
|
822 | 822 | </tr>'; |
823 | 823 | |
824 | 824 | // If they don't have anyone on their ignore list, don't list it! |
825 | 825 | if (empty($context['ignore_list'])) |
826 | 826 | echo ' |
827 | 827 | <tr class="windowbg"> |
828 | - <td colspan="', allowedTo('moderate_forum') ? '4' : '3','"><strong>', $txt['no_ignore'], '</strong></td> |
|
828 | + <td colspan="', allowedTo('moderate_forum') ? '4' : '3', '"><strong>', $txt['no_ignore'], '</strong></td> |
|
829 | 829 | </tr>'; |
830 | 830 | |
831 | 831 | // Now loop through each buddy showing info on each. |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | else |
1064 | 1064 | { |
1065 | 1065 | echo ' |
1066 | - <div class="information">',$txt['showPermissions_help'],'</div> |
|
1066 | + <div class="information">',$txt['showPermissions_help'], '</div> |
|
1067 | 1067 | <div id="permissions" class="flow_hidden">'; |
1068 | 1068 | |
1069 | 1069 | if (!empty($context['no_access_boards'])) |
@@ -1110,7 +1110,7 @@ discard block |
||
1110 | 1110 | |
1111 | 1111 | if ($permission['is_denied']) |
1112 | 1112 | echo ' |
1113 | - <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']),'</span>'; |
|
1113 | + <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>'; |
|
1114 | 1114 | else |
1115 | 1115 | echo ' |
1116 | 1116 | ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); |
@@ -1896,7 +1896,7 @@ discard block |
||
1896 | 1896 | { |
1897 | 1897 | echo ' |
1898 | 1898 | <tr class="windowbg"> |
1899 | - <td>', $txt['alert_' . $alert_id], isset($alert_details['help']) ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $alert_details['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help floatright"><span class="generic_icons help" title="'. $txt['help'].'"></span></a>' : '', '</td>'; |
|
1899 | + <td>', $txt['alert_' . $alert_id], isset($alert_details['help']) ? '<a href="' . $scripturl . '?action=helpadmin;help=' . $alert_details['help'] . '" onclick="return reqOverlayDiv(this.href);" class="help floatright"><span class="generic_icons help" title="' . $txt['help'] . '"></span></a>' : '', '</td>'; |
|
1900 | 1900 | |
1901 | 1901 | foreach ($context['alert_bits'] as $type => $bitmask) |
1902 | 1902 | { |
@@ -2078,7 +2078,7 @@ discard block |
||
2078 | 2078 | <a href="', $scripturl, '?action=profile;save;u=', $context['id_member'], ';area=groupmembership;', $context['session_var'], '=', $context['session_id'], ';gid=', $group['id'], ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '" class="button floatright">', $txt['join_group'], '</a>'; |
2079 | 2079 | elseif ($group['type'] == 2 && $group['pending']) |
2080 | 2080 | echo ' |
2081 | - <span class="floatright">', $txt['approval_pending'],'</span>'; |
|
2081 | + <span class="floatright">', $txt['approval_pending'], '</span>'; |
|
2082 | 2082 | elseif ($group['type'] == 2) |
2083 | 2083 | echo ' |
2084 | 2084 | <a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=groupmembership;request=', $group['id'], '" class="button floatright">', $txt['request_group'], '</a>'; |
@@ -2382,7 +2382,7 @@ discard block |
||
2382 | 2382 | <div id="box_preview"', !empty($context['warning_data']['body_preview']) ? '' : ' style="display:none"', '> |
2383 | 2383 | <dl class="settings"> |
2384 | 2384 | <dt> |
2385 | - <strong>', $txt['preview'] , '</strong> |
|
2385 | + <strong>', $txt['preview'], '</strong> |
|
2386 | 2386 | </dt> |
2387 | 2387 | <dd id="body_preview"> |
2388 | 2388 | ', !empty($context['warning_data']['body_preview']) ? $context['warning_data']['body_preview'] : '', ' |
@@ -2801,7 +2801,7 @@ discard block |
||
2801 | 2801 | ', !empty($context['member']['avatar']['allow_server_stored']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_server_stored" value="server_stored"' . ($context['member']['avatar']['choice'] == 'server_stored' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_server_stored"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['choose_avatar_gallery'] . '</label><br />' : '', ' |
2802 | 2802 | ', !empty($context['member']['avatar']['allow_external']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_external" value="external"' . ($context['member']['avatar']['choice'] == 'external' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_external"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['my_own_pic'] . '</label><br />' : '', ' |
2803 | 2803 | ', !empty($context['member']['avatar']['allow_upload']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_upload" value="upload"' . ($context['member']['avatar']['choice'] == 'upload' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_upload"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['avatar_will_upload'] . '</label><br />' : '', ' |
2804 | - ', !empty($context['member']['avatar']['allow_gravatar']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_gravatar" value="gravatar"'. ($context['member']['avatar']['choice'] == 'gravatar' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_gravatar"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['use_gravatar'] . '</label>' : '', ' |
|
2804 | + ', !empty($context['member']['avatar']['allow_gravatar']) ? '<input type="radio" onclick="swap_avatar(this); return true;" name="avatar_choice" id="avatar_choice_gravatar" value="gravatar"' . ($context['member']['avatar']['choice'] == 'gravatar' ? ' checked="checked"' : '') . ' class="input_radio" /><label for="avatar_choice_gravatar"' . (isset($context['modify_error']['bad_avatar']) ? ' class="error"' : '') . '>' . $txt['use_gravatar'] . '</label>' : '', ' |
|
2805 | 2805 | </dt> |
2806 | 2806 | <dd>'; |
2807 | 2807 | |
@@ -2968,7 +2968,7 @@ discard block |
||
2968 | 2968 | echo ' |
2969 | 2969 | <dt> |
2970 | 2970 | <strong><label for="easyformat">', $txt['time_format'], ':</label></strong><br> |
2971 | - <a href="', $scripturl, '?action=helpadmin;help=time_format" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a> |
|
2971 | + <a href="', $scripturl, '?action=helpadmin;help=time_format" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a> |
|
2972 | 2972 | <span class="smalltext"> <label for="time_format">', $txt['date_format'], '</label></span> |
2973 | 2973 | </dt> |
2974 | 2974 | <dd> |
@@ -3034,8 +3034,7 @@ discard block |
||
3034 | 3034 | <div class="roundframe"> |
3035 | 3035 | <div> |
3036 | 3036 | ', !empty($context['tfa_backup']) ? ' |
3037 | - <div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : |
|
3038 | - ($modSettings['tfa_mode'] == 2 ? ' |
|
3037 | + <div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : ($modSettings['tfa_mode'] == 2 ? ' |
|
3039 | 3038 | <div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), ' |
3040 | 3039 | <div class="smalltext">', $txt['tfa_desc'], '</div> |
3041 | 3040 | <div id="basicinfo" style="width: 60%"> |
@@ -3043,7 +3042,7 @@ discard block |
||
3043 | 3042 | <div class="title_top"> |
3044 | 3043 | <strong>', $txt['tfa_step1'], '</strong><br /> |
3045 | 3044 | ', !empty($context['tfa_pass_error']) ? '<div class="error smalltext">' . $txt['tfa_pass_invalid'] . '</div>' : '', ' |
3046 | - <input type="password" name="passwd" style="width: 200px;"', !empty($context['tfa_pass_error']) ? ' class="error"' : '', !empty($context['tfa_pass_value']) ? ' value="' . $context['tfa_pass_value'] . '"' : '' ,'> |
|
3045 | + <input type="password" name="passwd" style="width: 200px;"', !empty($context['tfa_pass_error']) ? ' class="error"' : '', !empty($context['tfa_pass_value']) ? ' value="' . $context['tfa_pass_value'] . '"' : '', '> |
|
3047 | 3046 | </div> |
3048 | 3047 | <div class="title_top"> |
3049 | 3048 | <strong>', $txt['tfa_step2'], '</strong> |
@@ -3051,9 +3050,9 @@ discard block |
||
3051 | 3050 | <div class="tfacode">', $context['tfa_secret'], '</div> |
3052 | 3051 | </div> |
3053 | 3052 | <div class="title_top"> |
3054 | - <strong>', $txt['tfa_step3'] , '</strong><br /> |
|
3053 | + <strong>', $txt['tfa_step3'], '</strong><br /> |
|
3055 | 3054 | ', !empty($context['tfa_error']) ? '<div class="error smalltext">' . $txt['tfa_code_invalid'] . '</div>' : '', ' |
3056 | - <input type="text" name="tfa_code" style="width: 200px;"', !empty($context['tfa_error']) ? ' class="error"' : '', !empty($context['tfa_value']) ? ' value="' . $context['tfa_value'] . '"' : '' ,'> |
|
3055 | + <input type="text" name="tfa_code" style="width: 200px;"', !empty($context['tfa_error']) ? ' class="error"' : '', !empty($context['tfa_value']) ? ' value="' . $context['tfa_value'] . '"' : '', '> |
|
3057 | 3056 | <input type="submit" name="save" value="', $txt['tfa_enable'], '" class="button_submit" style="float: none;" /> |
3058 | 3057 | </div> |
3059 | 3058 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" /> |
@@ -18,23 +18,25 @@ discard block |
||
18 | 18 | global $context; |
19 | 19 | |
20 | 20 | // Prevent Chrome from auto completing fields when viewing/editing other members profiles |
21 | - if (isBrowser('is_chrome') && !$context['user']['is_owner']) |
|
22 | - echo ' |
|
21 | + if (isBrowser('is_chrome') && !$context['user']['is_owner']) { |
|
22 | + echo ' |
|
23 | 23 | <script> |
24 | 24 | disableAutoComplete(); |
25 | 25 | </script>'; |
26 | + } |
|
26 | 27 | |
27 | 28 | // If an error occurred while trying to save previously, give the user a clue! |
28 | 29 | echo ' |
29 | 30 | ', template_error_message(); |
30 | 31 | |
31 | 32 | // If the profile was update successfully, let the user know this. |
32 | - if (!empty($context['profile_updated'])) |
|
33 | - echo ' |
|
33 | + if (!empty($context['profile_updated'])) { |
|
34 | + echo ' |
|
34 | 35 | <div class="infobox"> |
35 | 36 | ', $context['profile_updated'], ' |
36 | 37 | </div>'; |
37 | -} |
|
38 | + } |
|
39 | + } |
|
38 | 40 | |
39 | 41 | /** |
40 | 42 | * Template for any HTML needed below the profile (closing off divs/tables, etc.) |
@@ -102,8 +104,7 @@ discard block |
||
102 | 104 | if (empty($context['unread_alerts'])) |
103 | 105 | { |
104 | 106 | template_alerts_all_read(); |
105 | - } |
|
106 | - else |
|
107 | + } else |
|
107 | 108 | { |
108 | 109 | foreach ($context['unread_alerts'] as $id_alert => $details) |
109 | 110 | { |
@@ -164,10 +165,11 @@ discard block |
||
164 | 165 | <div class="custom_fields_above_name"> |
165 | 166 | <ul >'; |
166 | 167 | |
167 | - foreach ($context['print_custom_fields']['above_member'] as $field) |
|
168 | - if (!empty($field['output_html'])) |
|
168 | + foreach ($context['print_custom_fields']['above_member'] as $field) { |
|
169 | + if (!empty($field['output_html'])) |
|
169 | 170 | echo ' |
170 | 171 | <li>', $field['output_html'], '</li>'; |
172 | + } |
|
171 | 173 | |
172 | 174 | echo ' |
173 | 175 | </ul> |
@@ -188,10 +190,11 @@ discard block |
||
188 | 190 | <div class="custom_fields_below_avatar"> |
189 | 191 | <ul >'; |
190 | 192 | |
191 | - foreach ($context['print_custom_fields']['below_avatar'] as $field) |
|
192 | - if (!empty($field['output_html'])) |
|
193 | + foreach ($context['print_custom_fields']['below_avatar'] as $field) { |
|
194 | + if (!empty($field['output_html'])) |
|
193 | 195 | echo ' |
194 | 196 | <li>', $field['output_html'], '</li>'; |
197 | + } |
|
195 | 198 | |
196 | 199 | echo ' |
197 | 200 | </ul> |
@@ -202,22 +205,25 @@ discard block |
||
202 | 205 | echo ' |
203 | 206 | <ul class="clear">'; |
204 | 207 | // Email is only visible if it's your profile or you have the moderate_forum permission |
205 | - if ($context['member']['show_email']) |
|
206 | - echo ' |
|
208 | + if ($context['member']['show_email']) { |
|
209 | + echo ' |
|
207 | 210 | <li><a href="mailto:', $context['member']['email'], '" title="', $context['member']['email'], '" rel="nofollow"><span class="generic_icons mail" title="' . $txt['email'] . '"></span></a></li>'; |
211 | + } |
|
208 | 212 | |
209 | 213 | // Don't show an icon if they haven't specified a website. |
210 | - if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website'])) |
|
211 | - echo ' |
|
214 | + if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website'])) { |
|
215 | + echo ' |
|
212 | 216 | <li><a href="', $context['member']['website']['url'], '" title="' . $context['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<span class="generic_icons www" title="' . $context['member']['website']['title'] . '"></span>' : $txt['www']), '</a></li>'; |
217 | + } |
|
213 | 218 | |
214 | 219 | // Are there any custom profile fields as icons? |
215 | 220 | if (!empty($context['print_custom_fields']['icons'])) |
216 | 221 | { |
217 | - foreach ($context['print_custom_fields']['icons'] as $field) |
|
218 | - if (!empty($field['output_html'])) |
|
222 | + foreach ($context['print_custom_fields']['icons'] as $field) { |
|
223 | + if (!empty($field['output_html'])) |
|
219 | 224 | echo ' |
220 | 225 | <li class="custom_field">', $field['output_html'], '</li>'; |
226 | + } |
|
221 | 227 | } |
222 | 228 | |
223 | 229 | echo ' |
@@ -225,23 +231,26 @@ discard block |
||
225 | 231 | <span id="userstatus">', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['text'] . '" rel="nofollow">' : '', $settings['use_image_buttons'] ? '<span class="' . ($context['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $context['member']['online']['text'] . '"></span>' : $context['member']['online']['label'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['label'] . '</span>' : ''; |
226 | 232 | |
227 | 233 | // Can they add this member as a buddy? |
228 | - if (!empty($context['can_have_buddy']) && !$context['user']['is_owner']) |
|
229 | - echo ' |
|
234 | + if (!empty($context['can_have_buddy']) && !$context['user']['is_owner']) { |
|
235 | + echo ' |
|
230 | 236 | <br><a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>'; |
237 | + } |
|
231 | 238 | |
232 | 239 | echo ' |
233 | 240 | </span>'; |
234 | 241 | |
235 | - if (!$context['user']['is_owner'] && $context['can_send_pm']) |
|
236 | - echo ' |
|
242 | + if (!$context['user']['is_owner'] && $context['can_send_pm']) { |
|
243 | + echo ' |
|
237 | 244 | <a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], '" class="infolinks">', $txt['profile_sendpm_short'], '</a>'; |
245 | + } |
|
238 | 246 | |
239 | 247 | echo ' |
240 | 248 | <a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '" class="infolinks">', $txt['showPosts'], '</a>'; |
241 | 249 | |
242 | - if ($context['user']['is_owner'] && !empty($modSettings['drafts_post_enabled'])) |
|
243 | - echo ' |
|
250 | + if ($context['user']['is_owner'] && !empty($modSettings['drafts_post_enabled'])) { |
|
251 | + echo ' |
|
244 | 252 | <a href="', $scripturl, '?action=profile;area=showdrafts;u=', $context['id_member'], '" class="infolinks">', $txt['drafts_show'], '</a>'; |
253 | + } |
|
245 | 254 | |
246 | 255 | echo ' |
247 | 256 | <a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '" class="infolinks">', $txt['statPanel'], '</a>'; |
@@ -253,10 +262,11 @@ discard block |
||
253 | 262 | <div class="custom_fields_bottom"> |
254 | 263 | <ul class="nolist">'; |
255 | 264 | |
256 | - foreach ($context['print_custom_fields']['bottom_poster'] as $field) |
|
257 | - if (!empty($field['output_html'])) |
|
265 | + foreach ($context['print_custom_fields']['bottom_poster'] as $field) { |
|
266 | + if (!empty($field['output_html'])) |
|
258 | 267 | echo ' |
259 | 268 | <li>', $field['output_html'], '</li>'; |
269 | + } |
|
260 | 270 | |
261 | 271 | echo ' |
262 | 272 | </ul> |
@@ -270,15 +280,17 @@ discard block |
||
270 | 280 | <div id="detailedinfo"> |
271 | 281 | <dl>'; |
272 | 282 | |
273 | - if ($context['user']['is_owner'] || $context['user']['is_admin']) |
|
274 | - echo ' |
|
283 | + if ($context['user']['is_owner'] || $context['user']['is_admin']) { |
|
284 | + echo ' |
|
275 | 285 | <dt>', $txt['username'], ': </dt> |
276 | 286 | <dd>', $context['member']['username'], '</dd>'; |
287 | + } |
|
277 | 288 | |
278 | - if (!isset($context['disabled_fields']['posts'])) |
|
279 | - echo ' |
|
289 | + if (!isset($context['disabled_fields']['posts'])) { |
|
290 | + echo ' |
|
280 | 291 | <dt>', $txt['profile_posts'], ': </dt> |
281 | 292 | <dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>'; |
293 | + } |
|
282 | 294 | |
283 | 295 | if ($context['member']['show_email']) |
284 | 296 | { |
@@ -287,15 +299,17 @@ discard block |
||
287 | 299 | <dd><a href="mailto:', $context['member']['email'], '">', $context['member']['email'], '</a></dd>'; |
288 | 300 | } |
289 | 301 | |
290 | - if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title'])) |
|
291 | - echo ' |
|
302 | + if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title'])) { |
|
303 | + echo ' |
|
292 | 304 | <dt>', $txt['custom_title'], ': </dt> |
293 | 305 | <dd>', $context['member']['title'], '</dd>'; |
306 | + } |
|
294 | 307 | |
295 | - if (!empty($context['member']['blurb'])) |
|
296 | - echo ' |
|
308 | + if (!empty($context['member']['blurb'])) { |
|
309 | + echo ' |
|
297 | 310 | <dt>', $txt['personal_text'], ': </dt> |
298 | 311 | <dd>', $context['member']['blurb'], '</dd>'; |
312 | + } |
|
299 | 313 | |
300 | 314 | echo ' |
301 | 315 | <dt>', $txt['age'], ':</dt> |
@@ -310,11 +324,12 @@ discard block |
||
310 | 324 | echo ' |
311 | 325 | <dl>'; |
312 | 326 | |
313 | - foreach ($context['print_custom_fields']['standard'] as $field) |
|
314 | - if (!empty($field['output_html'])) |
|
327 | + foreach ($context['print_custom_fields']['standard'] as $field) { |
|
328 | + if (!empty($field['output_html'])) |
|
315 | 329 | echo ' |
316 | 330 | <dt>', $field['name'], ':</dt> |
317 | 331 | <dd>', $field['output_html'], '</dd>'; |
332 | + } |
|
318 | 333 | |
319 | 334 | echo ' |
320 | 335 | </dl>'; |
@@ -332,9 +347,10 @@ discard block |
||
332 | 347 | <a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=', ($context['can_issue_warning'] && !$context['user']['is_owner'] ? 'issuewarning' : 'viewwarning') , '">', $context['member']['warning'], '%</a>'; |
333 | 348 | |
334 | 349 | // Can we provide information on what this means? |
335 | - if (!empty($context['warning_status'])) |
|
336 | - echo ' |
|
350 | + if (!empty($context['warning_status'])) { |
|
351 | + echo ' |
|
337 | 352 | <span class="smalltext">(', $context['warning_status'], ')</span>'; |
353 | + } |
|
338 | 354 | |
339 | 355 | echo ' |
340 | 356 | </dd>'; |
@@ -345,9 +361,10 @@ discard block |
||
345 | 361 | { |
346 | 362 | |
347 | 363 | // If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves. |
348 | - if (!empty($context['activate_message'])) |
|
349 | - echo ' |
|
364 | + if (!empty($context['activate_message'])) { |
|
365 | + echo ' |
|
350 | 366 | <dt class="clear"><span class="alert">', $context['activate_message'], '</span> (<a href="', $context['activate_link'], '"', ($context['activate_type'] == 4 ? ' class="you_sure" data-confirm="'. $txt['profileConfirm'] .'"' : ''), '>', $context['activate_link_text'], '</a>)</dt>'; |
367 | + } |
|
351 | 368 | |
352 | 369 | // If the current member is banned, show a message and possibly a link to the ban. |
353 | 370 | if (!empty($context['member']['bans'])) |
@@ -357,9 +374,10 @@ discard block |
||
357 | 374 | <dt class="clear" id="ban_info" style="display: none;"> |
358 | 375 | <strong>', $txt['user_banned_by_following'], ':</strong>'; |
359 | 376 | |
360 | - foreach ($context['member']['bans'] as $ban) |
|
361 | - echo ' |
|
377 | + foreach ($context['member']['bans'] as $ban) { |
|
378 | + echo ' |
|
362 | 379 | <br><span class="smalltext">', $ban['explanation'], '</span>'; |
380 | + } |
|
363 | 381 | |
364 | 382 | echo ' |
365 | 383 | </dt>'; |
@@ -373,30 +391,34 @@ discard block |
||
373 | 391 | // If the person looking is allowed, they can check the members IP address and hostname. |
374 | 392 | if ($context['can_see_ip']) |
375 | 393 | { |
376 | - if (!empty($context['member']['ip'])) |
|
377 | - echo ' |
|
394 | + if (!empty($context['member']['ip'])) { |
|
395 | + echo ' |
|
378 | 396 | <dt>', $txt['ip'], ': </dt> |
379 | 397 | <dd><a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['member']['ip'], ';u=', $context['member']['id'], '">', $context['member']['ip'], '</a></dd>'; |
398 | + } |
|
380 | 399 | |
381 | - if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip'])) |
|
382 | - echo ' |
|
400 | + if (empty($modSettings['disableHostnameLookup']) && !empty($context['member']['ip'])) { |
|
401 | + echo ' |
|
383 | 402 | <dt>', $txt['hostname'], ': </dt> |
384 | 403 | <dd>', $context['member']['hostname'], '</dd>'; |
404 | + } |
|
385 | 405 | } |
386 | 406 | |
387 | 407 | echo ' |
388 | 408 | <dt>', $txt['local_time'], ':</dt> |
389 | 409 | <dd>', $context['member']['local_time'], '</dd>'; |
390 | 410 | |
391 | - if (!empty($modSettings['userLanguage']) && !empty($context['member']['language'])) |
|
392 | - echo ' |
|
411 | + if (!empty($modSettings['userLanguage']) && !empty($context['member']['language'])) { |
|
412 | + echo ' |
|
393 | 413 | <dt>', $txt['language'], ':</dt> |
394 | 414 | <dd>', $context['member']['language'], '</dd>'; |
415 | + } |
|
395 | 416 | |
396 | - if ($context['member']['show_last_login']) |
|
397 | - echo ' |
|
417 | + if ($context['member']['show_last_login']) { |
|
418 | + echo ' |
|
398 | 419 | <dt>', $txt['lastLoggedIn'], ': </dt> |
399 | 420 | <dd>', $context['member']['last_login'], (!empty($context['member']['is_hidden']) ? ' (' . $txt['hidden'] . ')' : ''), '</dd>'; |
421 | + } |
|
400 | 422 | |
401 | 423 | echo ' |
402 | 424 | </dl>'; |
@@ -408,10 +430,11 @@ discard block |
||
408 | 430 | <div class="custom_fields_above_signature"> |
409 | 431 | <ul class="nolist">'; |
410 | 432 | |
411 | - foreach ($context['print_custom_fields']['above_signature'] as $field) |
|
412 | - if (!empty($field['output_html'])) |
|
433 | + foreach ($context['print_custom_fields']['above_signature'] as $field) { |
|
434 | + if (!empty($field['output_html'])) |
|
413 | 435 | echo ' |
414 | 436 | <li>', $field['output_html'], '</li>'; |
437 | + } |
|
415 | 438 | |
416 | 439 | echo ' |
417 | 440 | </ul> |
@@ -419,12 +442,13 @@ discard block |
||
419 | 442 | } |
420 | 443 | |
421 | 444 | // Show the users signature. |
422 | - if ($context['signature_enabled'] && !empty($context['member']['signature'])) |
|
423 | - echo ' |
|
445 | + if ($context['signature_enabled'] && !empty($context['member']['signature'])) { |
|
446 | + echo ' |
|
424 | 447 | <div class="signature"> |
425 | 448 | <h5>', $txt['signature'], ':</h5> |
426 | 449 | ', $context['member']['signature'], ' |
427 | 450 | </div>'; |
451 | + } |
|
428 | 452 | |
429 | 453 | // Are there any custom profile fields for below the signature? |
430 | 454 | if (!empty($context['print_custom_fields']['below_signature'])) |
@@ -433,10 +457,11 @@ discard block |
||
433 | 457 | <div class="custom_fields_below_signature"> |
434 | 458 | <ul class="nolist">'; |
435 | 459 | |
436 | - foreach ($context['print_custom_fields']['below_signature'] as $field) |
|
437 | - if (!empty($field['output_html'])) |
|
460 | + foreach ($context['print_custom_fields']['below_signature'] as $field) { |
|
461 | + if (!empty($field['output_html'])) |
|
438 | 462 | echo ' |
439 | 463 | <li>', $field['output_html'], '</li>'; |
464 | + } |
|
440 | 465 | |
441 | 466 | echo ' |
442 | 467 | </ul> |
@@ -481,62 +506,70 @@ discard block |
||
481 | 506 | </div> |
482 | 507 | <div class="list_posts">'; |
483 | 508 | |
484 | - if (!$post['approved']) |
|
485 | - echo ' |
|
509 | + if (!$post['approved']) { |
|
510 | + echo ' |
|
486 | 511 | <div class="approve_post"> |
487 | 512 | <em>', $txt['post_awaiting_approval'], '</em> |
488 | 513 | </div>'; |
514 | + } |
|
489 | 515 | |
490 | 516 | echo ' |
491 | 517 | ', $post['body'], ' |
492 | 518 | </div>'; |
493 | 519 | |
494 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
495 | - echo ' |
|
520 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
521 | + echo ' |
|
496 | 522 | <div class="floatright"> |
497 | 523 | <ul class="quickbuttons">'; |
524 | + } |
|
498 | 525 | |
499 | 526 | // If they *can* reply? |
500 | - if ($post['can_reply']) |
|
501 | - echo ' |
|
527 | + if ($post['can_reply']) { |
|
528 | + echo ' |
|
502 | 529 | <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>'; |
530 | + } |
|
503 | 531 | |
504 | 532 | // If they *can* quote? |
505 | - if ($post['can_quote']) |
|
506 | - echo ' |
|
533 | + if ($post['can_quote']) { |
|
534 | + echo ' |
|
507 | 535 | <li><a href="', $scripturl . '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>'; |
536 | + } |
|
508 | 537 | |
509 | 538 | // How about... even... remove it entirely?! |
510 | - if ($post['can_delete']) |
|
511 | - echo ' |
|
539 | + if ($post['can_delete']) { |
|
540 | + echo ' |
|
512 | 541 | <li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';profile;u=', $context['member']['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'] ,'" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>'; |
542 | + } |
|
513 | 543 | |
514 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
515 | - echo ' |
|
544 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
545 | + echo ' |
|
516 | 546 | </ul> |
517 | 547 | </div>'; |
548 | + } |
|
518 | 549 | |
519 | 550 | echo ' |
520 | 551 | </div>'; |
521 | 552 | } |
553 | + } else { |
|
554 | + template_show_list('attachments'); |
|
522 | 555 | } |
523 | - else |
|
524 | - template_show_list('attachments'); |
|
525 | 556 | |
526 | 557 | // No posts? Just end with a informative message. |
527 | - if ((isset($context['attachments']) && empty($context['attachments'])) || (!isset($context['attachments']) && empty($context['posts']))) |
|
528 | - echo ' |
|
558 | + if ((isset($context['attachments']) && empty($context['attachments'])) || (!isset($context['attachments']) && empty($context['posts']))) { |
|
559 | + echo ' |
|
529 | 560 | <div class="windowbg2"> |
530 | 561 | ', isset($context['attachments']) ? $txt['show_attachments_none'] : ($context['is_topics'] ? $txt['show_topics_none'] : $txt['show_posts_none']), ' |
531 | 562 | </div>'; |
563 | + } |
|
532 | 564 | |
533 | 565 | // Show more page numbers. |
534 | - if (!empty($context['page_index'])) |
|
535 | - echo ' |
|
566 | + if (!empty($context['page_index'])) { |
|
567 | + echo ' |
|
536 | 568 | <div class="pagesection"> |
537 | 569 | <div class="pagelinks">', $context['page_index'], '</div> |
538 | 570 | </div>'; |
539 | -} |
|
571 | + } |
|
572 | + } |
|
540 | 573 | |
541 | 574 | /** |
542 | 575 | * Template for showing alerts within the alerts popup |
@@ -546,11 +579,12 @@ discard block |
||
546 | 579 | global $context, $txt, $scripturl; |
547 | 580 | |
548 | 581 | // Do we have an update message? |
549 | - if (!empty($context['update_message'])) |
|
550 | - echo ' |
|
582 | + if (!empty($context['update_message'])) { |
|
583 | + echo ' |
|
551 | 584 | <div class="infobox"> |
552 | 585 | ', $context['update_message'], '. |
553 | 586 | </div>'; |
587 | + } |
|
554 | 588 | |
555 | 589 | echo ' |
556 | 590 | <div class="cat_bar"> |
@@ -559,13 +593,12 @@ discard block |
||
559 | 593 | </h3> |
560 | 594 | </div>'; |
561 | 595 | |
562 | - if (empty($context['alerts'])) |
|
563 | - echo ' |
|
596 | + if (empty($context['alerts'])) { |
|
597 | + echo ' |
|
564 | 598 | <div class="information"> |
565 | 599 | ', $txt['alerts_none'], ' |
566 | 600 | </div>'; |
567 | - |
|
568 | - else |
|
601 | + } else |
|
569 | 602 | { |
570 | 603 | // Start the form. |
571 | 604 | echo ' |
@@ -627,12 +660,12 @@ discard block |
||
627 | 660 | </div>' : ''; |
628 | 661 | |
629 | 662 | // No drafts? Just show an informative message. |
630 | - if (empty($context['drafts'])) |
|
631 | - echo ' |
|
663 | + if (empty($context['drafts'])) { |
|
664 | + echo ' |
|
632 | 665 | <div class="windowbg2 centertext"> |
633 | 666 | ', $txt['draft_none'], ' |
634 | 667 | </div>'; |
635 | - else |
|
668 | + } else |
|
636 | 669 | { |
637 | 670 | // For every draft to be displayed, give it its own div, and show the important details of the draft. |
638 | 671 | foreach ($context['drafts'] as $draft) |
@@ -643,11 +676,13 @@ discard block |
||
643 | 676 | <div class="topic_details"> |
644 | 677 | <h5><strong><a href="', $scripturl, '?board=', $draft['board']['id'], '.0">', $draft['board']['name'], '</a> / ', $draft['topic']['link'], '</strong> '; |
645 | 678 | |
646 | - if (!empty($draft['sticky'])) |
|
647 | - echo '<span class="generic_icons sticky" title="', $txt['sticky_topic'], '"></span>'; |
|
679 | + if (!empty($draft['sticky'])) { |
|
680 | + echo '<span class="generic_icons sticky" title="', $txt['sticky_topic'], '"></span>'; |
|
681 | + } |
|
648 | 682 | |
649 | - if (!empty($draft['locked'])) |
|
650 | - echo '<span class="generic_icons lock" title="', $txt['locked_topic'], '"></span>'; |
|
683 | + if (!empty($draft['locked'])) { |
|
684 | + echo '<span class="generic_icons lock" title="', $txt['locked_topic'], '"></span>'; |
|
685 | + } |
|
651 | 686 | |
652 | 687 | echo ' |
653 | 688 | </h5> |
@@ -680,12 +715,13 @@ discard block |
||
680 | 715 | { |
681 | 716 | global $context, $scripturl, $txt; |
682 | 717 | |
683 | - if (!empty($context['saved_successful'])) |
|
684 | - echo ' |
|
718 | + if (!empty($context['saved_successful'])) { |
|
719 | + echo ' |
|
685 | 720 | <div class="infobox">', $context['user']['is_owner'] ? $txt['profile_updated_own'] : sprintf($txt['profile_updated_else'], $context['member']['name']), '</div>'; |
686 | - elseif (!empty($context['saved_failed'])) |
|
687 | - echo ' |
|
721 | + } elseif (!empty($context['saved_failed'])) { |
|
722 | + echo ' |
|
688 | 723 | <div class="errorbox">', $context['saved_failed'], '</div>'; |
724 | + } |
|
689 | 725 | |
690 | 726 | echo ' |
691 | 727 | <div id="edit_buddies"> |
@@ -699,24 +735,27 @@ discard block |
||
699 | 735 | <th scope="col" class="quarter_table">', $txt['name'], '</th> |
700 | 736 | <th scope="col">', $txt['status'], '</th>'; |
701 | 737 | |
702 | - if (allowedTo('moderate_forum')) |
|
703 | - echo ' |
|
738 | + if (allowedTo('moderate_forum')) { |
|
739 | + echo ' |
|
704 | 740 | <th scope="col">', $txt['email'], '</th>'; |
741 | + } |
|
705 | 742 | |
706 | - if (!empty($context['custom_pf'])) |
|
707 | - foreach ($context['custom_pf'] as $column) |
|
743 | + if (!empty($context['custom_pf'])) { |
|
744 | + foreach ($context['custom_pf'] as $column) |
|
708 | 745 | echo '<th scope="col">', $column['label'], '</th>'; |
746 | + } |
|
709 | 747 | |
710 | 748 | echo ' |
711 | 749 | <th scope="col">', $txt['remove'], '</th> |
712 | 750 | </tr>'; |
713 | 751 | |
714 | 752 | // If they don't have any buddies don't list them! |
715 | - if (empty($context['buddies'])) |
|
716 | - echo ' |
|
753 | + if (empty($context['buddies'])) { |
|
754 | + echo ' |
|
717 | 755 | <tr class="windowbg"> |
718 | 756 | <td colspan="', allowedTo('moderate_forum') ? '10' : '9','"><strong>', $txt['no_buddies'], '</strong></td> |
719 | 757 | </tr>'; |
758 | + } |
|
720 | 759 | |
721 | 760 | // Now loop through each buddy showing info on each. |
722 | 761 | else |
@@ -728,15 +767,17 @@ discard block |
||
728 | 767 | <td>', $buddy['link'], '</td> |
729 | 768 | <td><a href="', $buddy['online']['href'], '"><span class="' . ($buddy['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $buddy['online']['text'] . '"></span></a></td>'; |
730 | 769 | |
731 | - if ($buddy['show_email']) |
|
732 | - echo ' |
|
770 | + if ($buddy['show_email']) { |
|
771 | + echo ' |
|
733 | 772 | <td><a href="mailto:' . $buddy['email'] . '" rel="nofollow"><span class="generic_icons mail icon" title="' . $txt['email'] . ' ' . $buddy['name'] . '"></span></a></td>'; |
773 | + } |
|
734 | 774 | |
735 | 775 | // Show the custom profile fields for this user. |
736 | - if (!empty($context['custom_pf'])) |
|
737 | - foreach ($context['custom_pf'] as $key => $column) |
|
776 | + if (!empty($context['custom_pf'])) { |
|
777 | + foreach ($context['custom_pf'] as $key => $column) |
|
738 | 778 | echo ' |
739 | 779 | <td class="lefttext">', $buddy['options'][$key], '</td>'; |
780 | + } |
|
740 | 781 | |
741 | 782 | echo ' |
742 | 783 | <td><a href="', $scripturl, '?action=profile;area=lists;sa=buddies;u=', $context['id_member'], ';remove=', $buddy['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons delete" title="', $txt['buddy_remove'], '"></span></a></td> |
@@ -766,9 +807,10 @@ discard block |
||
766 | 807 | </dl> |
767 | 808 | </div>'; |
768 | 809 | |
769 | - if (!empty($context['token_check'])) |
|
770 | - echo ' |
|
810 | + if (!empty($context['token_check'])) { |
|
811 | + echo ' |
|
771 | 812 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
813 | + } |
|
772 | 814 | |
773 | 815 | echo ' |
774 | 816 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -794,12 +836,13 @@ discard block |
||
794 | 836 | { |
795 | 837 | global $context, $scripturl, $txt; |
796 | 838 | |
797 | - if (!empty($context['saved_successful'])) |
|
798 | - echo ' |
|
839 | + if (!empty($context['saved_successful'])) { |
|
840 | + echo ' |
|
799 | 841 | <div class="infobox">', $context['user']['is_owner'] ? $txt['profile_updated_own'] : sprintf($txt['profile_updated_else'], $context['member']['name']), '</div>'; |
800 | - elseif (!empty($context['saved_failed'])) |
|
801 | - echo ' |
|
842 | + } elseif (!empty($context['saved_failed'])) { |
|
843 | + echo ' |
|
802 | 844 | <div class="errorbox">', $context['saved_failed'], '</div>'; |
845 | + } |
|
803 | 846 | |
804 | 847 | echo ' |
805 | 848 | <div id="edit_buddies"> |
@@ -813,20 +856,22 @@ discard block |
||
813 | 856 | <th scope="col" class="quarter_table">', $txt['name'], '</th> |
814 | 857 | <th scope="col">', $txt['status'], '</th>'; |
815 | 858 | |
816 | - if (allowedTo('moderate_forum')) |
|
817 | - echo ' |
|
859 | + if (allowedTo('moderate_forum')) { |
|
860 | + echo ' |
|
818 | 861 | <th scope="col">', $txt['email'], '</th>'; |
862 | + } |
|
819 | 863 | |
820 | 864 | echo ' |
821 | 865 | <th scope="col">', $txt['ignore_remove'] ,'</th> |
822 | 866 | </tr>'; |
823 | 867 | |
824 | 868 | // If they don't have anyone on their ignore list, don't list it! |
825 | - if (empty($context['ignore_list'])) |
|
826 | - echo ' |
|
869 | + if (empty($context['ignore_list'])) { |
|
870 | + echo ' |
|
827 | 871 | <tr class="windowbg"> |
828 | 872 | <td colspan="', allowedTo('moderate_forum') ? '4' : '3','"><strong>', $txt['no_ignore'], '</strong></td> |
829 | 873 | </tr>'; |
874 | + } |
|
830 | 875 | |
831 | 876 | // Now loop through each buddy showing info on each. |
832 | 877 | foreach ($context['ignore_list'] as $member) |
@@ -836,9 +881,10 @@ discard block |
||
836 | 881 | <td>', $member['link'], '</td> |
837 | 882 | <td><a href="', $member['online']['href'], '"><span class="' . ($member['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $member['online']['text'] . '"></span></a></td>'; |
838 | 883 | |
839 | - if ($member['show_email']) |
|
840 | - echo ' |
|
884 | + if ($member['show_email']) { |
|
885 | + echo ' |
|
841 | 886 | <td><a href="mailto:' . $member['email'] . '" rel="nofollow"><span class="generic_icons mail icon" title="' . $txt['email'] . ' ' . $member['name'] . '"></span></a></td>'; |
887 | + } |
|
842 | 888 | echo ' |
843 | 889 | <td><a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=ignore;remove=', $member['id'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons delete" title="', $txt['ignore_remove'], '"></span></a></td> |
844 | 890 | </tr>'; |
@@ -865,9 +911,10 @@ discard block |
||
865 | 911 | </dl> |
866 | 912 | </div>'; |
867 | 913 | |
868 | - if (!empty($context['token_check'])) |
|
869 | - echo ' |
|
914 | + if (!empty($context['token_check'])) { |
|
915 | + echo ' |
|
870 | 916 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
917 | + } |
|
871 | 918 | |
872 | 919 | echo ' |
873 | 920 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -912,9 +959,10 @@ discard block |
||
912 | 959 | <a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['last_ip'], ';u=', $context['member']['id'], '">', $context['last_ip'], '</a>'; |
913 | 960 | |
914 | 961 | // Second address detected? |
915 | - if (!empty($context['last_ip2'])) |
|
916 | - echo ' |
|
962 | + if (!empty($context['last_ip2'])) { |
|
963 | + echo ' |
|
917 | 964 | , <a href="', $scripturl, '?action=profile;area=tracking;sa=ip;searchip=', $context['last_ip2'], ';u=', $context['member']['id'], '">', $context['last_ip2'], '</a>'; |
965 | + } |
|
918 | 966 | |
919 | 967 | echo ' |
920 | 968 | </dd>'; |
@@ -979,9 +1027,10 @@ discard block |
||
979 | 1027 | <h3 class="catbg">', $txt['whois_title'], ' ', $context['ip'], '</h3> |
980 | 1028 | </div> |
981 | 1029 | <div class="windowbg2 noup">'; |
982 | - foreach ($context['whois_servers'] as $server) |
|
983 | - echo ' |
|
1030 | + foreach ($context['whois_servers'] as $server) { |
|
1031 | + echo ' |
|
984 | 1032 | <a href="', $server['url'], '" target="_blank" class="new_win"', isset($context['auto_whois_server']) && $context['auto_whois_server']['name'] == $server['name'] ? ' style="font-weight: bold;"' : '', '>', $server['name'], '</a><br>'; |
1033 | + } |
|
985 | 1034 | echo ' |
986 | 1035 | </div> |
987 | 1036 | <br>'; |
@@ -992,10 +1041,10 @@ discard block |
||
992 | 1041 | <div class="cat_bar"> |
993 | 1042 | <h3 class="catbg">', $txt['members_from_ip'], ' ', $context['ip'], '</h3> |
994 | 1043 | </div>'; |
995 | - if (empty($context['ips'])) |
|
996 | - echo ' |
|
1044 | + if (empty($context['ips'])) { |
|
1045 | + echo ' |
|
997 | 1046 | <p class="windowbg2 description"><em>', $txt['no_members_from_ip'], '</em></p>'; |
998 | - else |
|
1047 | + } else |
|
999 | 1048 | { |
1000 | 1049 | echo ' |
1001 | 1050 | <table class="table_grid"> |
@@ -1008,12 +1057,13 @@ discard block |
||
1008 | 1057 | <tbody>'; |
1009 | 1058 | |
1010 | 1059 | // Loop through each of the members and display them. |
1011 | - foreach ($context['ips'] as $ip => $memberlist) |
|
1012 | - echo ' |
|
1060 | + foreach ($context['ips'] as $ip => $memberlist) { |
|
1061 | + echo ' |
|
1013 | 1062 | <tr class="windowbg"> |
1014 | 1063 | <td><a href="', $context['base_url'], ';searchip=', $ip, '">', $ip, '</a></td> |
1015 | 1064 | <td>', implode(', ', $memberlist), '</td> |
1016 | 1065 | </tr>'; |
1066 | + } |
|
1017 | 1067 | |
1018 | 1068 | echo ' |
1019 | 1069 | </tbody> |
@@ -1059,8 +1109,7 @@ discard block |
||
1059 | 1109 | { |
1060 | 1110 | echo ' |
1061 | 1111 | <div class="information">', $txt['showPermissions_all'], '</div>'; |
1062 | - } |
|
1063 | - else |
|
1112 | + } else |
|
1064 | 1113 | { |
1065 | 1114 | echo ' |
1066 | 1115 | <div class="information">',$txt['showPermissions_help'],'</div> |
@@ -1074,9 +1123,10 @@ discard block |
||
1074 | 1123 | </div> |
1075 | 1124 | <div class="windowbg smalltext"> |
1076 | 1125 | ', $txt['showPermissions_restricted_boards_desc'], ':<br>'; |
1077 | - foreach ($context['no_access_boards'] as $no_access_board) |
|
1078 | - echo ' |
|
1126 | + foreach ($context['no_access_boards'] as $no_access_board) { |
|
1127 | + echo ' |
|
1079 | 1128 | <a href="', $scripturl, '?board=', $no_access_board['id'], '.0">', $no_access_board['name'], '</a>', $no_access_board['is_last'] ? '' : ', '; |
1129 | + } |
|
1080 | 1130 | echo ' |
1081 | 1131 | </div>'; |
1082 | 1132 | } |
@@ -1108,12 +1158,13 @@ discard block |
||
1108 | 1158 | </td> |
1109 | 1159 | <td class="smalltext">'; |
1110 | 1160 | |
1111 | - if ($permission['is_denied']) |
|
1112 | - echo ' |
|
1161 | + if ($permission['is_denied']) { |
|
1162 | + echo ' |
|
1113 | 1163 | <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']),'</span>'; |
1114 | - else |
|
1115 | - echo ' |
|
1164 | + } else { |
|
1165 | + echo ' |
|
1116 | 1166 | ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); |
1167 | + } |
|
1117 | 1168 | |
1118 | 1169 | echo ' |
1119 | 1170 | </td> |
@@ -1123,10 +1174,10 @@ discard block |
||
1123 | 1174 | </tbody> |
1124 | 1175 | </table> |
1125 | 1176 | </div><br>'; |
1126 | - } |
|
1127 | - else |
|
1128 | - echo ' |
|
1177 | + } else { |
|
1178 | + echo ' |
|
1129 | 1179 | <p class="windowbg2">', $txt['showPermissions_none_general'], '</p>'; |
1180 | + } |
|
1130 | 1181 | |
1131 | 1182 | // Board permission section. |
1132 | 1183 | echo ' |
@@ -1136,14 +1187,16 @@ discard block |
||
1136 | 1187 | <a id="board_permissions"></a>', $txt['showPermissions_select'], ': |
1137 | 1188 | <select name="board" onchange="if (this.options[this.selectedIndex].value) this.form.submit();"> |
1138 | 1189 | <option value="0"', $context['board'] == 0 ? ' selected' : '', '>', $txt['showPermissions_global'], ' </option>'; |
1139 | - if (!empty($context['boards'])) |
|
1140 | - echo ' |
|
1190 | + if (!empty($context['boards'])) { |
|
1191 | + echo ' |
|
1141 | 1192 | <option value="" disabled>---------------------------</option>'; |
1193 | + } |
|
1142 | 1194 | |
1143 | 1195 | // Fill the box with any local permission boards. |
1144 | - foreach ($context['boards'] as $board) |
|
1145 | - echo ' |
|
1196 | + foreach ($context['boards'] as $board) { |
|
1197 | + echo ' |
|
1146 | 1198 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['name'], ' (', $board['profile_name'], ')</option>'; |
1199 | + } |
|
1147 | 1200 | |
1148 | 1201 | echo ' |
1149 | 1202 | </select> |
@@ -1174,8 +1227,7 @@ discard block |
||
1174 | 1227 | { |
1175 | 1228 | echo ' |
1176 | 1229 | <span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>'; |
1177 | - } |
|
1178 | - else |
|
1230 | + } else |
|
1179 | 1231 | { |
1180 | 1232 | echo ' |
1181 | 1233 | ', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']); |
@@ -1187,10 +1239,10 @@ discard block |
||
1187 | 1239 | echo ' |
1188 | 1240 | </tbody> |
1189 | 1241 | </table>'; |
1190 | - } |
|
1191 | - else |
|
1192 | - echo ' |
|
1242 | + } else { |
|
1243 | + echo ' |
|
1193 | 1244 | <p class="windowbg2">', $txt['showPermissions_none_board'], '</p>'; |
1245 | + } |
|
1194 | 1246 | echo ' |
1195 | 1247 | </div> |
1196 | 1248 | </div>'; |
@@ -1232,9 +1284,10 @@ discard block |
||
1232 | 1284 | </div>'; |
1233 | 1285 | |
1234 | 1286 | // If they haven't post at all, don't draw the graph. |
1235 | - if (empty($context['posts_by_time'])) |
|
1236 | - echo ' |
|
1287 | + if (empty($context['posts_by_time'])) { |
|
1288 | + echo ' |
|
1237 | 1289 | <p class="centertext padding">', $txt['statPanel_noPosts'], '</p>'; |
1290 | + } |
|
1238 | 1291 | // Otherwise do! |
1239 | 1292 | else |
1240 | 1293 | { |
@@ -1273,11 +1326,10 @@ discard block |
||
1273 | 1326 | </h3> |
1274 | 1327 | </div>'; |
1275 | 1328 | |
1276 | - if (empty($context['popular_boards'])) |
|
1277 | - echo ' |
|
1329 | + if (empty($context['popular_boards'])) { |
|
1330 | + echo ' |
|
1278 | 1331 | <p class="centertext padding">', $txt['statPanel_noPosts'], '</p>'; |
1279 | - |
|
1280 | - else |
|
1332 | + } else |
|
1281 | 1333 | { |
1282 | 1334 | echo ' |
1283 | 1335 | <dl class="stats">'; |
@@ -1308,10 +1360,10 @@ discard block |
||
1308 | 1360 | </h3> |
1309 | 1361 | </div>'; |
1310 | 1362 | |
1311 | - if (empty($context['board_activity'])) |
|
1312 | - echo ' |
|
1363 | + if (empty($context['board_activity'])) { |
|
1364 | + echo ' |
|
1313 | 1365 | <p class="centertext padding">', $txt['statPanel_noPosts'], '</p>'; |
1314 | - else |
|
1366 | + } else |
|
1315 | 1367 | { |
1316 | 1368 | echo ' |
1317 | 1369 | <dl class="stats">'; |
@@ -1359,41 +1411,46 @@ discard block |
||
1359 | 1411 | <h3 class="catbg profile_hd">'; |
1360 | 1412 | |
1361 | 1413 | // Don't say "Profile" if this isn't the profile... |
1362 | - if (!empty($context['profile_header_text'])) |
|
1363 | - echo ' |
|
1414 | + if (!empty($context['profile_header_text'])) { |
|
1415 | + echo ' |
|
1364 | 1416 | ', $context['profile_header_text']; |
1365 | - else |
|
1366 | - echo ' |
|
1417 | + } else { |
|
1418 | + echo ' |
|
1367 | 1419 | ', $txt['profile']; |
1420 | + } |
|
1368 | 1421 | |
1369 | 1422 | echo ' |
1370 | 1423 | </h3> |
1371 | 1424 | </div>'; |
1372 | 1425 | |
1373 | 1426 | // Have we some description? |
1374 | - if ($context['page_desc']) |
|
1375 | - echo ' |
|
1427 | + if ($context['page_desc']) { |
|
1428 | + echo ' |
|
1376 | 1429 | <p class="information">', $context['page_desc'], '</p>'; |
1430 | + } |
|
1377 | 1431 | |
1378 | 1432 | echo ' |
1379 | 1433 | <div class="roundframe">'; |
1380 | 1434 | |
1381 | 1435 | // Any bits at the start? |
1382 | - if (!empty($context['profile_prehtml'])) |
|
1383 | - echo ' |
|
1436 | + if (!empty($context['profile_prehtml'])) { |
|
1437 | + echo ' |
|
1384 | 1438 | <div>', $context['profile_prehtml'], '</div>'; |
1439 | + } |
|
1385 | 1440 | |
1386 | - if (!empty($context['profile_fields'])) |
|
1387 | - echo ' |
|
1441 | + if (!empty($context['profile_fields'])) { |
|
1442 | + echo ' |
|
1388 | 1443 | <dl>'; |
1444 | + } |
|
1389 | 1445 | |
1390 | 1446 | // Start the big old loop 'of love. |
1391 | 1447 | $lastItem = 'hr'; |
1392 | 1448 | foreach ($context['profile_fields'] as $key => $field) |
1393 | 1449 | { |
1394 | 1450 | // We add a little hack to be sure we never get more than one hr in a row! |
1395 | - if ($lastItem == 'hr' && $field['type'] == 'hr') |
|
1396 | - continue; |
|
1451 | + if ($lastItem == 'hr' && $field['type'] == 'hr') { |
|
1452 | + continue; |
|
1453 | + } |
|
1397 | 1454 | |
1398 | 1455 | $lastItem = $field['type']; |
1399 | 1456 | if ($field['type'] == 'hr') |
@@ -1402,48 +1459,50 @@ discard block |
||
1402 | 1459 | </dl> |
1403 | 1460 | <hr> |
1404 | 1461 | <dl>'; |
1405 | - } |
|
1406 | - elseif ($field['type'] == 'callback') |
|
1462 | + } elseif ($field['type'] == 'callback') |
|
1407 | 1463 | { |
1408 | 1464 | if (isset($field['callback_func']) && function_exists('template_profile_' . $field['callback_func'])) |
1409 | 1465 | { |
1410 | 1466 | $callback_func = 'template_profile_' . $field['callback_func']; |
1411 | 1467 | $callback_func(); |
1412 | 1468 | } |
1413 | - } |
|
1414 | - else |
|
1469 | + } else |
|
1415 | 1470 | { |
1416 | 1471 | echo ' |
1417 | 1472 | <dt> |
1418 | 1473 | <strong', !empty($field['is_error']) ? ' class="error"' : '', '>', $field['type'] !== 'label' ? '<label for="' . $key . '">' : '', $field['label'], $field['type'] !== 'label' ? '</label>' : '', '</strong>'; |
1419 | 1474 | |
1420 | 1475 | // Does it have any subtext to show? |
1421 | - if (!empty($field['subtext'])) |
|
1422 | - echo ' |
|
1476 | + if (!empty($field['subtext'])) { |
|
1477 | + echo ' |
|
1423 | 1478 | <br> |
1424 | 1479 | <span class="smalltext">', $field['subtext'], '</span>'; |
1480 | + } |
|
1425 | 1481 | |
1426 | 1482 | echo ' |
1427 | 1483 | </dt> |
1428 | 1484 | <dd>'; |
1429 | 1485 | |
1430 | 1486 | // Want to put something infront of the box? |
1431 | - if (!empty($field['preinput'])) |
|
1432 | - echo ' |
|
1487 | + if (!empty($field['preinput'])) { |
|
1488 | + echo ' |
|
1433 | 1489 | ', $field['preinput']; |
1490 | + } |
|
1434 | 1491 | |
1435 | 1492 | // What type of data are we showing? |
1436 | - if ($field['type'] == 'label') |
|
1437 | - echo ' |
|
1493 | + if ($field['type'] == 'label') { |
|
1494 | + echo ' |
|
1438 | 1495 | ', $field['value']; |
1496 | + } |
|
1439 | 1497 | |
1440 | 1498 | // Maybe it's a text box - very likely! |
1441 | 1499 | elseif (in_array($field['type'], array('int', 'float', 'text', 'password', 'color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'number', 'time', 'url'))) |
1442 | 1500 | { |
1443 | - if ($field['type'] == 'int' || $field['type'] == 'float') |
|
1444 | - $type = 'number'; |
|
1445 | - else |
|
1446 | - $type = $field['type']; |
|
1501 | + if ($field['type'] == 'int' || $field['type'] == 'float') { |
|
1502 | + $type = 'number'; |
|
1503 | + } else { |
|
1504 | + $type = $field['type']; |
|
1505 | + } |
|
1447 | 1506 | $step = $field['type'] == 'float' ? ' step="0.1"' : ''; |
1448 | 1507 | |
1449 | 1508 | |
@@ -1451,9 +1510,10 @@ discard block |
||
1451 | 1510 | <input type="', $type, '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '"', $step, '>'; |
1452 | 1511 | } |
1453 | 1512 | // You "checking" me out? ;) |
1454 | - elseif ($field['type'] == 'check') |
|
1455 | - echo ' |
|
1513 | + elseif ($field['type'] == 'check') { |
|
1514 | + echo ' |
|
1456 | 1515 | <input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" class="input_check" ', $field['input_attr'], '>'; |
1516 | + } |
|
1457 | 1517 | |
1458 | 1518 | // Always fun - select boxes! |
1459 | 1519 | elseif ($field['type'] == 'select') |
@@ -1464,13 +1524,15 @@ discard block |
||
1464 | 1524 | if (isset($field['options'])) |
1465 | 1525 | { |
1466 | 1526 | // Is this some code to generate the options? |
1467 | - if (!is_array($field['options'])) |
|
1468 | - $field['options'] = $field['options'](); |
|
1527 | + if (!is_array($field['options'])) { |
|
1528 | + $field['options'] = $field['options'](); |
|
1529 | + } |
|
1469 | 1530 | // Assuming we now have some! |
1470 | - if (is_array($field['options'])) |
|
1471 | - foreach ($field['options'] as $value => $name) |
|
1531 | + if (is_array($field['options'])) { |
|
1532 | + foreach ($field['options'] as $value => $name) |
|
1472 | 1533 | echo ' |
1473 | 1534 | <option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>'; |
1535 | + } |
|
1474 | 1536 | } |
1475 | 1537 | |
1476 | 1538 | echo ' |
@@ -1478,25 +1540,28 @@ discard block |
||
1478 | 1540 | } |
1479 | 1541 | |
1480 | 1542 | // Something to end with? |
1481 | - if (!empty($field['postinput'])) |
|
1482 | - echo ' |
|
1543 | + if (!empty($field['postinput'])) { |
|
1544 | + echo ' |
|
1483 | 1545 | ', $field['postinput']; |
1546 | + } |
|
1484 | 1547 | |
1485 | 1548 | echo ' |
1486 | 1549 | </dd>'; |
1487 | 1550 | } |
1488 | 1551 | } |
1489 | 1552 | |
1490 | - if (!empty($context['profile_fields'])) |
|
1491 | - echo ' |
|
1553 | + if (!empty($context['profile_fields'])) { |
|
1554 | + echo ' |
|
1492 | 1555 | </dl>'; |
1556 | + } |
|
1493 | 1557 | |
1494 | 1558 | // Are there any custom profile fields - if so print them! |
1495 | 1559 | if (!empty($context['custom_fields'])) |
1496 | 1560 | { |
1497 | - if ($lastItem != 'hr') |
|
1498 | - echo ' |
|
1561 | + if ($lastItem != 'hr') { |
|
1562 | + echo ' |
|
1499 | 1563 | <hr>'; |
1564 | + } |
|
1500 | 1565 | |
1501 | 1566 | echo ' |
1502 | 1567 | <dl>'; |
@@ -1519,13 +1584,14 @@ discard block |
||
1519 | 1584 | } |
1520 | 1585 | |
1521 | 1586 | // Any closing HTML? |
1522 | - if (!empty($context['profile_posthtml'])) |
|
1523 | - echo ' |
|
1587 | + if (!empty($context['profile_posthtml'])) { |
|
1588 | + echo ' |
|
1524 | 1589 | <div>', $context['profile_posthtml'], '</div>'; |
1590 | + } |
|
1525 | 1591 | |
1526 | 1592 | // Only show the password box if it's actually needed. |
1527 | - if ($context['require_password']) |
|
1528 | - echo ' |
|
1593 | + if ($context['require_password']) { |
|
1594 | + echo ' |
|
1529 | 1595 | <dl> |
1530 | 1596 | <dt> |
1531 | 1597 | <strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '><label for="oldpasswrd">', $txt['current_password'], ': </label></strong><br> |
@@ -1535,18 +1601,21 @@ discard block |
||
1535 | 1601 | <input type="password" name="oldpasswrd" id="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password"> |
1536 | 1602 | </dd> |
1537 | 1603 | </dl>'; |
1604 | + } |
|
1538 | 1605 | |
1539 | 1606 | // The button shouldn't say "Change profile" unless we're changing the profile... |
1540 | - if (!empty($context['submit_button_text'])) |
|
1541 | - echo ' |
|
1607 | + if (!empty($context['submit_button_text'])) { |
|
1608 | + echo ' |
|
1542 | 1609 | <input type="submit" name="save" value="', $context['submit_button_text'], '" class="button_submit">'; |
1543 | - else |
|
1544 | - echo ' |
|
1610 | + } else { |
|
1611 | + echo ' |
|
1545 | 1612 | <input type="submit" name="save" value="', $txt['change_profile'], '" class="button_submit">'; |
1613 | + } |
|
1546 | 1614 | |
1547 | - if (!empty($context['token_check'])) |
|
1548 | - echo ' |
|
1615 | + if (!empty($context['token_check'])) { |
|
1616 | + echo ' |
|
1549 | 1617 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
1618 | + } |
|
1550 | 1619 | |
1551 | 1620 | echo ' |
1552 | 1621 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -1556,10 +1625,11 @@ discard block |
||
1556 | 1625 | </form>'; |
1557 | 1626 | |
1558 | 1627 | // Any final spellchecking stuff? |
1559 | - if (!empty($context['show_spellchecking'])) |
|
1560 | - echo ' |
|
1628 | + if (!empty($context['show_spellchecking'])) { |
|
1629 | + echo ' |
|
1561 | 1630 | <form name="spell_form" id="spell_form" method="post" accept-charset="', $context['character_set'], '" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spellstring" value=""></form>'; |
1562 | -} |
|
1631 | + } |
|
1632 | + } |
|
1563 | 1633 | |
1564 | 1634 | /** |
1565 | 1635 | * Personal Message settings. |
@@ -1596,10 +1666,11 @@ discard block |
||
1596 | 1666 | <select name="pm_receive_from" id="pm_receive_from"> |
1597 | 1667 | <option value="0"', empty($context['receive_from']) || (empty($modSettings['enable_buddylist']) && $context['receive_from'] < 3) ? ' selected' : '', '>', $txt['pm_receive_from_everyone'], '</option>'; |
1598 | 1668 | |
1599 | - if (!empty($modSettings['enable_buddylist'])) |
|
1600 | - echo ' |
|
1669 | + if (!empty($modSettings['enable_buddylist'])) { |
|
1670 | + echo ' |
|
1601 | 1671 | <option value="1"', !empty($context['receive_from']) && $context['receive_from'] == 1 ? ' selected' : '', '>', $txt['pm_receive_from_ignore'], '</option> |
1602 | 1672 | <option value="2"', !empty($context['receive_from']) && $context['receive_from'] == 2 ? ' selected' : '', '>', $txt['pm_receive_from_buddies'], '</option>'; |
1673 | + } |
|
1603 | 1674 | |
1604 | 1675 | echo ' |
1605 | 1676 | <option value="3"', !empty($context['receive_from']) && $context['receive_from'] > 2 ? ' selected' : '', '>', $txt['pm_receive_from_admins'], '</option> |
@@ -1655,8 +1726,8 @@ discard block |
||
1655 | 1726 | <input type="checkbox" name="default_options[show_no_signatures]" id="show_no_signatures" value="1"', !empty($context['member']['options']['show_no_signatures']) ? ' checked' : '', ' class="input_check"> |
1656 | 1727 | </dd>'; |
1657 | 1728 | |
1658 | - if (!empty($modSettings['allow_no_censored'])) |
|
1659 | - echo ' |
|
1729 | + if (!empty($modSettings['allow_no_censored'])) { |
|
1730 | + echo ' |
|
1660 | 1731 | <dt> |
1661 | 1732 | <label for="show_no_censored">' . $txt['show_no_censored'] . '</label> |
1662 | 1733 | </dt> |
@@ -1664,6 +1735,7 @@ discard block |
||
1664 | 1735 | <input type="hidden" name="default_options[show_no_censored]" value="0"> |
1665 | 1736 | <input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked' : '') . ' class="input_check"> |
1666 | 1737 | </dd>'; |
1738 | + } |
|
1667 | 1739 | |
1668 | 1740 | echo ' |
1669 | 1741 | <dt> |
@@ -1674,8 +1746,8 @@ discard block |
||
1674 | 1746 | <input type="checkbox" name="default_options[return_to_post]" id="return_to_post" value="1"', !empty($context['member']['options']['return_to_post']) ? ' checked' : '', ' class="input_check"> |
1675 | 1747 | </dd>'; |
1676 | 1748 | |
1677 | - if (!empty($modSettings['enable_buddylist'])) |
|
1678 | - echo ' |
|
1749 | + if (!empty($modSettings['enable_buddylist'])) { |
|
1750 | + echo ' |
|
1679 | 1751 | <dt> |
1680 | 1752 | <label for="posts_apply_ignore_list">', $txt['posts_apply_ignore_list'], '</label> |
1681 | 1753 | </dt> |
@@ -1683,6 +1755,7 @@ discard block |
||
1683 | 1755 | <input type="hidden" name="default_options[posts_apply_ignore_list]" value="0"> |
1684 | 1756 | <input type="checkbox" name="default_options[posts_apply_ignore_list]" id="posts_apply_ignore_list" value="1"', !empty($context['member']['options']['posts_apply_ignore_list']) ? ' checked' : '', ' class="input_check"> |
1685 | 1757 | </dd>'; |
1758 | + } |
|
1686 | 1759 | |
1687 | 1760 | echo ' |
1688 | 1761 | <dt> |
@@ -1694,8 +1767,8 @@ discard block |
||
1694 | 1767 | </dd>'; |
1695 | 1768 | |
1696 | 1769 | // Choose WYSIWYG settings? |
1697 | - if (empty($modSettings['disable_wysiwyg'])) |
|
1698 | - echo ' |
|
1770 | + if (empty($modSettings['disable_wysiwyg'])) { |
|
1771 | + echo ' |
|
1699 | 1772 | <dt> |
1700 | 1773 | <label for="wysiwyg_default">', $txt['wysiwyg_default'], '</label> |
1701 | 1774 | </dt> |
@@ -1703,6 +1776,7 @@ discard block |
||
1703 | 1776 | <input type="hidden" name="default_options[wysiwyg_default]" value="0"> |
1704 | 1777 | <input type="checkbox" name="default_options[wysiwyg_default]" id="wysiwyg_default" value="1"', !empty($context['member']['options']['wysiwyg_default']) ? ' checked' : '', ' class="input_check"> |
1705 | 1778 | </dd>'; |
1779 | + } |
|
1706 | 1780 | |
1707 | 1781 | if (empty($modSettings['disableCustomPerPage'])) |
1708 | 1782 | { |
@@ -1733,8 +1807,8 @@ discard block |
||
1733 | 1807 | </dd>'; |
1734 | 1808 | } |
1735 | 1809 | |
1736 | - if (!empty($modSettings['cal_enabled'])) |
|
1737 | - echo ' |
|
1810 | + if (!empty($modSettings['cal_enabled'])) { |
|
1811 | + echo ' |
|
1738 | 1812 | <dt> |
1739 | 1813 | <label for="calendar_start_day">', $txt['calendar_start_day'], ':</label> |
1740 | 1814 | </dt> |
@@ -1745,9 +1819,10 @@ discard block |
||
1745 | 1819 | <option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected' : '', '>', $txt['days'][6], '</option> |
1746 | 1820 | </select> |
1747 | 1821 | </dd>'; |
1822 | + } |
|
1748 | 1823 | |
1749 | - if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_autosave_enabled'])) |
|
1750 | - echo ' |
|
1824 | + if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_autosave_enabled'])) { |
|
1825 | + echo ' |
|
1751 | 1826 | <dt> |
1752 | 1827 | <label for="drafts_autosave_enabled">', $txt['drafts_autosave_enabled'], '</label> |
1753 | 1828 | </dt> |
@@ -1755,8 +1830,9 @@ discard block |
||
1755 | 1830 | <input type="hidden" name="default_options[drafts_autosave_enabled]" value="0"> |
1756 | 1831 | <input type="checkbox" name="default_options[drafts_autosave_enabled]" id="drafts_autosave_enabled" value="1"', !empty($context['member']['options']['drafts_autosave_enabled']) ? ' checked' : '', ' class="input_check"> |
1757 | 1832 | </dd>'; |
1758 | - if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_show_saved_enabled'])) |
|
1759 | - echo ' |
|
1833 | + } |
|
1834 | + if ((!empty($modSettings['drafts_post_enabled']) || !empty($modSettings['drafts_pm_enabled'])) && !empty($modSettings['drafts_show_saved_enabled'])) { |
|
1835 | + echo ' |
|
1760 | 1836 | <dt> |
1761 | 1837 | <label for="drafts_show_saved_enabled">', $txt['drafts_show_saved_enabled'], '</label> |
1762 | 1838 | </dt> |
@@ -1764,6 +1840,7 @@ discard block |
||
1764 | 1840 | <input type="hidden" name="default_options[drafts_show_saved_enabled]" value="0"> |
1765 | 1841 | <input type="checkbox" name="default_options[drafts_show_saved_enabled]" id="drafts_show_saved_enabled" value="1"', !empty($context['member']['options']['drafts_show_saved_enabled']) ? ' checked' : '', ' class="input_check"> |
1766 | 1842 | </dd>'; |
1843 | + } |
|
1767 | 1844 | |
1768 | 1845 | echo ' |
1769 | 1846 | <dt> |
@@ -1809,8 +1886,8 @@ discard block |
||
1809 | 1886 | <dl class="settings">'; |
1810 | 1887 | |
1811 | 1888 | // Allow notification on announcements to be disabled? |
1812 | - if (!empty($modSettings['allow_disableAnnounce'])) |
|
1813 | - echo ' |
|
1889 | + if (!empty($modSettings['allow_disableAnnounce'])) { |
|
1890 | + echo ' |
|
1814 | 1891 | <dt> |
1815 | 1892 | <label for="notify_announcements">', $txt['notify_important_email'], '</label> |
1816 | 1893 | </dt> |
@@ -1818,9 +1895,10 @@ discard block |
||
1818 | 1895 | <input type="hidden" name="notify_announcements" value="0"> |
1819 | 1896 | <input type="checkbox" id="notify_announcements" name="notify_announcements" value="1"', !empty($context['member']['notify_announcements']) ? ' checked' : '', ' class="input_check"> |
1820 | 1897 | </dd>'; |
1898 | + } |
|
1821 | 1899 | |
1822 | - if (!empty($modSettings['enable_ajax_alerts'])) |
|
1823 | - echo ' |
|
1900 | + if (!empty($modSettings['enable_ajax_alerts'])) { |
|
1901 | + echo ' |
|
1824 | 1902 | <dt> |
1825 | 1903 | <label for="notify_send_body">', $txt['notify_alert_timeout'], '</label> |
1826 | 1904 | </dt> |
@@ -1828,6 +1906,7 @@ discard block |
||
1828 | 1906 | <input type="number" size="4" id="notify_alert_timeout" name="opt_alert_timeout" min="0" value="', $context['member']['alert_timeout'], '" class="input_text"> |
1829 | 1907 | </dd> |
1830 | 1908 | '; |
1909 | + } |
|
1831 | 1910 | |
1832 | 1911 | echo ' |
1833 | 1912 | </dl> |
@@ -1858,9 +1937,10 @@ discard block |
||
1858 | 1937 | <div class="smalltext">'; |
1859 | 1938 | $label = $txt['alert_opt_' . $opts[1]]; |
1860 | 1939 | $label_pos = isset($opts['label']) ? $opts['label'] : ''; |
1861 | - if ($label_pos == 'before') |
|
1862 | - echo ' |
|
1940 | + if ($label_pos == 'before') { |
|
1941 | + echo ' |
|
1863 | 1942 | <label for="opt_', $opts[1], '">', $label, '</label>'; |
1943 | + } |
|
1864 | 1944 | |
1865 | 1945 | $this_value = isset($context['alert_prefs'][$opts[1]]) ? $context['alert_prefs'][$opts[1]] : 0; |
1866 | 1946 | switch ($opts[0]) |
@@ -1872,17 +1952,19 @@ discard block |
||
1872 | 1952 | case 'select': |
1873 | 1953 | echo ' |
1874 | 1954 | <select name="opt_', $opts[1], '" id="opt_', $opts[1], '">'; |
1875 | - foreach ($opts['opts'] as $k => $v) |
|
1876 | - echo ' |
|
1955 | + foreach ($opts['opts'] as $k => $v) { |
|
1956 | + echo ' |
|
1877 | 1957 | <option value="', $k, '"', $this_value == $k ? ' selected' : '', '>', $v, '</option>'; |
1958 | + } |
|
1878 | 1959 | echo ' |
1879 | 1960 | </select>'; |
1880 | 1961 | break; |
1881 | 1962 | } |
1882 | 1963 | |
1883 | - if ($label_pos == 'after') |
|
1884 | - echo ' |
|
1964 | + if ($label_pos == 'after') { |
|
1965 | + echo ' |
|
1885 | 1966 | <label for="opt_', $opts[1], '">', $label, '</label>'; |
1967 | + } |
|
1886 | 1968 | |
1887 | 1969 | echo ' |
1888 | 1970 | </div>'; |
@@ -1998,11 +2080,12 @@ discard block |
||
1998 | 2080 | <p class="information">', $txt['groupMembership_info'], '</p>'; |
1999 | 2081 | |
2000 | 2082 | // Do we have an update message? |
2001 | - if (!empty($context['update_message'])) |
|
2002 | - echo ' |
|
2083 | + if (!empty($context['update_message'])) { |
|
2084 | + echo ' |
|
2003 | 2085 | <div class="infobox"> |
2004 | 2086 | ', $context['update_message'], '. |
2005 | 2087 | </div>'; |
2088 | + } |
|
2006 | 2089 | |
2007 | 2090 | echo ' |
2008 | 2091 | <div id="groups">'; |
@@ -2024,8 +2107,7 @@ discard block |
||
2024 | 2107 | </div> |
2025 | 2108 | </div> |
2026 | 2109 | </div>'; |
2027 | - } |
|
2028 | - else |
|
2110 | + } else |
|
2029 | 2111 | { |
2030 | 2112 | echo ' |
2031 | 2113 | <div class="title_bar"> |
@@ -2037,27 +2119,30 @@ discard block |
||
2037 | 2119 | echo ' |
2038 | 2120 | <div class="windowbg" id="primdiv_', $group['id'], '">'; |
2039 | 2121 | |
2040 | - if ($context['can_edit_primary']) |
|
2041 | - echo ' |
|
2122 | + if ($context['can_edit_primary']) { |
|
2123 | + echo ' |
|
2042 | 2124 | <input type="radio" name="primary" id="primary_', $group['id'], '" value="', $group['id'], '"', $group['is_primary'] ? ' checked' : '', ' onclick="highlightSelected(\'primdiv_' . $group['id'] . '\');"', $group['can_be_primary'] ? '' : ' disabled', ' class="input_radio">'; |
2125 | + } |
|
2043 | 2126 | |
2044 | 2127 | echo ' |
2045 | 2128 | <label for="primary_', $group['id'], '"><strong>', (empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>'), '</strong>', (!empty($group['desc']) ? '<br><span class="smalltext">' . $group['desc'] . '</span>' : ''), '</label>'; |
2046 | 2129 | |
2047 | 2130 | // Can they leave their group? |
2048 | - if ($group['can_leave']) |
|
2049 | - echo ' |
|
2131 | + if ($group['can_leave']) { |
|
2132 | + echo ' |
|
2050 | 2133 | <a href="' . $scripturl . '?action=profile;save;u=' . $context['id_member'] . ';area=groupmembership;' . $context['session_var'] . '=' . $context['session_id'] . ';gid=' . $group['id'] . ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '">' . $txt['leave_group'] . '</a>'; |
2134 | + } |
|
2051 | 2135 | |
2052 | 2136 | echo ' |
2053 | 2137 | </div>'; |
2054 | 2138 | } |
2055 | 2139 | |
2056 | - if ($context['can_edit_primary']) |
|
2057 | - echo ' |
|
2140 | + if ($context['can_edit_primary']) { |
|
2141 | + echo ' |
|
2058 | 2142 | <div class="padding righttext"> |
2059 | 2143 | <input type="submit" value="', $txt['make_primary'], '" class="button_submit"> |
2060 | 2144 | </div>'; |
2145 | + } |
|
2061 | 2146 | |
2062 | 2147 | // Any groups they can join? |
2063 | 2148 | if (!empty($context['groups']['available'])) |
@@ -2073,15 +2158,16 @@ discard block |
||
2073 | 2158 | <div class="windowbg"> |
2074 | 2159 | <strong>', (empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>'), '</strong>', (!empty($group['desc']) ? '<br><span class="smalltext">' . $group['desc'] . '</span>' : ''), ''; |
2075 | 2160 | |
2076 | - if ($group['type'] == 3) |
|
2077 | - echo ' |
|
2161 | + if ($group['type'] == 3) { |
|
2162 | + echo ' |
|
2078 | 2163 | <a href="', $scripturl, '?action=profile;save;u=', $context['id_member'], ';area=groupmembership;', $context['session_var'], '=', $context['session_id'], ';gid=', $group['id'], ';', $context[$context['token_check'] . '_token_var'], '=', $context[$context['token_check'] . '_token'], '" class="button floatright">', $txt['join_group'], '</a>'; |
2079 | - elseif ($group['type'] == 2 && $group['pending']) |
|
2080 | - echo ' |
|
2164 | + } elseif ($group['type'] == 2 && $group['pending']) { |
|
2165 | + echo ' |
|
2081 | 2166 | <span class="floatright">', $txt['approval_pending'],'</span>'; |
2082 | - elseif ($group['type'] == 2) |
|
2083 | - echo ' |
|
2167 | + } elseif ($group['type'] == 2) { |
|
2168 | + echo ' |
|
2084 | 2169 | <a href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=groupmembership;request=', $group['id'], '" class="button floatright">', $txt['request_group'], '</a>'; |
2170 | + } |
|
2085 | 2171 | |
2086 | 2172 | echo ' |
2087 | 2173 | </div>'; |
@@ -2104,9 +2190,10 @@ discard block |
||
2104 | 2190 | |
2105 | 2191 | prevDiv.className = "windowbg"; |
2106 | 2192 | }'; |
2107 | - if (isset($context['groups']['member'][$context['primary_group']])) |
|
2108 | - echo ' |
|
2193 | + if (isset($context['groups']['member'][$context['primary_group']])) { |
|
2194 | + echo ' |
|
2109 | 2195 | highlightSelected("primdiv_' . $context['primary_group'] . '");'; |
2196 | + } |
|
2110 | 2197 | echo ' |
2111 | 2198 | </script>'; |
2112 | 2199 | } |
@@ -2114,9 +2201,10 @@ discard block |
||
2114 | 2201 | echo ' |
2115 | 2202 | </div>'; |
2116 | 2203 | |
2117 | - if (!empty($context['token_check'])) |
|
2118 | - echo ' |
|
2204 | + if (!empty($context['token_check'])) { |
|
2205 | + echo ' |
|
2119 | 2206 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
2207 | + } |
|
2120 | 2208 | |
2121 | 2209 | echo ' |
2122 | 2210 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -2163,14 +2251,15 @@ discard block |
||
2163 | 2251 | |
2164 | 2252 | foreach ($category['boards'] as $board) |
2165 | 2253 | { |
2166 | - if ($i == $limit) |
|
2167 | - echo ' |
|
2254 | + if ($i == $limit) { |
|
2255 | + echo ' |
|
2168 | 2256 | </ul> |
2169 | 2257 | </li> |
2170 | 2258 | </ul> |
2171 | 2259 | <ul class="ignoreboards floatright"> |
2172 | 2260 | <li class="category"> |
2173 | 2261 | <ul>'; |
2262 | + } |
|
2174 | 2263 | |
2175 | 2264 | echo ' |
2176 | 2265 | <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"> |
@@ -2216,10 +2305,11 @@ discard block |
||
2216 | 2305 | |
2217 | 2306 | // Work out the starting color. |
2218 | 2307 | $context['current_color'] = $context['colors'][0]; |
2219 | - foreach ($context['colors'] as $limit => $color) |
|
2220 | - if ($context['member']['warning'] >= $limit) |
|
2308 | + foreach ($context['colors'] as $limit => $color) { |
|
2309 | + if ($context['member']['warning'] >= $limit) |
|
2221 | 2310 | $context['current_color'] = $color; |
2222 | -} |
|
2311 | + } |
|
2312 | + } |
|
2223 | 2313 | |
2224 | 2314 | // Show all warnings of a user? |
2225 | 2315 | function template_viewWarning() |
@@ -2258,14 +2348,15 @@ discard block |
||
2258 | 2348 | </dd>'; |
2259 | 2349 | |
2260 | 2350 | // There's some impact of this? |
2261 | - if (!empty($context['level_effects'][$context['current_level']])) |
|
2262 | - echo ' |
|
2351 | + if (!empty($context['level_effects'][$context['current_level']])) { |
|
2352 | + echo ' |
|
2263 | 2353 | <dt> |
2264 | 2354 | <strong>', $txt['profile_viewwarning_impact'], ':</strong> |
2265 | 2355 | </dt> |
2266 | 2356 | <dd> |
2267 | 2357 | ', $context['level_effects'][$context['current_level']], ' |
2268 | 2358 | </dd>'; |
2359 | + } |
|
2269 | 2360 | |
2270 | 2361 | echo ' |
2271 | 2362 | </dl> |
@@ -2303,10 +2394,11 @@ discard block |
||
2303 | 2394 | |
2304 | 2395 | // Otherwise see what we can do...'; |
2305 | 2396 | |
2306 | - foreach ($context['notification_templates'] as $k => $type) |
|
2307 | - echo ' |
|
2397 | + foreach ($context['notification_templates'] as $k => $type) { |
|
2398 | + echo ' |
|
2308 | 2399 | if (index == ', $k, ') |
2309 | 2400 | document.getElementById(\'warn_body\').value = "', strtr($type['body'], array('"' => "'", "\n" => '\\n', "\r" => '')), '";'; |
2401 | + } |
|
2310 | 2402 | |
2311 | 2403 | echo ' |
2312 | 2404 | } |
@@ -2316,10 +2408,11 @@ discard block |
||
2316 | 2408 | // Also set the right effect. |
2317 | 2409 | effectText = "";'; |
2318 | 2410 | |
2319 | - foreach ($context['level_effects'] as $limit => $text) |
|
2320 | - echo ' |
|
2411 | + foreach ($context['level_effects'] as $limit => $text) { |
|
2412 | + echo ' |
|
2321 | 2413 | if (slideAmount >= ', $limit, ') |
2322 | 2414 | effectText = "', $text, '";'; |
2415 | + } |
|
2323 | 2416 | |
2324 | 2417 | echo ' |
2325 | 2418 | setInnerHTML(document.getElementById(\'cur_level_div\'), slideAmount + \'% (\' + effectText + \')\'); |
@@ -2334,31 +2427,34 @@ discard block |
||
2334 | 2427 | </h3> |
2335 | 2428 | </div>'; |
2336 | 2429 | |
2337 | - if (!$context['user']['is_owner']) |
|
2338 | - echo ' |
|
2430 | + if (!$context['user']['is_owner']) { |
|
2431 | + echo ' |
|
2339 | 2432 | <p class="information">', $txt['profile_warning_desc'], '</p>'; |
2433 | + } |
|
2340 | 2434 | |
2341 | 2435 | echo ' |
2342 | 2436 | <div class="windowbg"> |
2343 | 2437 | <dl class="settings">'; |
2344 | 2438 | |
2345 | - if (!$context['user']['is_owner']) |
|
2346 | - echo ' |
|
2439 | + if (!$context['user']['is_owner']) { |
|
2440 | + echo ' |
|
2347 | 2441 | <dt> |
2348 | 2442 | <strong>', $txt['profile_warning_name'], ':</strong> |
2349 | 2443 | </dt> |
2350 | 2444 | <dd> |
2351 | 2445 | <strong>', $context['member']['name'], '</strong> |
2352 | 2446 | </dd>'; |
2447 | + } |
|
2353 | 2448 | |
2354 | 2449 | echo ' |
2355 | 2450 | <dt> |
2356 | 2451 | <strong>', $txt['profile_warning_level'], ':</strong>'; |
2357 | 2452 | |
2358 | 2453 | // Is there only so much they can apply? |
2359 | - if ($context['warning_limit']) |
|
2360 | - echo ' |
|
2454 | + if ($context['warning_limit']) { |
|
2455 | + echo ' |
|
2361 | 2456 | <br><span class="smalltext">', sprintf($txt['profile_warning_limit_attribute'], $context['warning_limit']), '</span>'; |
2457 | + } |
|
2362 | 2458 | |
2363 | 2459 | echo ' |
2364 | 2460 | </dt> |
@@ -2411,9 +2507,10 @@ discard block |
||
2411 | 2507 | <option value="-1">', $txt['profile_warning_notify_template'], '</option> |
2412 | 2508 | <option value="-1" disabled>------------------------------</option>'; |
2413 | 2509 | |
2414 | - foreach ($context['notification_templates'] as $id_template => $template) |
|
2415 | - echo ' |
|
2510 | + foreach ($context['notification_templates'] as $id_template => $template) { |
|
2511 | + echo ' |
|
2416 | 2512 | <option value="', $id_template, '">', $template['title'], '</option>'; |
2513 | + } |
|
2417 | 2514 | |
2418 | 2515 | echo ' |
2419 | 2516 | </select> |
@@ -2425,9 +2522,10 @@ discard block |
||
2425 | 2522 | </dl> |
2426 | 2523 | <div class="righttext">'; |
2427 | 2524 | |
2428 | - if (!empty($context['token_check'])) |
|
2429 | - echo ' |
|
2525 | + if (!empty($context['token_check'])) { |
|
2526 | + echo ' |
|
2430 | 2527 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
2528 | + } |
|
2431 | 2529 | |
2432 | 2530 | echo ' |
2433 | 2531 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -2443,8 +2541,8 @@ discard block |
||
2443 | 2541 | echo ' |
2444 | 2542 | <script>'; |
2445 | 2543 | |
2446 | - if (!$context['user']['is_owner']) |
|
2447 | - echo ' |
|
2544 | + if (!$context['user']['is_owner']) { |
|
2545 | + echo ' |
|
2448 | 2546 | modifyWarnNotify(); |
2449 | 2547 | $(document).ready(function() { |
2450 | 2548 | $("#preview_button").click(function() { |
@@ -2483,6 +2581,7 @@ discard block |
||
2483 | 2581 | }); |
2484 | 2582 | return false; |
2485 | 2583 | }'; |
2584 | + } |
|
2486 | 2585 | |
2487 | 2586 | echo ' |
2488 | 2587 | </script>'; |
@@ -2505,16 +2604,18 @@ discard block |
||
2505 | 2604 | </div>'; |
2506 | 2605 | |
2507 | 2606 | // If deleting another account give them a lovely info box. |
2508 | - if (!$context['user']['is_owner']) |
|
2509 | - echo ' |
|
2607 | + if (!$context['user']['is_owner']) { |
|
2608 | + echo ' |
|
2510 | 2609 | <p class="information">', $txt['deleteAccount_desc'], '</p>'; |
2610 | + } |
|
2511 | 2611 | echo ' |
2512 | 2612 | <div class="windowbg2">'; |
2513 | 2613 | |
2514 | 2614 | // If they are deleting their account AND the admin needs to approve it - give them another piece of info ;) |
2515 | - if ($context['needs_approval']) |
|
2516 | - echo ' |
|
2615 | + if ($context['needs_approval']) { |
|
2616 | + echo ' |
|
2517 | 2617 | <div class="errorbox">', $txt['deleteAccount_approval'], '</div>'; |
2618 | + } |
|
2518 | 2619 | |
2519 | 2620 | // If the user is deleting their own account warn them first - and require a password! |
2520 | 2621 | if ($context['user']['is_owner']) |
@@ -2526,9 +2627,10 @@ discard block |
||
2526 | 2627 | <input type="password" name="oldpasswrd" size="20" class="input_password"> |
2527 | 2628 | <input type="submit" value="', $txt['yes'], '" class="button_submit">'; |
2528 | 2629 | |
2529 | - if (!empty($context['token_check'])) |
|
2530 | - echo ' |
|
2630 | + if (!empty($context['token_check'])) { |
|
2631 | + echo ' |
|
2531 | 2632 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
2633 | + } |
|
2532 | 2634 | |
2533 | 2635 | echo ' |
2534 | 2636 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -2554,9 +2656,10 @@ discard block |
||
2554 | 2656 | <option value="topics">', $txt['deleteAccount_topics'], '</option> |
2555 | 2657 | </select>'; |
2556 | 2658 | |
2557 | - if ($context['show_perma_delete']) |
|
2558 | - echo ' |
|
2659 | + if ($context['show_perma_delete']) { |
|
2660 | + echo ' |
|
2559 | 2661 | <br><label for="perma_delete"><input type="checkbox" name="perma_delete" id="perma_delete" value="1" class="input_check">', $txt['deleteAccount_permanent'], ':</label>'; |
2662 | + } |
|
2560 | 2663 | |
2561 | 2664 | echo ' |
2562 | 2665 | </div>'; |
@@ -2569,9 +2672,10 @@ discard block |
||
2569 | 2672 | <div> |
2570 | 2673 | <input type="submit" value="', $txt['delete'], '" class="button_submit">'; |
2571 | 2674 | |
2572 | - if (!empty($context['token_check'])) |
|
2573 | - echo ' |
|
2675 | + if (!empty($context['token_check'])) { |
|
2676 | + echo ' |
|
2574 | 2677 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
2678 | + } |
|
2575 | 2679 | |
2576 | 2680 | echo ' |
2577 | 2681 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -2597,8 +2701,8 @@ discard block |
||
2597 | 2701 | <hr>'; |
2598 | 2702 | |
2599 | 2703 | // Only show the password box if it's actually needed. |
2600 | - if ($context['require_password']) |
|
2601 | - echo ' |
|
2704 | + if ($context['require_password']) { |
|
2705 | + echo ' |
|
2602 | 2706 | <dl> |
2603 | 2707 | <dt> |
2604 | 2708 | <strong', isset($context['modify_error']['bad_password']) || isset($context['modify_error']['no_password']) ? ' class="error"' : '', '>', $txt['current_password'], ': </strong><br> |
@@ -2608,13 +2712,15 @@ discard block |
||
2608 | 2712 | <input type="password" name="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password"> |
2609 | 2713 | </dd> |
2610 | 2714 | </dl>'; |
2715 | + } |
|
2611 | 2716 | |
2612 | 2717 | echo ' |
2613 | 2718 | <div class="righttext">'; |
2614 | 2719 | |
2615 | - if (!empty($context['token_check'])) |
|
2616 | - echo ' |
|
2720 | + if (!empty($context['token_check'])) { |
|
2721 | + echo ' |
|
2617 | 2722 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '">'; |
2723 | + } |
|
2618 | 2724 | |
2619 | 2725 | echo ' |
2620 | 2726 | <input type="submit" value="', $txt['change_profile'], '" class="button_submit"> |
@@ -2641,9 +2747,10 @@ discard block |
||
2641 | 2747 | <ul id="list_errors">'; |
2642 | 2748 | |
2643 | 2749 | // Cycle through each error and display an error message. |
2644 | - foreach ($context['post_errors'] as $error) |
|
2645 | - echo ' |
|
2750 | + foreach ($context['post_errors'] as $error) { |
|
2751 | + echo ' |
|
2646 | 2752 | <li>', isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : $error, '</li>'; |
2753 | + } |
|
2647 | 2754 | |
2648 | 2755 | echo ' |
2649 | 2756 | </ul>'; |
@@ -2669,12 +2776,13 @@ discard block |
||
2669 | 2776 | <select name="id_group" ', ($context['user']['is_owner'] && $context['member']['group_id'] == 1 ? 'onchange="if (this.value != 1 && !confirm(\'' . $txt['deadmin_confirm'] . '\')) this.value = 1;"' : ''), '>'; |
2670 | 2777 | |
2671 | 2778 | // Fill the select box with all primary member groups that can be assigned to a member. |
2672 | - foreach ($context['member_groups'] as $member_group) |
|
2673 | - if (!empty($member_group['can_be_primary'])) |
|
2779 | + foreach ($context['member_groups'] as $member_group) { |
|
2780 | + if (!empty($member_group['can_be_primary'])) |
|
2674 | 2781 | echo ' |
2675 | 2782 | <option value="', $member_group['id'], '"', $member_group['is_primary'] ? ' selected' : '', '> |
2676 | 2783 | ', $member_group['name'], ' |
2677 | 2784 | </option>'; |
2785 | + } |
|
2678 | 2786 | echo ' |
2679 | 2787 | </select> |
2680 | 2788 | </dd> |
@@ -2686,10 +2794,11 @@ discard block |
||
2686 | 2794 | <input type="hidden" name="additional_groups[]" value="0">'; |
2687 | 2795 | |
2688 | 2796 | // For each membergroup show a checkbox so members can be assigned to more than one group. |
2689 | - foreach ($context['member_groups'] as $member_group) |
|
2690 | - if ($member_group['can_be_additional']) |
|
2797 | + foreach ($context['member_groups'] as $member_group) { |
|
2798 | + if ($member_group['can_be_additional']) |
|
2691 | 2799 | echo ' |
2692 | 2800 | <label for="additional_groups-', $member_group['id'], '"><input type="checkbox" name="additional_groups[]" value="', $member_group['id'], '" id="additional_groups-', $member_group['id'], '"', $member_group['is_additional'] ? ' checked' : '', ' class="input_check"> ', $member_group['name'], '</label><br>'; |
2801 | + } |
|
2693 | 2802 | echo ' |
2694 | 2803 | </span> |
2695 | 2804 | <a href="javascript:void(0);" onclick="document.getElementById(\'additional_groupsList\').style.display = \'block\'; document.getElementById(\'additional_groupsLink\').style.display = \'none\'; return false;" id="additional_groupsLink" style="display: none;" class="toggle_down">', $txt['additional_membergroups_show'], '</a> |
@@ -2749,9 +2858,10 @@ discard block |
||
2749 | 2858 | <span class="smalltext">', $txt['sig_info'], '</span><br> |
2750 | 2859 | <br>'; |
2751 | 2860 | |
2752 | - if ($context['show_spellchecking']) |
|
2753 | - echo ' |
|
2861 | + if ($context['show_spellchecking']) { |
|
2862 | + echo ' |
|
2754 | 2863 | <input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'creator\', \'signature\');" class="button_submit">'; |
2864 | + } |
|
2755 | 2865 | |
2756 | 2866 | echo ' |
2757 | 2867 | </dt> |
@@ -2759,17 +2869,20 @@ discard block |
||
2759 | 2869 | <textarea class="editor" onkeyup="calcCharLeft();" id="signature" name="signature" rows="5" cols="50" style="min-width: 50%; max-width: 99%;">', $context['member']['signature'], '</textarea><br>'; |
2760 | 2870 | |
2761 | 2871 | // If there is a limit at all! |
2762 | - if (!empty($context['signature_limits']['max_length'])) |
|
2763 | - echo ' |
|
2872 | + if (!empty($context['signature_limits']['max_length'])) { |
|
2873 | + echo ' |
|
2764 | 2874 | <span class="smalltext">', sprintf($txt['max_sig_characters'], $context['signature_limits']['max_length']), ' <span id="signatureLeft">', $context['signature_limits']['max_length'], '</span></span><br>'; |
2875 | + } |
|
2765 | 2876 | |
2766 | - if (!empty($context['show_preview_button'])) |
|
2767 | - echo ' |
|
2877 | + if (!empty($context['show_preview_button'])) { |
|
2878 | + echo ' |
|
2768 | 2879 | <input type="button" name="preview_signature" id="preview_button" value="', $txt['preview_signature'], '" class="button_submit">'; |
2880 | + } |
|
2769 | 2881 | |
2770 | - if ($context['signature_warning']) |
|
2771 | - echo ' |
|
2882 | + if ($context['signature_warning']) { |
|
2883 | + echo ' |
|
2772 | 2884 | <span class="smalltext">', $context['signature_warning'], '</span>'; |
2885 | + } |
|
2773 | 2886 | |
2774 | 2887 | // Some javascript used to count how many characters have been used so far in the signature. |
2775 | 2888 | echo ' |
@@ -2813,9 +2926,10 @@ discard block |
||
2813 | 2926 | <div> |
2814 | 2927 | <select name="cat" id="cat" size="10" onchange="changeSel(\'\');" onfocus="selectRadioByName(document.forms.creator.avatar_choice, \'server_stored\');">'; |
2815 | 2928 | // This lists all the file categories. |
2816 | - foreach ($context['avatars'] as $avatar) |
|
2817 | - echo ' |
|
2929 | + foreach ($context['avatars'] as $avatar) { |
|
2930 | + echo ' |
|
2818 | 2931 | <option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected' : ''), '>', $avatar['name'], '</option>'; |
2932 | + } |
|
2819 | 2933 | echo ' |
2820 | 2934 | </select> |
2821 | 2935 | </div> |
@@ -2870,16 +2984,17 @@ discard block |
||
2870 | 2984 | <div id="avatar_gravatar"> |
2871 | 2985 | <img src="' . $context['member']['avatar']['href'] . '" alt="" />'; |
2872 | 2986 | |
2873 | - if (empty($modSettings['gravatarAllowExtraEmail'])) |
|
2874 | - echo ' |
|
2987 | + if (empty($modSettings['gravatarAllowExtraEmail'])) { |
|
2988 | + echo ' |
|
2875 | 2989 | <div class="smalltext">', $txt['gravatar_noAlternateEmail'], '</div>'; |
2876 | - else |
|
2990 | + } else |
|
2877 | 2991 | { |
2878 | 2992 | // Depending on other stuff, the stored value here might have some odd things in it from other areas. |
2879 | - if ($context['member']['avatar']['external'] == $context['member']['email']) |
|
2880 | - $textbox_value = ''; |
|
2881 | - else |
|
2882 | - $textbox_value = $context['member']['avatar']['external']; |
|
2993 | + if ($context['member']['avatar']['external'] == $context['member']['email']) { |
|
2994 | + $textbox_value = ''; |
|
2995 | + } else { |
|
2996 | + $textbox_value = $context['member']['avatar']['external']; |
|
2997 | + } |
|
2883 | 2998 | |
2884 | 2999 | echo ' |
2885 | 3000 | <div class="smalltext">', $txt['gravatar_alternateEmail'], '</div> |
@@ -2951,8 +3066,9 @@ discard block |
||
2951 | 3066 | $h = !empty($modSettings['avatar_max_height_' . $type]) ? comma_format($modSettings['avatar_max_height_' . $type]) : 0; |
2952 | 3067 | |
2953 | 3068 | $suffix = (!empty($w) ? 'w' : '') . (!empty($h) ? 'h' : ''); |
2954 | - if (empty($suffix)) |
|
2955 | - return; |
|
3069 | + if (empty($suffix)) { |
|
3070 | + return; |
|
3071 | + } |
|
2956 | 3072 | |
2957 | 3073 | echo ' |
2958 | 3074 | <div class="smalltext">', sprintf($txt['avatar_max_size_' . $suffix], $w, $h), '</div>'; |
@@ -2974,9 +3090,10 @@ discard block |
||
2974 | 3090 | <dd> |
2975 | 3091 | <select name="easyformat" id="easyformat" onchange="document.forms.creator.time_format.value = this.options[this.selectedIndex].value;" style="margin-bottom: 4px;">'; |
2976 | 3092 | // Help the user by showing a list of common time formats. |
2977 | - foreach ($context['easy_timeformats'] as $time_format) |
|
2978 | - echo ' |
|
3093 | + foreach ($context['easy_timeformats'] as $time_format) { |
|
3094 | + echo ' |
|
2979 | 3095 | <option value="', $time_format['format'], '"', $time_format['format'] == $context['member']['time_format'] ? ' selected' : '', '>', $time_format['title'], '</option>'; |
3096 | + } |
|
2980 | 3097 | echo ' |
2981 | 3098 | </select><br> |
2982 | 3099 | <input type="text" name="time_format" id="time_format" value="', $context['member']['time_format'], '" size="30" class="input_text"> |
@@ -3012,9 +3129,10 @@ discard block |
||
3012 | 3129 | </dt> |
3013 | 3130 | <dd> |
3014 | 3131 | <select name="smiley_set" id="smiley_set" onchange="document.getElementById(\'smileypr\').src = this.selectedIndex == 0 ? \'', $settings['images_url'], '/blank.png\' : \'', $modSettings['smileys_url'], '/\' + (this.selectedIndex != 1 ? this.options[this.selectedIndex].value : \'', !empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'], '\') + \'/smiley.gif\';">'; |
3015 | - foreach ($context['smiley_sets'] as $set) |
|
3016 | - echo ' |
|
3132 | + foreach ($context['smiley_sets'] as $set) { |
|
3133 | + echo ' |
|
3017 | 3134 | <option value="', $set['id'], '"', $set['selected'] ? ' selected' : '', '>', $set['name'], '</option>'; |
3135 | + } |
|
3018 | 3136 | echo ' |
3019 | 3137 | </select> <img id="smileypr" class="centericon" src="', $context['member']['smiley_set']['id'] != 'none' ? $modSettings['smileys_url'] . '/' . ($context['member']['smiley_set']['id'] != '' ? $context['member']['smiley_set']['id'] : (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'])) . '/smiley.gif' : $settings['images_url'] . '/blank.png', '" alt=":)" style="padding-left: 20px;"> |
3020 | 3138 | </dd>'; |
@@ -3065,10 +3183,11 @@ discard block |
||
3065 | 3183 | </div> |
3066 | 3184 | <div class="clear"></div>'; |
3067 | 3185 | |
3068 | - if (!empty($context['from_ajax'])) |
|
3069 | - echo ' |
|
3186 | + if (!empty($context['from_ajax'])) { |
|
3187 | + echo ' |
|
3070 | 3188 | <br> |
3071 | 3189 | <a href="javascript:self.close();"></a>'; |
3190 | + } |
|
3072 | 3191 | |
3073 | 3192 | echo ' |
3074 | 3193 | </div> |
@@ -3107,15 +3226,16 @@ discard block |
||
3107 | 3226 | <br /><div class="smalltext">', $txt['tfa_profile_desc'], '</div> |
3108 | 3227 | </dt> |
3109 | 3228 | <dd>'; |
3110 | - if (!$context['tfa_enabled'] && $context['user']['is_owner']) |
|
3111 | - echo ' |
|
3229 | + if (!$context['tfa_enabled'] && $context['user']['is_owner']) { |
|
3230 | + echo ' |
|
3112 | 3231 | <a href="', !empty($modSettings['force_ssl']) && $modSettings['force_ssl'] < 2 ? strtr($scripturl, array('http://' => 'https://')) : $scripturl, '?action=profile;area=tfasetup" id="enable_tfa">', $txt['tfa_profile_enable'], '</a>'; |
3113 | - elseif (!$context['tfa_enabled']) |
|
3114 | - echo ' |
|
3232 | + } elseif (!$context['tfa_enabled']) { |
|
3233 | + echo ' |
|
3115 | 3234 | ', $txt['tfa_profile_disabled']; |
3116 | - else |
|
3117 | - echo ' |
|
3235 | + } else { |
|
3236 | + echo ' |
|
3118 | 3237 | ', sprintf($txt['tfa_profile_enabled'], $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=tfasetup;disable'); |
3238 | + } |
|
3119 | 3239 | echo ' |
3120 | 3240 | </dd>'; |
3121 | 3241 | } |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | echo ' |
344 | 344 | </dl> |
345 | 345 | <input type="submit" name="save" value="', $txt['membergroups_edit_save'], '" class="button_submit">', $context['group']['allow_delete'] ? ' |
346 | - <input type="submit" name="delete" value="'. $txt['membergroups_delete'] .'" data-confirm="'. ($context['is_moderator_group'] ? $txt['membergroups_confirm_delete_mod'] : $txt['membergroups_confirm_delete']) .'" class="button_submit you_sure">' : '', ' |
|
346 | + <input type="submit" name="delete" value="'. $txt['membergroups_delete'] . '" data-confirm="' . ($context['is_moderator_group'] ? $txt['membergroups_confirm_delete_mod'] : $txt['membergroups_confirm_delete']) . '" class="button_submit you_sure">' : '', ' |
|
347 | 347 | </div> |
348 | 348 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
349 | 349 | <input type="hidden" name="', $context['admin-mmg_token_var'], '" value="', $context['admin-mmg_token'], '"> |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | |
531 | 531 | echo ' |
532 | 532 | <div id="admincenter"> |
533 | - <form action="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : '') , ';sa=members;group=', $context['group']['id'], '" method="post" accept-charset="', $context['character_set'], '" id="view_group"> |
|
533 | + <form action="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;group=', $context['group']['id'], '" method="post" accept-charset="', $context['character_set'], '" id="view_group"> |
|
534 | 534 | <div class="cat_bar"> |
535 | 535 | <h3 class="catbg">', $context['page_title'], '</h3> |
536 | 536 | </div> |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | <strong>' . $txt['membergroups_members_description'] . ':</strong> |
550 | 550 | </dt> |
551 | 551 | <dd> |
552 | - ', $context['group']['description'] ,' |
|
552 | + ', $context['group']['description'], ' |
|
553 | 553 | </dd>'; |
554 | 554 | |
555 | 555 | echo ' |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | <strong>', $txt['membergroups_members_top'], ':</strong> |
558 | 558 | </dt> |
559 | 559 | <dd> |
560 | - ', $context['total_members'] ,' |
|
560 | + ', $context['total_members'], ' |
|
561 | 561 | </dd>'; |
562 | 562 | // Any group moderators to show? |
563 | 563 | if (!empty($context['group']['moderators'])) |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | <strong>', $txt['membergroups_members_group_moderators'], ':</strong> |
572 | 572 | </dt> |
573 | 573 | <dd> |
574 | - ', implode(', ', $moderators) ,' |
|
574 | + ', implode(', ', $moderators), ' |
|
575 | 575 | </dd>'; |
576 | 576 | } |
577 | 577 | |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | echo ' |
598 | 598 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
599 | 599 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=registered', $context['sort_by'] == 'registered' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['date_registered'], $context['sort_by'] == 'registered' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
600 | - <th ', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '','</a></th>'; |
|
600 | + <th ', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
|
601 | 601 | if (!empty($context['group']['assignable'])) |
602 | 602 | echo ' |
603 | 603 | <th style="width: 4%"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);"></th>'; |
@@ -52,9 +52,10 @@ discard block |
||
52 | 52 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
53 | 53 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0" checked class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
54 | 54 | |
55 | - if ($context['allow_protected']) |
|
56 | - echo ' |
|
55 | + if ($context['allow_protected']) { |
|
56 | + echo ' |
|
57 | 57 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1" class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
58 | + } |
|
58 | 59 | |
59 | 60 | echo ' |
60 | 61 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2" class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -64,14 +65,15 @@ discard block |
||
64 | 65 | </dd>'; |
65 | 66 | } |
66 | 67 | |
67 | - if ($context['post_group'] || $context['undefined_group']) |
|
68 | - echo ' |
|
68 | + if ($context['post_group'] || $context['undefined_group']) { |
|
69 | + echo ' |
|
69 | 70 | <dt id="min_posts_text"> |
70 | 71 | <strong>', $txt['membergroups_min_posts'], ':</strong> |
71 | 72 | </dt> |
72 | 73 | <dd> |
73 | 74 | <input type="number" name="min_posts" id="min_posts_input" size="5" class="input_text"> |
74 | 75 | </dd>'; |
76 | + } |
|
75 | 77 | if (!$context['post_group'] || !empty($modSettings['permission_enable_postgroups'])) |
76 | 78 | { |
77 | 79 | echo ' |
@@ -87,9 +89,10 @@ discard block |
||
87 | 89 | <select name="inheritperm" id="inheritperm_select" onclick="document.getElementById(\'perm_type_inherit\').checked = true;"> |
88 | 90 | <option value="-1">', $txt['membergroups_guests'], '</option> |
89 | 91 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
90 | - foreach ($context['groups'] as $group) |
|
91 | - echo ' |
|
92 | + foreach ($context['groups'] as $group) { |
|
93 | + echo ' |
|
92 | 94 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
95 | + } |
|
93 | 96 | echo ' |
94 | 97 | </select> |
95 | 98 | <br> |
@@ -98,9 +101,10 @@ discard block |
||
98 | 101 | <select name="copyperm" id="copyperm_select" onclick="document.getElementById(\'perm_type_copy\').checked = true;"> |
99 | 102 | <option value="-1">', $txt['membergroups_guests'], '</option> |
100 | 103 | <option value="0" selected>', $txt['membergroups_members'], '</option>'; |
101 | - foreach ($context['groups'] as $group) |
|
102 | - echo ' |
|
104 | + foreach ($context['groups'] as $group) { |
|
105 | + echo ' |
|
103 | 106 | <option value="', $group['id'], '">', $group['name'], '</option>'; |
107 | + } |
|
104 | 108 | echo ' |
105 | 109 | </select> |
106 | 110 | <br> |
@@ -173,8 +177,8 @@ discard block |
||
173 | 177 | <input type="text" name="group_name" id="group_name_input" value="', $context['group']['editable_name'], '" size="30" class="input_text"> |
174 | 178 | </dd>'; |
175 | 179 | |
176 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
177 | - echo ' |
|
180 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
181 | + echo ' |
|
178 | 182 | |
179 | 183 | <dt id="group_desc_text"> |
180 | 184 | <label for="group_desc_input"><strong>', $txt['membergroups_edit_desc'], ':</strong></label> |
@@ -182,6 +186,7 @@ discard block |
||
182 | 186 | <dd> |
183 | 187 | <textarea name="group_desc" id="group_desc_input" rows="4" cols="40">', $context['group']['description'], '</textarea> |
184 | 188 | </dd>'; |
189 | + } |
|
185 | 190 | |
186 | 191 | // Group type... |
187 | 192 | if ($context['group']['allow_post_group']) |
@@ -195,9 +200,10 @@ discard block |
||
195 | 200 | <legend>', $txt['membergroups_edit_select_group_type'], '</legend> |
196 | 201 | <label for="group_type_private"><input type="radio" name="group_type" id="group_type_private" value="0"', !$context['group']['is_post_group'] && $context['group']['type'] == 0 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_private'], '</label><br>'; |
197 | 202 | |
198 | - if ($context['group']['allow_protected']) |
|
199 | - echo ' |
|
203 | + if ($context['group']['allow_protected']) { |
|
204 | + echo ' |
|
200 | 205 | <label for="group_type_protected"><input type="radio" name="group_type" id="group_type_protected" value="1"', $context['group']['type'] == 1 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_protected'], '</label><br>'; |
206 | + } |
|
201 | 207 | |
202 | 208 | echo ' |
203 | 209 | <label for="group_type_request"><input type="radio" name="group_type" id="group_type_request" value="2"', $context['group']['type'] == 2 ? ' checked' : '', ' class="input_radio" onclick="swapPostGroup(0);">', $txt['membergroups_group_type_request'], '</label><br> |
@@ -207,8 +213,8 @@ discard block |
||
207 | 213 | </dd>'; |
208 | 214 | } |
209 | 215 | |
210 | - if ($context['group']['id'] != 3 && $context['group']['id'] != 4) |
|
211 | - echo ' |
|
216 | + if ($context['group']['id'] != 3 && $context['group']['id'] != 4) { |
|
217 | + echo ' |
|
212 | 218 | <dt id="group_moderators_text"> |
213 | 219 | <label for="group_moderators"><strong>', $txt['moderators'], ':</strong></label> |
214 | 220 | </dt> |
@@ -226,6 +232,7 @@ discard block |
||
226 | 232 | <option value="2"', $context['group']['hidden'] == 2 ? ' selected' : '', '>', $txt['membergroups_edit_hidden_all'], '</option> |
227 | 233 | </select> |
228 | 234 | </dd>'; |
235 | + } |
|
229 | 236 | |
230 | 237 | // Can they inherit permissions? |
231 | 238 | if ($context['group']['id'] > 1 && $context['group']['id'] != 3) |
@@ -242,9 +249,10 @@ discard block |
||
242 | 249 | <option value="0"', $context['group']['inherited_from'] == 0 ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $txt['membergroups_members'], '</option>'; |
243 | 250 | |
244 | 251 | // For all the inheritable groups show an option. |
245 | - foreach ($context['inheritable_groups'] as $id => $group) |
|
246 | - echo ' |
|
252 | + foreach ($context['inheritable_groups'] as $id => $group) { |
|
253 | + echo ' |
|
247 | 254 | <option value="', $id, '"', $context['group']['inherited_from'] == $id ? ' selected' : '', '>', $txt['membergroups_edit_inherit_permissions_from'], ': ', $group, '</option>'; |
255 | + } |
|
248 | 256 | |
249 | 257 | echo ' |
250 | 258 | </select> |
@@ -252,8 +260,8 @@ discard block |
||
252 | 260 | </dd>'; |
253 | 261 | } |
254 | 262 | |
255 | - if ($context['group']['allow_post_group']) |
|
256 | - echo ' |
|
263 | + if ($context['group']['allow_post_group']) { |
|
264 | + echo ' |
|
257 | 265 | |
258 | 266 | <dt id="min_posts_text"> |
259 | 267 | <label for="min_posts_input"><strong>', $txt['membergroups_min_posts'], ':</strong></label> |
@@ -261,6 +269,7 @@ discard block |
||
261 | 269 | <dd> |
262 | 270 | <input type="number" name="min_posts" id="min_posts_input"', $context['group']['is_post_group'] ? ' value="' . $context['group']['min_posts'] . '"' : '', ' size="6" class="input_text"> |
263 | 271 | </dd>'; |
272 | + } |
|
264 | 273 | echo ' |
265 | 274 | <dt> |
266 | 275 | <label for="online_color_input"><strong>', $txt['membergroups_online_color'], ':</strong></label> |
@@ -301,9 +310,10 @@ discard block |
||
301 | 310 | } |
302 | 311 | |
303 | 312 | // No? Hide the entire control. |
304 | - else |
|
305 | - echo ' |
|
313 | + else { |
|
314 | + echo ' |
|
306 | 315 | <input type="hidden" name="icon_image" value="">'; |
316 | + } |
|
307 | 317 | |
308 | 318 | echo ' |
309 | 319 | <dt> |
@@ -314,8 +324,8 @@ discard block |
||
314 | 324 | <input type="text" name="max_messages" id="max_messages_input" value="', $context['group']['id'] == 1 ? 0 : $context['group']['max_messages'], '" size="6"', $context['group']['id'] == 1 ? ' disabled' : '', ' class="input_text"> |
315 | 325 | </dd>'; |
316 | 326 | //Force 2FA for this membergroup? |
317 | - if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) |
|
318 | - echo ' |
|
327 | + if (!empty($modSettings['tfa_mode']) && $modSettings['tfa_mode'] == 2) { |
|
328 | + echo ' |
|
319 | 329 | <dt> |
320 | 330 | <label for="group_tfa_force_input"><strong>', $txt['membergroups_tfa_force'], ':</strong></label><br> |
321 | 331 | <span class="smalltext">', $txt['membergroups_tfa_force_note'], '</span> |
@@ -323,6 +333,7 @@ discard block |
||
323 | 333 | <dd> |
324 | 334 | <input type="checkbox" name="group_tfa_force"', $context['group']['tfa_required'] ? ' checked' : '', ' class="input_check"> |
325 | 335 | </dd>'; |
336 | + } |
|
326 | 337 | |
327 | 338 | if (!empty($context['categories'])) |
328 | 339 | { |
@@ -332,10 +343,11 @@ discard block |
||
332 | 343 | <span class="smalltext">' . $txt['membergroups_new_board_post_groups'] . '</span>' : '', ' |
333 | 344 | </dt> |
334 | 345 | <dd>'; |
335 | - if (!empty($context['can_manage_boards'])) |
|
336 | - echo $txt['membergroups_can_manage_access']; |
|
337 | - else |
|
338 | - template_add_edit_group_boards_list(); |
|
346 | + if (!empty($context['can_manage_boards'])) { |
|
347 | + echo $txt['membergroups_can_manage_access']; |
|
348 | + } else { |
|
349 | + template_add_edit_group_boards_list(); |
|
350 | + } |
|
339 | 351 | |
340 | 352 | echo ' |
341 | 353 | </dd>'; |
@@ -364,20 +376,21 @@ discard block |
||
364 | 376 | sItemListContainerId: \'moderator_container\', |
365 | 377 | aListItems: ['; |
366 | 378 | |
367 | - foreach ($context['group']['moderators'] as $id_member => $member_name) |
|
368 | - echo ' |
|
379 | + foreach ($context['group']['moderators'] as $id_member => $member_name) { |
|
380 | + echo ' |
|
369 | 381 | { |
370 | 382 | sItemId: ', JavaScriptEscape($id_member), ', |
371 | 383 | sItemName: ', JavaScriptEscape($member_name), ' |
372 | 384 | }', $id_member == $context['group']['last_moderator_id'] ? '' : ','; |
385 | + } |
|
373 | 386 | |
374 | 387 | echo ' |
375 | 388 | ] |
376 | 389 | }); |
377 | 390 | </script>'; |
378 | 391 | |
379 | - if ($context['group']['allow_post_group']) |
|
380 | - echo ' |
|
392 | + if ($context['group']['allow_post_group']) { |
|
393 | + echo ' |
|
381 | 394 | <script> |
382 | 395 | function swapPostGroup(isChecked) |
383 | 396 | { |
@@ -425,7 +438,8 @@ discard block |
||
425 | 438 | |
426 | 439 | swapPostGroup(', $context['group']['is_post_group'] ? 'true' : 'false', '); |
427 | 440 | </script>'; |
428 | -} |
|
441 | + } |
|
442 | + } |
|
429 | 443 | |
430 | 444 | /** |
431 | 445 | * The template for determining which boards a group has access to. |
@@ -442,13 +456,13 @@ discard block |
||
442 | 456 | |
443 | 457 | foreach ($context['categories'] as $category) |
444 | 458 | { |
445 | - if (empty($modSettings['deny_boards_access'])) |
|
446 | - echo ' |
|
459 | + if (empty($modSettings['deny_boards_access'])) { |
|
460 | + echo ' |
|
447 | 461 | <li class="category"> |
448 | 462 | <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'new_group\'); return false;"><strong>', $category['name'], '</strong></a> |
449 | 463 | <ul style="width:100%">'; |
450 | - else |
|
451 | - echo ' |
|
464 | + } else { |
|
465 | + echo ' |
|
452 | 466 | <li class="category"> |
453 | 467 | <strong>', $category['name'], '</strong> |
454 | 468 | <span class="select_all_box"> |
@@ -461,16 +475,17 @@ discard block |
||
461 | 475 | </select> |
462 | 476 | </span> |
463 | 477 | <ul style="width:100%" id="boards_list_', $category['id'], '">'; |
478 | + } |
|
464 | 479 | |
465 | 480 | foreach ($category['boards'] as $board) |
466 | 481 | { |
467 | - if (empty($modSettings['deny_boards_access'])) |
|
468 | - echo ' |
|
482 | + if (empty($modSettings['deny_boards_access'])) { |
|
483 | + echo ' |
|
469 | 484 | <li class="board" style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;"> |
470 | 485 | <input type="checkbox" name="boardaccess[', $board['id'], ']" id="brd', $board['id'], '" value="allow"', $board['allow'] ? ' checked' : '', ' class="input_check"> <label for="brd', $board['id'], '">', $board['name'], '</label> |
471 | 486 | </li>'; |
472 | - else |
|
473 | - echo ' |
|
487 | + } else { |
|
488 | + echo ' |
|
474 | 489 | <li class="board" style="width:100%"> |
475 | 490 | <span style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'], 'em;">', $board['name'], ': </span> |
476 | 491 | <span style="width:50%;float:right"> |
@@ -479,6 +494,7 @@ discard block |
||
479 | 494 | <input type="radio" name="boardaccess[', $board['id'], ']" id="deny_brd', $board['id'], '" value="deny"', $board['deny'] ? ' checked' : '', ' class="input_check"> <label for="deny_brd', $board['id'], '">', $txt['permissions_option_deny'], '</label> |
480 | 495 | </span> |
481 | 496 | </li>'; |
497 | + } |
|
482 | 498 | } |
483 | 499 | |
484 | 500 | echo ' |
@@ -489,13 +505,13 @@ discard block |
||
489 | 505 | echo ' |
490 | 506 | </ul>'; |
491 | 507 | |
492 | - if (empty($modSettings['deny_boards_access'])) |
|
493 | - echo ' |
|
508 | + if (empty($modSettings['deny_boards_access'])) { |
|
509 | + echo ' |
|
494 | 510 | <br class="clear"><br> |
495 | 511 | <input type="checkbox" id="checkall_check" class="input_check" onclick="invertAll(this, this.form, \'boardaccess\');"> <label for="checkall_check"><em>', $txt['check_all'], '</em></label> |
496 | 512 | </fieldset>'; |
497 | - else |
|
498 | - echo ' |
|
513 | + } else { |
|
514 | + echo ' |
|
499 | 515 | <br class="clear"> |
500 | 516 | <span class="select_all_box"> |
501 | 517 | <em>', $txt['all'], ': </em> |
@@ -511,15 +527,17 @@ discard block |
||
511 | 527 | }); |
512 | 528 | }); |
513 | 529 | </script>'; |
530 | + } |
|
514 | 531 | |
515 | - if ($collapse) |
|
516 | - echo ' |
|
532 | + if ($collapse) { |
|
533 | + echo ' |
|
517 | 534 | <a href="javascript:void(0);" onclick="document.getElementById(\'visible_boards\').style.display = \'block\'; document.getElementById(\'visible_boards_link\').style.display = \'none\'; return false;" id="visible_boards_link" style="display: none;">[ ', $txt['membergroups_select_visible_boards'], ' ]</a> |
518 | 535 | <script> |
519 | 536 | document.getElementById("visible_boards_link").style.display = ""; |
520 | 537 | document.getElementById("visible_boards").style.display = "none"; |
521 | 538 | </script>'; |
522 | -} |
|
539 | + } |
|
540 | + } |
|
523 | 541 | |
524 | 542 | /** |
525 | 543 | * Templatine for viewing the members of a group. |
@@ -543,14 +561,15 @@ discard block |
||
543 | 561 | <span ', $context['group']['online_color'] ? 'style="color: ' . $context['group']['online_color'] . ';"' : '', '>', $context['group']['name'], '</span> ', $context['group']['icons'], ' |
544 | 562 | </dd>'; |
545 | 563 | //Any description to show? |
546 | - if (!empty($context['group']['description'])) |
|
547 | - echo ' |
|
564 | + if (!empty($context['group']['description'])) { |
|
565 | + echo ' |
|
548 | 566 | <dt> |
549 | 567 | <strong>' . $txt['membergroups_members_description'] . ':</strong> |
550 | 568 | </dt> |
551 | 569 | <dd> |
552 | 570 | ', $context['group']['description'] ,' |
553 | 571 | </dd>'; |
572 | + } |
|
554 | 573 | |
555 | 574 | echo ' |
556 | 575 | <dt> |
@@ -563,8 +582,9 @@ discard block |
||
563 | 582 | if (!empty($context['group']['moderators'])) |
564 | 583 | { |
565 | 584 | $moderators = array(); |
566 | - foreach ($context['group']['moderators'] as $moderator) |
|
567 | - $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
585 | + foreach ($context['group']['moderators'] as $moderator) { |
|
586 | + $moderators[] = '<a href="' . $scripturl . '?action=profile;u=' . $moderator['id'] . '">' . $moderator['name'] . '</a>'; |
|
587 | + } |
|
568 | 588 | |
569 | 589 | echo ' |
570 | 590 | <dt> |
@@ -590,27 +610,30 @@ discard block |
||
590 | 610 | <tr class="title_bar"> |
591 | 611 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
592 | 612 | |
593 | - if ($context['can_send_email']) |
|
594 | - echo ' |
|
613 | + if ($context['can_send_email']) { |
|
614 | + echo ' |
|
595 | 615 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=email', $context['sort_by'] == 'email' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['email'], $context['sort_by'] == 'email' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th>'; |
616 | + } |
|
596 | 617 | |
597 | 618 | echo ' |
598 | 619 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
599 | 620 | <th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=registered', $context['sort_by'] == 'registered' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['date_registered'], $context['sort_by'] == 'registered' ? '<span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '', '</a></th> |
600 | 621 | <th ', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <span class="generic_icons sort_' . $context['sort_direction'] . '"></span>' : '','</a></th>'; |
601 | - if (!empty($context['group']['assignable'])) |
|
602 | - echo ' |
|
622 | + if (!empty($context['group']['assignable'])) { |
|
623 | + echo ' |
|
603 | 624 | <th style="width: 4%"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);"></th>'; |
625 | + } |
|
604 | 626 | echo ' |
605 | 627 | </tr> |
606 | 628 | </thead> |
607 | 629 | <tbody>'; |
608 | 630 | |
609 | - if (empty($context['members'])) |
|
610 | - echo ' |
|
631 | + if (empty($context['members'])) { |
|
632 | + echo ' |
|
611 | 633 | <tr class="windowbg"> |
612 | 634 | <td colspan="6">', $txt['membergroups_members_no_members'], '</td> |
613 | 635 | </tr>'; |
636 | + } |
|
614 | 637 | |
615 | 638 | foreach ($context['members'] as $member) |
616 | 639 | { |
@@ -629,9 +652,10 @@ discard block |
||
629 | 652 | <td>', $member['last_online'], '</td> |
630 | 653 | <td>', $member['registered'], '</td> |
631 | 654 | <td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>'; |
632 | - if (!empty($context['group']['assignable'])) |
|
633 | - echo ' |
|
655 | + if (!empty($context['group']['assignable'])) { |
|
656 | + echo ' |
|
634 | 657 | <td style="width: 4%"><input type="checkbox" name="rem[]" value="', $member['id'], '" class="input_check" ', ($context['user']['id'] == $member['id'] && $context['group']['id'] == 1 ? 'onclick="if (this.checked) return confirm(\'' . $txt['membergroups_members_deadmin_confirm'] . '\')" ' : ''), '/></td>'; |
658 | + } |
|
635 | 659 | echo ' |
636 | 660 | </tr>'; |
637 | 661 | } |
@@ -640,11 +664,12 @@ discard block |
||
640 | 664 | </tbody> |
641 | 665 | </table>'; |
642 | 666 | |
643 | - if (!empty($context['group']['assignable'])) |
|
644 | - echo ' |
|
667 | + if (!empty($context['group']['assignable'])) { |
|
668 | + echo ' |
|
645 | 669 | <div class="floatright"> |
646 | 670 | <input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button_submit "> |
647 | 671 | </div>'; |
672 | + } |
|
648 | 673 | |
649 | 674 | echo ' |
650 | 675 | <div class="pagesection flow_hidden"> |
@@ -678,8 +703,8 @@ discard block |
||
678 | 703 | </form> |
679 | 704 | </div>'; |
680 | 705 | |
681 | - if (!empty($context['group']['assignable'])) |
|
682 | - echo ' |
|
706 | + if (!empty($context['group']['assignable'])) { |
|
707 | + echo ' |
|
683 | 708 | <script> |
684 | 709 | var oAddMemberSuggest = new smc_AutoSuggest({ |
685 | 710 | sSelf: \'oAddMemberSuggest\', |
@@ -695,7 +720,8 @@ discard block |
||
695 | 720 | sItemListContainerId: \'toAddItemContainer\' |
696 | 721 | }); |
697 | 722 | </script>'; |
698 | -} |
|
723 | + } |
|
724 | + } |
|
699 | 725 | |
700 | 726 | /** |
701 | 727 | * Allow the moderator to enter a reason to each user being rejected. |
@@ -715,8 +741,8 @@ discard block |
||
715 | 741 | <dl class="settings">'; |
716 | 742 | |
717 | 743 | // Loop through and print out a reason box for each... |
718 | - foreach ($context['group_requests'] as $request) |
|
719 | - echo ' |
|
744 | + foreach ($context['group_requests'] as $request) { |
|
745 | + echo ' |
|
720 | 746 | <dt> |
721 | 747 | <strong>', sprintf($txt['mc_groupr_reason_desc'], $request['member_link'], $request['group_link']), ':</strong> |
722 | 748 | </dt> |
@@ -724,6 +750,7 @@ discard block |
||
724 | 750 | <input type="hidden" name="groupr[]" value="', $request['id'], '"> |
725 | 751 | <textarea name="groupreason[', $request['id'], ']" rows="3" cols="40" style="min-width: 80%; max-width: 99%;"></textarea> |
726 | 752 | </dd>'; |
753 | + } |
|
727 | 754 | |
728 | 755 | echo ' |
729 | 756 | </dl> |
@@ -244,7 +244,7 @@ |
||
244 | 244 | // SMF itself |
245 | 245 | echo ' |
246 | 246 | <div class="cat_bar"> |
247 | - <h3 class="catbg">', $txt['credits_forum'],' ', $txt['credits_copyright'], '</h3> |
|
247 | + <h3 class="catbg">', $txt['credits_forum'], ' ', $txt['credits_copyright'], '</h3> |
|
248 | 248 | </div> |
249 | 249 | <div class="windowbg noup"> |
250 | 250 | ', $context['copyrights']['smf'], ' |
@@ -31,9 +31,10 @@ discard block |
||
31 | 31 | <div class="selectbox floatright" id="upper_show">', $txt['who_show1'], ' |
32 | 32 | <select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
33 | 33 | |
34 | - foreach ($context['show_methods'] as $value => $label) |
|
35 | - echo ' |
|
34 | + foreach ($context['show_methods'] as $value => $label) { |
|
35 | + echo ' |
|
36 | 36 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
37 | + } |
|
37 | 38 | echo ' |
38 | 39 | </select> |
39 | 40 | <noscript> |
@@ -71,9 +72,10 @@ discard block |
||
71 | 72 | ', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', ' |
72 | 73 | </span>'; |
73 | 74 | |
74 | - if (!empty($member['ip'])) |
|
75 | - echo ' |
|
75 | + if (!empty($member['ip'])) { |
|
76 | + echo ' |
|
76 | 77 | (<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)'; |
78 | + } |
|
77 | 79 | |
78 | 80 | echo ' |
79 | 81 | </td> |
@@ -103,9 +105,10 @@ discard block |
||
103 | 105 | <div class="selectbox floatright">', $txt['who_show1'], ' |
104 | 106 | <select name="show" onchange="document.forms.whoFilter.submit();">'; |
105 | 107 | |
106 | - foreach ($context['show_methods'] as $value => $label) |
|
107 | - echo ' |
|
108 | + foreach ($context['show_methods'] as $value => $label) { |
|
109 | + echo ' |
|
108 | 110 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
111 | + } |
|
109 | 112 | echo ' |
110 | 113 | </select> |
111 | 114 | <noscript> |
@@ -134,17 +137,19 @@ discard block |
||
134 | 137 | |
135 | 138 | foreach ($context['credits'] as $section) |
136 | 139 | { |
137 | - if (isset($section['pretext'])) |
|
138 | - echo ' |
|
140 | + if (isset($section['pretext'])) { |
|
141 | + echo ' |
|
139 | 142 | <div class="windowbg noup"> |
140 | 143 | <p>', $section['pretext'], '</p> |
141 | 144 | </div>'; |
145 | + } |
|
142 | 146 | |
143 | - if (isset($section['title'])) |
|
144 | - echo ' |
|
147 | + if (isset($section['title'])) { |
|
148 | + echo ' |
|
145 | 149 | <div class="cat_bar"> |
146 | 150 | <h3 class="catbg">', $section['title'], '</h3> |
147 | 151 | </div>'; |
152 | + } |
|
148 | 153 | |
149 | 154 | echo ' |
150 | 155 | <div class="windowbg2 noup"> |
@@ -152,17 +157,18 @@ discard block |
||
152 | 157 | |
153 | 158 | foreach ($section['groups'] as $group) |
154 | 159 | { |
155 | - if (isset($group['title'])) |
|
156 | - echo ' |
|
160 | + if (isset($group['title'])) { |
|
161 | + echo ' |
|
157 | 162 | <dt> |
158 | 163 | <strong>', $group['title'], '</strong> |
159 | 164 | </dt> |
160 | 165 | <dd>'; |
166 | + } |
|
161 | 167 | |
162 | 168 | // Try to make this read nicely. |
163 | - if (count($group['members']) <= 2) |
|
164 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
165 | - else |
|
169 | + if (count($group['members']) <= 2) { |
|
170 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
171 | + } else |
|
166 | 172 | { |
167 | 173 | $last_peep = array_pop($group['members']); |
168 | 174 | echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep; |
@@ -175,9 +181,10 @@ discard block |
||
175 | 181 | echo ' |
176 | 182 | </dl>'; |
177 | 183 | |
178 | - if (isset($section['posttext'])) |
|
179 | - echo ' |
|
184 | + if (isset($section['posttext'])) { |
|
185 | + echo ' |
|
180 | 186 | <p class="posttext">', $section['posttext'], '</p>'; |
187 | + } |
|
181 | 188 | |
182 | 189 | echo ' |
183 | 190 | </div>'; |
@@ -192,26 +199,29 @@ discard block |
||
192 | 199 | </div> |
193 | 200 | <div class="windowbg noup">'; |
194 | 201 | |
195 | - if (!empty($context['credits_software_graphics']['graphics'])) |
|
196 | - echo ' |
|
202 | + if (!empty($context['credits_software_graphics']['graphics'])) { |
|
203 | + echo ' |
|
197 | 204 | <dl> |
198 | 205 | <dt><strong>', $txt['credits_graphics'], '</strong></dt> |
199 | 206 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd> |
200 | 207 | </dl>'; |
208 | + } |
|
201 | 209 | |
202 | - if (!empty($context['credits_software_graphics']['software'])) |
|
203 | - echo ' |
|
210 | + if (!empty($context['credits_software_graphics']['software'])) { |
|
211 | + echo ' |
|
204 | 212 | <dl> |
205 | 213 | <dt><strong>', $txt['credits_software'], '</strong></dt> |
206 | 214 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd> |
207 | 215 | </dl>'; |
216 | + } |
|
208 | 217 | |
209 | - if (!empty($context['credits_software_graphics']['fonts'])) |
|
210 | - echo ' |
|
218 | + if (!empty($context['credits_software_graphics']['fonts'])) { |
|
219 | + echo ' |
|
211 | 220 | <dl> |
212 | 221 | <dt><strong>', $txt['credits_fonts'], '</strong></dt> |
213 | 222 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd> |
214 | 223 | </dl>'; |
224 | + } |
|
215 | 225 | echo ' |
216 | 226 | </div>'; |
217 | 227 | } |
@@ -226,16 +236,18 @@ discard block |
||
226 | 236 | <div class="windowbg noup">'; |
227 | 237 | |
228 | 238 | // Display the credits. |
229 | - if (!empty($context['credits_modifications'])) |
|
230 | - echo ' |
|
239 | + if (!empty($context['credits_modifications'])) { |
|
240 | + echo ' |
|
231 | 241 | ', implode(' |
232 | 242 | <br>', $context['credits_modifications']); |
243 | + } |
|
233 | 244 | |
234 | 245 | // Legacy. |
235 | - if (!empty($context['copyrights']['mods'])) |
|
236 | - echo (empty($context['credits_modifications']) ? '<br>' : ''), |
|
246 | + if (!empty($context['copyrights']['mods'])) { |
|
247 | + echo (empty($context['credits_modifications']) ? '<br>' : ''), |
|
237 | 248 | implode(' |
238 | 249 | <br>', $context['copyrights']['mods']); |
250 | + } |
|
239 | 251 | |
240 | 252 | echo ' |
241 | 253 | </div>'; |
@@ -188,7 +188,7 @@ |
||
188 | 188 | </dd> |
189 | 189 | </dl> |
190 | 190 | <input type="submit" name="smiley_save" value="', $txt['smileys_save'], '" class="button_submit"> |
191 | - <input type="submit" name="deletesmiley" value="', $txt['smileys_delete'], '" data-confirm="', $txt['smileys_delete_confirm'] ,'" class="button_submit you_sure"> |
|
191 | + <input type="submit" name="deletesmiley" value="', $txt['smileys_delete'], '" data-confirm="', $txt['smileys_delete_confirm'], '" class="button_submit you_sure"> |
|
192 | 192 | </div> |
193 | 193 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
194 | 194 | <input type="hidden" name="smiley" value="', $context['current_smiley']['id'], '"> |
@@ -65,18 +65,19 @@ discard block |
||
65 | 65 | </dt> |
66 | 66 | <dd> |
67 | 67 | ', $modSettings['smileys_url'], '/'; |
68 | - if ($context['current_set']['id'] == 'default') |
|
69 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
70 | - elseif (empty($context['smiley_set_dirs'])) |
|
71 | - echo ' |
|
68 | + if ($context['current_set']['id'] == 'default') { |
|
69 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
70 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
71 | + echo ' |
|
72 | 72 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '" class="input_text"> '; |
73 | - else |
|
73 | + } else |
|
74 | 74 | { |
75 | 75 | echo ' |
76 | 76 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
77 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
78 | - echo ' |
|
77 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
78 | + echo ' |
|
79 | 79 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
80 | + } |
|
80 | 81 | echo ' |
81 | 82 | </select> '; |
82 | 83 | } |
@@ -91,14 +92,15 @@ discard block |
||
91 | 92 | </dd>'; |
92 | 93 | |
93 | 94 | // If this is a new smiley set they have the option to import smileys already in the directory. |
94 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
95 | - echo ' |
|
95 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
96 | + echo ' |
|
96 | 97 | <dt> |
97 | 98 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
98 | 99 | </dt> |
99 | 100 | <dd> |
100 | 101 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1" class="input_check"> |
101 | 102 | </dd>'; |
103 | + } |
|
102 | 104 | |
103 | 105 | echo ' |
104 | 106 | </dl> |
@@ -132,9 +134,10 @@ discard block |
||
132 | 134 | <dd> |
133 | 135 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">'; |
134 | 136 | |
135 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
136 | - echo ' |
|
137 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
138 | + echo ' |
|
137 | 139 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
140 | + } |
|
138 | 141 | |
139 | 142 | echo ' |
140 | 143 | </select>) |
@@ -149,16 +152,17 @@ discard block |
||
149 | 152 | <strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong> |
150 | 153 | </dt> |
151 | 154 | <dd>'; |
152 | - if (empty($context['filenames'])) |
|
153 | - echo ' |
|
155 | + if (empty($context['filenames'])) { |
|
156 | + echo ' |
|
154 | 157 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" class="input_text">'; |
155 | - else |
|
158 | + } else |
|
156 | 159 | { |
157 | 160 | echo ' |
158 | 161 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
159 | - foreach ($context['filenames'] as $filename) |
|
160 | - echo ' |
|
162 | + foreach ($context['filenames'] as $filename) { |
|
163 | + echo ' |
|
161 | 164 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
165 | + } |
|
162 | 166 | echo ' |
163 | 167 | </select>'; |
164 | 168 | } |
@@ -227,9 +231,10 @@ discard block |
||
227 | 231 | <dd> |
228 | 232 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
229 | 233 | |
230 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
231 | - echo ' |
|
234 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
235 | + echo ' |
|
232 | 236 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
237 | + } |
|
233 | 238 | |
234 | 239 | echo ' |
235 | 240 | </select> |
@@ -238,16 +243,17 @@ discard block |
||
238 | 243 | <strong><label for="smiley_filename">', $txt['smileys_filename'], '</label>: </strong> |
239 | 244 | </dt> |
240 | 245 | <dd>'; |
241 | - if (empty($context['filenames'])) |
|
242 | - echo ' |
|
246 | + if (empty($context['filenames'])) { |
|
247 | + echo ' |
|
243 | 248 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');" class="input_text">'; |
244 | - else |
|
249 | + } else |
|
245 | 250 | { |
246 | 251 | echo ' |
247 | 252 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
248 | - foreach ($context['filenames'] as $filename) |
|
249 | - echo ' |
|
253 | + foreach ($context['filenames'] as $filename) { |
|
254 | + echo ' |
|
250 | 255 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
256 | + } |
|
251 | 257 | echo ' |
252 | 258 | </select>'; |
253 | 259 | } |
@@ -275,14 +281,15 @@ discard block |
||
275 | 281 | </fieldset> |
276 | 282 | |
277 | 283 | <dl id="uploadMore" style="display: none;" class="settings">'; |
278 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
279 | - echo ' |
|
284 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
285 | + echo ' |
|
280 | 286 | <dt> |
281 | 287 | ', $txt['smileys_add_upload_for1'], ' <strong>', $smiley_set['name'], '</strong> ', $txt['smileys_add_upload_for2'], ': |
282 | 288 | </dt> |
283 | 289 | <dd> |
284 | 290 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');" class="input_file"> |
285 | 291 | </dd>'; |
292 | + } |
|
286 | 293 | echo ' |
287 | 294 | </dl> |
288 | 295 | </div> |
@@ -351,24 +358,27 @@ discard block |
||
351 | 358 | <strong>', empty($context['move_smiley']) ? $txt['smileys_move_select_smiley'] : $txt['smileys_move_select_destination'], '...</strong><br>'; |
352 | 359 | foreach ($location['rows'] as $row) |
353 | 360 | { |
354 | - if (!empty($context['move_smiley'])) |
|
355 | - echo ' |
|
361 | + if (!empty($context['move_smiley'])) { |
|
362 | + echo ' |
|
356 | 363 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
364 | + } |
|
357 | 365 | |
358 | 366 | foreach ($row as $smiley) |
359 | 367 | { |
360 | - if (empty($context['move_smiley'])) |
|
361 | - echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>'; |
|
362 | - else |
|
363 | - echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
|
368 | + if (empty($context['move_smiley'])) { |
|
369 | + echo '<a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px; border: 0px solid black;" alt="', $smiley['description'], '"></a>'; |
|
370 | + } else { |
|
371 | + echo '<img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" style="padding: 2px;', $smiley['selected'] ? ' border: 2px solid red' : '', ';" alt="', $smiley['description'], '"><a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
|
372 | + } |
|
364 | 373 | } |
365 | 374 | |
366 | 375 | echo ' |
367 | 376 | <br>'; |
368 | 377 | } |
369 | - if (!empty($context['move_smiley'])) |
|
370 | - echo ' |
|
378 | + if (!empty($context['move_smiley'])) { |
|
379 | + echo ' |
|
371 | 380 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
381 | + } |
|
372 | 382 | echo ' |
373 | 383 | </div> |
374 | 384 | <input type="hidden" name="reorder" value="1"> |
@@ -404,14 +414,15 @@ discard block |
||
404 | 414 | </div> |
405 | 415 | <div class="windowbg2"> |
406 | 416 | <dl class="settings">'; |
407 | - if (!$context['new_icon']) |
|
408 | - echo ' |
|
417 | + if (!$context['new_icon']) { |
|
418 | + echo ' |
|
409 | 419 | <dt> |
410 | 420 | <strong>', $txt['smiley_preview'], ': </strong> |
411 | 421 | </dt> |
412 | 422 | <dd> |
413 | 423 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
414 | 424 | </dd>'; |
425 | + } |
|
415 | 426 | echo ' |
416 | 427 | <dt> |
417 | 428 | <strong><label for="icon_filename">', $txt['smileys_filename'], '</label>: </strong><br><span class="smalltext">', $txt['icons_filename_all_png'], '</span> |
@@ -436,9 +447,10 @@ discard block |
||
436 | 447 | { |
437 | 448 | echo ' |
438 | 449 | <optgroup label="', $category['name'], '">'; |
439 | - foreach ($category['boards'] as $board) |
|
440 | - echo ' |
|
450 | + foreach ($category['boards'] as $board) { |
|
451 | + echo ' |
|
441 | 452 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
453 | + } |
|
442 | 454 | echo ' |
443 | 455 | </optgroup>'; |
444 | 456 | } |
@@ -453,19 +465,21 @@ discard block |
||
453 | 465 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
454 | 466 | |
455 | 467 | // Print the list of all the icons it can be put after... |
456 | - foreach ($context['icons'] as $id => $data) |
|
457 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
468 | + foreach ($context['icons'] as $id => $data) { |
|
469 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
458 | 470 | echo ' |
459 | 471 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
472 | + } |
|
460 | 473 | |
461 | 474 | echo ' |
462 | 475 | </select> |
463 | 476 | </dd> |
464 | 477 | </dl>'; |
465 | 478 | |
466 | - if (!$context['new_icon']) |
|
467 | - echo ' |
|
479 | + if (!$context['new_icon']) { |
|
480 | + echo ' |
|
468 | 481 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
482 | + } |
|
469 | 483 | |
470 | 484 | echo ' |
471 | 485 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button_submit"> |
@@ -80,7 +80,7 @@ |
||
80 | 80 | </h3> |
81 | 81 | </div> |
82 | 82 | <div class="windowbg"> |
83 | - <p>', $txt['package_ftp_why'],'</p> |
|
83 | + <p>', $txt['package_ftp_why'], '</p> |
|
84 | 84 | <dl class="settings"> |
85 | 85 | <dt |
86 | 86 | <label for="ftp_server">', $txt['package_ftp_server'], ':</label> |
@@ -36,11 +36,12 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | // An error? |
39 | - if (!empty($context['error_message'])) |
|
40 | - echo ' |
|
39 | + if (!empty($context['error_message'])) { |
|
40 | + echo ' |
|
41 | 41 | <div class="errorbox"> |
42 | 42 | ', $context['error_message'], ' |
43 | 43 | </div>'; |
44 | + } |
|
44 | 45 | |
45 | 46 | // Provide something of an introduction... |
46 | 47 | echo ' |
@@ -67,11 +68,12 @@ discard block |
||
67 | 68 | // If the files are not writable, we might! |
68 | 69 | if (!empty($context['still_not_writable'])) |
69 | 70 | { |
70 | - if (!empty($context['package_ftp']['error'])) |
|
71 | - echo ' |
|
71 | + if (!empty($context['package_ftp']['error'])) { |
|
72 | + echo ' |
|
72 | 73 | <div class="errorbox"> |
73 | 74 | ', $context['package_ftp']['error'], ' |
74 | 75 | </div>'; |
76 | + } |
|
75 | 77 | |
76 | 78 | echo ' |
77 | 79 | <div class="cat_bar"> |
@@ -243,11 +245,12 @@ discard block |
||
243 | 245 | |
244 | 246 | // Is it not writable? |
245 | 247 | // Show an error. |
246 | - if (!empty($context['entries_not_writable_message'])) |
|
247 | - echo ' |
|
248 | + if (!empty($context['entries_not_writable_message'])) { |
|
249 | + echo ' |
|
248 | 250 | <div class="errorbox"> |
249 | 251 | ', $context['entries_not_writable_message'], ' |
250 | 252 | </div>'; |
253 | + } |
|
251 | 254 | |
252 | 255 | // Already have some file entries? |
253 | 256 | if (!empty($context['file_entries'])) |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | echo ' |
65 | 65 | <div class="cat_bar"> |
66 | 66 | <h3 class="catbg"> |
67 | - <a href="', $scripturl, '?action=helpadmin;help=error_log" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'],'"></span></a> ', $txt['errlog'], ' |
|
67 | + <a href="', $scripturl, '?action=helpadmin;help=error_log" onclick="return reqOverlayDiv(this.href);" class="help"><span class="generic_icons help" title="', $txt['help'], '"></span></a> ', $txt['errlog'], ' |
|
68 | 68 | </h3> |
69 | 69 | </div> |
70 | 70 | <div class="pagesection"> |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | ', $context['page_index'], ' |
73 | 73 | </div> |
74 | 74 | <div class="floatright"> |
75 | - <input type="submit" name="removeSelection" value="', $txt['remove_selection'] ,'" data-confirm="', $txt['remove_selection_confirm'] ,'" class="button_submit you_sure"> |
|
76 | - <input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']) ,'" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']) ,'" class="button_submit you_sure"> |
|
75 | + <input type="submit" name="removeSelection" value="', $txt['remove_selection'], '" data-confirm="', $txt['remove_selection_confirm'], '" class="button_submit you_sure"> |
|
76 | + <input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']), '" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']), '" class="button_submit you_sure"> |
|
77 | 77 | </div> |
78 | 78 | </div> |
79 | 79 | <table class="table_grid" id="error_log"> |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | ', $context['page_index'], ' |
185 | 185 | </div> |
186 | 186 | <div class="floatright"> |
187 | - <input type="submit" name="removeSelection" value="', $txt['remove_selection'] ,'" data-confirm="', $txt['remove_selection_confirm'] ,'" class="button_submit you_sure"> |
|
188 | - <input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']) ,'" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']) ,'" class="button_submit you_sure"> |
|
187 | + <input type="submit" name="removeSelection" value="', $txt['remove_selection'], '" data-confirm="', $txt['remove_selection_confirm'], '" class="button_submit you_sure"> |
|
188 | + <input type="submit" name="delall" value="', ($context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all']), '" data-confirm="', ($context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove']), '" class="button_submit you_sure"> |
|
189 | 189 | </div> |
190 | 190 | </div> |
191 | 191 | <br>'; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | <head> |
216 | 216 | <meta charset="', $context['character_set'], '"> |
217 | 217 | <title>', $context['file_data']['file'], '</title> |
218 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
218 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
219 | 219 | </head> |
220 | 220 | <body> |
221 | 221 | <table class="errorfile_table">'; |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | $is_target = $line_num == $context['file_data']['target']; |
226 | 226 | echo ' |
227 | 227 | <tr> |
228 | - <td class="righttext', $is_target ? ' current">==>' : '">', $line_num , ':</td> |
|
229 | - <td style="white-space: nowrap;', $is_target ? ' border: 1px solid black;border-width: 1px 1px 1px 0;':'','">', $line, '</td> |
|
228 | + <td class="righttext', $is_target ? ' current">==>' : '">', $line_num, ':</td> |
|
229 | + <td style="white-space: nowrap;', $is_target ? ' border: 1px solid black;border-width: 1px 1px 1px 0;' : '', '">', $line, '</td> |
|
230 | 230 | </tr>'; |
231 | 231 | } |
232 | 232 | echo ' |
@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | { |
24 | 24 | global $context, $txt; |
25 | 25 | |
26 | - if (!empty($context['simple_action'])) |
|
27 | - echo ' |
|
26 | + if (!empty($context['simple_action'])) { |
|
27 | + echo ' |
|
28 | 28 | <strong> |
29 | 29 | ', $context['error_title'], ' |
30 | 30 | </strong><br> |
31 | 31 | <div ', $context['error_code'], 'class="padding">', $context['error_message'], '</div>'; |
32 | - else |
|
32 | + } else |
|
33 | 33 | { |
34 | 34 | echo ' |
35 | 35 | <div id="fatal_error"> |
@@ -82,21 +82,23 @@ discard block |
||
82 | 82 | ', $txt['apply_filter_of_type'], ':'; |
83 | 83 | |
84 | 84 | $error_types = array(); |
85 | - foreach ($context['error_types'] as $type => $details) |
|
86 | - $error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>'; |
|
85 | + foreach ($context['error_types'] as $type => $details) { |
|
86 | + $error_types[] = ($details['is_selected'] ? '<img src="' . $settings['images_url'] . '/selected.png" alt=""> ' : '') . '<a href="' . $details['url'] . '" ' . ($details['is_selected'] ? 'style="font-weight: bold;"' : '') . ' title="' . $details['description'] . '">' . $details['label'] . '</a>'; |
|
87 | + } |
|
87 | 88 | |
88 | 89 | echo ' |
89 | 90 | ', implode(' | ', $error_types), ' |
90 | 91 | </td> |
91 | 92 | </tr>'; |
92 | 93 | |
93 | - if ($context['has_filter']) |
|
94 | - echo ' |
|
94 | + if ($context['has_filter']) { |
|
95 | + echo ' |
|
95 | 96 | <tr> |
96 | 97 | <td colspan="3" class="windowbg"> |
97 | 98 | <strong> ', $txt['applying_filter'], ':</strong> ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' [<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', '">', $txt['clear_filter'], '</a>] |
98 | 99 | </td> |
99 | 100 | </tr>'; |
101 | + } |
|
100 | 102 | |
101 | 103 | echo ' |
102 | 104 | <tr> |
@@ -107,11 +109,12 @@ discard block |
||
107 | 109 | </tr>'; |
108 | 110 | |
109 | 111 | // No errors, then show a message |
110 | - if (count($context['errors']) == 0) |
|
111 | - echo ' |
|
112 | + if (count($context['errors']) == 0) { |
|
113 | + echo ' |
|
112 | 114 | <tr class="windowbg"> |
113 | 115 | <td class="centertext" colspan="2">', $txt['errlog_no_entries'], '</td> |
114 | 116 | </tr>'; |
117 | + } |
|
115 | 118 | |
116 | 119 | // we have some errors, must be some mods installed :P |
117 | 120 | foreach ($context['errors'] as $error) |
@@ -126,20 +129,22 @@ discard block |
||
126 | 129 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? '' : ';desc', $context['has_filter'] ? $context['filter']['href'] : '', '" title="', $txt['reverse_direction'], '"><span class="generic_icons sort_' . $context['sort_direction'] . '"></span></a> |
127 | 130 | ', $error['time'], '<br>'; |
128 | 131 | |
129 | - if (!empty($error['member']['ip'])) |
|
130 | - echo ' |
|
132 | + if (!empty($error['member']['ip'])) { |
|
133 | + echo ' |
|
131 | 134 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=ip;value=', $error['member']['ip'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_ip'], '"><span class="generic_icons filter centericon"></span></a> |
132 | 135 | <strong><a href="', $scripturl, '?action=trackip;searchip=', $error['member']['ip'], '">', $error['member']['ip'], '</a></strong> <br>'; |
136 | + } |
|
133 | 137 | |
134 | 138 | echo ' |
135 | 139 | </div> |
136 | 140 | |
137 | 141 | <div style="float: left; width: 50%; line-height: 1.8em; padding: 0 4px;">'; |
138 | 142 | |
139 | - if ($error['member']['session'] != '') |
|
140 | - echo ' |
|
143 | + if ($error['member']['session'] != '') { |
|
144 | + echo ' |
|
141 | 145 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=session;value=', $error['member']['session'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_session'], '"><span class="generic_icons filter centericon"></span></a> |
142 | 146 | ', $error['member']['session'], '<br>'; |
147 | + } |
|
143 | 148 | |
144 | 149 | echo ' |
145 | 150 | <a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=error_type;value=', $error['error_type']['type'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '"><span class="generic_icons filter centericon"></span></a> |
@@ -153,8 +158,8 @@ discard block |
||
153 | 158 | <a style="display: table-cell;" href="', $error['url']['html'], '">', $error['url']['html'], '</a> |
154 | 159 | </div>'; |
155 | 160 | |
156 | - if (!empty($error['file'])) |
|
157 | - echo ' |
|
161 | + if (!empty($error['file'])) { |
|
162 | + echo ' |
|
158 | 163 | <div style="float: left; width: 100%; padding: 4px 0; line-height: 1.6em; border-top: 1px solid #e3e3e3;"> |
159 | 164 | <a style="display: table-cell; padding: 4px; width: 20px; vertical-align: top;" href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=file;value=', $error['file']['search'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_file'], '"><span class="generic_icons filter"></span></a> |
160 | 165 | <div> |
@@ -162,6 +167,7 @@ discard block |
||
162 | 167 | ', $txt['line'], ': ', $error['file']['line'], ' |
163 | 168 | </div> |
164 | 169 | </div>'; |
170 | + } |
|
165 | 171 | |
166 | 172 | echo ' |
167 | 173 | </td> |
@@ -190,9 +196,10 @@ discard block |
||
190 | 196 | </div> |
191 | 197 | <br>'; |
192 | 198 | |
193 | - if ($context['sort_direction'] == 'down') |
|
194 | - echo ' |
|
199 | + if ($context['sort_direction'] == 'down') { |
|
200 | + echo ' |
|
195 | 201 | <input type="hidden" name="desc" value="1">'; |
202 | + } |
|
196 | 203 | |
197 | 204 | echo ' |
198 | 205 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">'; |
@@ -220,7 +220,7 @@ |
||
220 | 220 | ), |
221 | 221 | ), |
222 | 222 | ); |
223 | - */ |
|
223 | + */ |
|
224 | 224 | |
225 | 225 | // Are we using right-to-left orientation? |
226 | 226 | $first = $context['right_to_left'] ? 'last' : 'first'; |
@@ -21,26 +21,30 @@ discard block |
||
21 | 21 | |
22 | 22 | // Get a shortcut to the current list. |
23 | 23 | $list_id = $list_id === null ? (!empty($context['default_list']) ? $context['default_list'] : '') : $list_id; |
24 | - if (empty($list_id) || empty($context[$list_id])) |
|
25 | - return; |
|
24 | + if (empty($list_id) || empty($context[$list_id])) { |
|
25 | + return; |
|
26 | + } |
|
26 | 27 | $cur_list = &$context[$list_id]; |
27 | 28 | |
28 | 29 | // These are the main tabs that is used all around the template. |
29 | - if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) |
|
30 | - template_create_list_menu($cur_list['list_menu'], 'top'); |
|
30 | + if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) { |
|
31 | + template_create_list_menu($cur_list['list_menu'], 'top'); |
|
32 | + } |
|
31 | 33 | |
32 | - if (isset($cur_list['form'])) |
|
33 | - echo ' |
|
34 | + if (isset($cur_list['form'])) { |
|
35 | + echo ' |
|
34 | 36 | <form action="', $cur_list['form']['href'], '" method="post"', empty($cur_list['form']['name']) ? '' : ' name="' . $cur_list['form']['name'] . '" id="' . $cur_list['form']['name'] . '"', ' accept-charset="', $context['character_set'], '">'; |
37 | + } |
|
35 | 38 | |
36 | 39 | // Show the title of the table (if any). |
37 | - if (!empty($cur_list['title'])) |
|
38 | - echo ' |
|
40 | + if (!empty($cur_list['title'])) { |
|
41 | + echo ' |
|
39 | 42 | <div class="cat_bar"> |
40 | 43 | <h3 class="catbg"> |
41 | 44 | ', $cur_list['title'], ' |
42 | 45 | </h3> |
43 | 46 | </div>'; |
47 | + } |
|
44 | 48 | |
45 | 49 | if (isset($cur_list['additional_rows']['after_title'])) |
46 | 50 | { |
@@ -51,20 +55,23 @@ discard block |
||
51 | 55 | </div>'; |
52 | 56 | } |
53 | 57 | |
54 | - if (isset($cur_list['additional_rows']['top_of_list'])) |
|
55 | - template_additional_rows('top_of_list', $cur_list); |
|
58 | + if (isset($cur_list['additional_rows']['top_of_list'])) { |
|
59 | + template_additional_rows('top_of_list', $cur_list); |
|
60 | + } |
|
56 | 61 | |
57 | 62 | if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['above_column_headers'])) |
58 | 63 | { |
59 | 64 | // Show the page index (if this list doesn't intend to show all items). |
60 | - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) |
|
61 | - echo ' |
|
65 | + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { |
|
66 | + echo ' |
|
62 | 67 | <div class="floatleft"> |
63 | 68 | <div class="pagesection">', $cur_list['page_index'], '</div> |
64 | 69 | </div>'; |
70 | + } |
|
65 | 71 | |
66 | - if (isset($cur_list['additional_rows']['above_column_headers'])) |
|
67 | - template_additional_rows('above_column_headers', $cur_list); |
|
72 | + if (isset($cur_list['additional_rows']['above_column_headers'])) { |
|
73 | + template_additional_rows('above_column_headers', $cur_list); |
|
74 | + } |
|
68 | 75 | } |
69 | 76 | |
70 | 77 | echo ' |
@@ -94,11 +101,12 @@ discard block |
||
94 | 101 | <tbody>'; |
95 | 102 | |
96 | 103 | // Show a nice message informing there are no items in this list. |
97 | - if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) |
|
98 | - echo ' |
|
104 | + if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) { |
|
105 | + echo ' |
|
99 | 106 | <tr class="windowbg"> |
100 | 107 | <td colspan="', $cur_list['num_columns'], '" class="', !empty($cur_list['no_items_align']) ? $cur_list['no_items_align'] : 'centertext', '">', $cur_list['no_items_label'], '</td> |
101 | 108 | </tr>'; |
109 | + } |
|
102 | 110 | |
103 | 111 | // Show the list rows. |
104 | 112 | elseif (!empty($cur_list['rows'])) |
@@ -108,10 +116,11 @@ discard block |
||
108 | 116 | echo ' |
109 | 117 | <tr class="windowbg', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', ' id="list_', $list_id, '_', $id, '">'; |
110 | 118 | |
111 | - if (!empty($row['data'])) |
|
112 | - foreach ($row['data'] as $row_data) |
|
119 | + if (!empty($row['data'])) { |
|
120 | + foreach ($row['data'] as $row_data) |
|
113 | 121 | echo ' |
114 | 122 | <td', empty($row_data['class']) ? '' : ' class="' . $row_data['class'] . '"', empty($row_data['style']) ? '' : ' style="' . $row_data['style'] . '"', '>', $row_data['value'], '</td>'; |
123 | + } |
|
115 | 124 | |
116 | 125 | echo ' |
117 | 126 | </tr>'; |
@@ -128,46 +137,53 @@ discard block |
||
128 | 137 | <div class="flow_auto">'; |
129 | 138 | |
130 | 139 | // Show the page index (if this list doesn't intend to show all items). |
131 | - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) |
|
132 | - echo ' |
|
140 | + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { |
|
141 | + echo ' |
|
133 | 142 | <div class="floatleft"> |
134 | 143 | <div class="pagesection">', $cur_list['page_index'], '</div> |
135 | 144 | </div>'; |
145 | + } |
|
136 | 146 | |
137 | - if (isset($cur_list['additional_rows']['below_table_data'])) |
|
138 | - template_additional_rows('below_table_data', $cur_list); |
|
147 | + if (isset($cur_list['additional_rows']['below_table_data'])) { |
|
148 | + template_additional_rows('below_table_data', $cur_list); |
|
149 | + } |
|
139 | 150 | |
140 | 151 | echo ' |
141 | 152 | </div>'; |
142 | 153 | } |
143 | 154 | |
144 | - if (isset($cur_list['additional_rows']['bottom_of_list'])) |
|
145 | - template_additional_rows('bottom_of_list', $cur_list); |
|
155 | + if (isset($cur_list['additional_rows']['bottom_of_list'])) { |
|
156 | + template_additional_rows('bottom_of_list', $cur_list); |
|
157 | + } |
|
146 | 158 | |
147 | 159 | if (isset($cur_list['form'])) |
148 | 160 | { |
149 | - foreach ($cur_list['form']['hidden_fields'] as $name => $value) |
|
150 | - echo ' |
|
161 | + foreach ($cur_list['form']['hidden_fields'] as $name => $value) { |
|
162 | + echo ' |
|
151 | 163 | <input type="hidden" name="', $name, '" value="', $value, '">'; |
164 | + } |
|
152 | 165 | |
153 | - if (isset($cur_list['form']['token'])) |
|
154 | - echo ' |
|
166 | + if (isset($cur_list['form']['token'])) { |
|
167 | + echo ' |
|
155 | 168 | <input type="hidden" name="', $context[$cur_list['form']['token'] . '_token_var'], '" value="', $context[$cur_list['form']['token'] . '_token'], '">'; |
169 | + } |
|
156 | 170 | |
157 | 171 | echo ' |
158 | 172 | </form>'; |
159 | 173 | } |
160 | 174 | |
161 | 175 | // Tabs at the bottom. Usually bottom aligned. |
162 | - if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) |
|
163 | - template_create_list_menu($cur_list['list_menu'], 'bottom'); |
|
176 | + if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) { |
|
177 | + template_create_list_menu($cur_list['list_menu'], 'bottom'); |
|
178 | + } |
|
164 | 179 | |
165 | - if (isset($cur_list['javascript'])) |
|
166 | - echo ' |
|
180 | + if (isset($cur_list['javascript'])) { |
|
181 | + echo ' |
|
167 | 182 | <script> |
168 | 183 | ', $cur_list['javascript'], ' |
169 | 184 | </script>'; |
170 | -} |
|
185 | + } |
|
186 | + } |
|
171 | 187 | |
172 | 188 | /** |
173 | 189 | * This template displays additional rows above or below the list. |
@@ -177,10 +193,11 @@ discard block |
||
177 | 193 | */ |
178 | 194 | function template_additional_rows($row_position, $cur_list) |
179 | 195 | { |
180 | - foreach ($cur_list['additional_rows'][$row_position] as $row) |
|
181 | - echo ' |
|
196 | + foreach ($cur_list['additional_rows'][$row_position] as $row) { |
|
197 | + echo ' |
|
182 | 198 | <div class="additional_row', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', '>', $row['value'], '</div>'; |
183 | -} |
|
199 | + } |
|
200 | + } |
|
184 | 201 | |
185 | 202 | /** |
186 | 203 | * This function creates a menu |
@@ -239,18 +256,19 @@ discard block |
||
239 | 256 | |
240 | 257 | foreach ($list_menu['links'] as $link) |
241 | 258 | { |
242 | - if ($link['is_selected']) |
|
243 | - echo ' |
|
259 | + if ($link['is_selected']) { |
|
260 | + echo ' |
|
244 | 261 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $first, '"> </td> |
245 | 262 | <td class="', $direction == 'top' ? 'mirrortab' : 'maintab', '_active_back"> |
246 | 263 | <a href="', $link['href'], '">', $link['label'], '</a> |
247 | 264 | </td> |
248 | 265 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $last, '"> </td>'; |
249 | - else |
|
250 | - echo ' |
|
266 | + } else { |
|
267 | + echo ' |
|
251 | 268 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_back"> |
252 | 269 | <a href="', $link['href'], '">', $link['label'], '</a> |
253 | 270 | </td>'; |
271 | + } |
|
254 | 272 | } |
255 | 273 | |
256 | 274 | echo ' |
@@ -261,12 +279,12 @@ discard block |
||
261 | 279 | <td> </td>' : '', ' |
262 | 280 | </tr> |
263 | 281 | </table>'; |
264 | - } |
|
265 | - elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons') |
|
282 | + } elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons') |
|
266 | 283 | { |
267 | 284 | $links = array(); |
268 | - foreach ($list_menu['links'] as $link) |
|
269 | - $links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>'; |
|
285 | + foreach ($list_menu['links'] as $link) { |
|
286 | + $links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>'; |
|
287 | + } |
|
270 | 288 | |
271 | 289 | echo ' |
272 | 290 | <table style="margin-', $list_menu['position'], ': 10px; width: 100%;"> |
@@ -1,9 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
6 | +} else { |
|
7 | 7 | exit; |
8 | +} |
|
8 | 9 | |
9 | 10 | ?> |
10 | 11 | \ No newline at end of file |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | foreach ($context['news_lines'] as $news) |
35 | 35 | { |
36 | 36 | echo ' |
37 | - <li>', $news,'</li>'; |
|
37 | + <li>', $news, '</li>'; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | echo ' |
41 | 41 | </ul> |
42 | 42 | <script> |
43 | 43 | jQuery("#smf_slider").slippry({ |
44 | - pause: ', $settings['newsfader_time'],', |
|
44 | + pause: ', $settings['newsfader_time'], ', |
|
45 | 45 | adaptiveHeight: 0, |
46 | 46 | captions: 0, |
47 | 47 | controls: 0, |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | // If this category even can collapse, show a link to collapse it. |
79 | 79 | if ($category['can_collapse']) |
80 | 80 | echo ' |
81 | - <span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'] ,'" style="display: none;"></span>'; |
|
81 | + <span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>'; |
|
82 | 82 | |
83 | 83 | echo ' |
84 | 84 | ', $category['link'], ' |
85 | 85 | </h3>', !empty($category['description']) ? ' |
86 | 86 | <div class="desc">' . $category['description'] . '</div>' : '', ' |
87 | 87 | </div> |
88 | - <div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="'. $category['css_class'] .'"') : '') ,'>'; |
|
88 | + <div id="category_', $category['id'], '_boards" ', (!empty($category['css_class']) ? ('class="' . $category['css_class'] . '"') : ''), '>'; |
|
89 | 89 | |
90 | 90 | /* Each board in each category's boards has: |
91 | 91 | new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.), |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | foreach ($category['boards'] as $board) |
95 | 95 | { |
96 | 96 | echo ' |
97 | - <div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : '') ,'"> |
|
97 | + <div id="board_', $board['id'], '" class="up_contain ', (!empty($board['css_class']) ? $board['css_class'] : ''), '"> |
|
98 | 98 | <div class="board_icon"> |
99 | 99 | <a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '" class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></a> |
100 | 100 | </div> |
101 | 101 | <div class="info"> |
102 | 102 | <a class="subject mobile_subject" href="', $board['href'], '" id="b', $board['id'], '"> |
103 | 103 | ', $board['name'], ' |
104 | - <p class="board_description mobile_display">', $board['description'] , '</p> |
|
104 | + <p class="board_description mobile_display">', $board['description'], '</p> |
|
105 | 105 | </a>'; |
106 | 106 | |
107 | 107 | // Has it outstanding posts for approval? |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>'; |
111 | 111 | |
112 | 112 | echo ' |
113 | - <p class="board_description">', $board['description'] , '</p>'; |
|
113 | + <p class="board_description">', $board['description'], '</p>'; |
|
114 | 114 | |
115 | 115 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
116 | 116 | if (!empty($board['link_moderators'])) |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | ', $board['is_redirect'] ? '' : '<br> ' . comma_format($board['topics']) . ' ' . $txt['board_topics'], ' |
126 | 126 | </p> |
127 | 127 | </div> |
128 | - <div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden','">'; |
|
128 | + <div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden', '">'; |
|
129 | 129 | |
130 | 130 | if (!empty($board['last_post']['id'])) |
131 | 131 | echo ' |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | </h4> |
375 | 375 | </div> |
376 | 376 | <p class="inline"> |
377 | - ', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - '. $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br> |
|
377 | + ', $context['common_stats']['boardindex_total_posts'], '', !empty($settings['show_latest_member']) ? ' - ' . $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br> |
|
378 | 378 | ', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> (' . $context['latest_post']['time'] . ')<br>' : ''), ' |
379 | 379 | <a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a> |
380 | 380 | </p>'; |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | // Showing membergroups? |
423 | 423 | if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) |
424 | 424 | echo ' |
425 | - <span class="membergroups">' . implode(', ', $context['membergroups']). '</span>'; |
|
425 | + <span class="membergroups">' . implode(', ', $context['membergroups']) . '</span>'; |
|
426 | 426 | } |
427 | 427 | |
428 | 428 | echo ' |
@@ -67,8 +67,9 @@ discard block |
||
67 | 67 | foreach ($context['categories'] as $category) |
68 | 68 | { |
69 | 69 | // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed) |
70 | - if (empty($category['boards']) && !$category['is_collapsed']) |
|
71 | - continue; |
|
70 | + if (empty($category['boards']) && !$category['is_collapsed']) { |
|
71 | + continue; |
|
72 | + } |
|
72 | 73 | |
73 | 74 | echo ' |
74 | 75 | <div class="main_container"> |
@@ -76,9 +77,10 @@ discard block |
||
76 | 77 | <h3 class="catbg">'; |
77 | 78 | |
78 | 79 | // If this category even can collapse, show a link to collapse it. |
79 | - if ($category['can_collapse']) |
|
80 | - echo ' |
|
80 | + if ($category['can_collapse']) { |
|
81 | + echo ' |
|
81 | 82 | <span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'] ,'" style="display: none;"></span>'; |
83 | + } |
|
82 | 84 | |
83 | 85 | echo ' |
84 | 86 | ', $category['link'], ' |
@@ -105,17 +107,19 @@ discard block |
||
105 | 107 | </a>'; |
106 | 108 | |
107 | 109 | // Has it outstanding posts for approval? |
108 | - if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) |
|
109 | - echo ' |
|
110 | + if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) { |
|
111 | + echo ' |
|
110 | 112 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>'; |
113 | + } |
|
111 | 114 | |
112 | 115 | echo ' |
113 | 116 | <p class="board_description">', $board['description'] , '</p>'; |
114 | 117 | |
115 | 118 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
116 | - if (!empty($board['link_moderators'])) |
|
117 | - echo ' |
|
119 | + if (!empty($board['link_moderators'])) { |
|
120 | + echo ' |
|
118 | 121 | <p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>'; |
122 | + } |
|
119 | 123 | |
120 | 124 | // Show some basic information about the number of posts, etc. |
121 | 125 | echo ' |
@@ -127,9 +131,10 @@ discard block |
||
127 | 131 | </div> |
128 | 132 | <div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden','">'; |
129 | 133 | |
130 | - if (!empty($board['last_post']['id'])) |
|
131 | - echo ' |
|
134 | + if (!empty($board['last_post']['id'])) { |
|
135 | + echo ' |
|
132 | 136 | <p>', $board['last_post']['last_post_message'], '</p>'; |
137 | + } |
|
133 | 138 | echo ' |
134 | 139 | </div>'; |
135 | 140 | // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) |
@@ -141,14 +146,16 @@ discard block |
||
141 | 146 | id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ |
142 | 147 | foreach ($board['children'] as $child) |
143 | 148 | { |
144 | - if (!$child['is_redirect']) |
|
145 | - $child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>'; |
|
146 | - else |
|
147 | - $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>'; |
|
149 | + if (!$child['is_redirect']) { |
|
150 | + $child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>'; |
|
151 | + } else { |
|
152 | + $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>'; |
|
153 | + } |
|
148 | 154 | |
149 | 155 | // Has it posts awaiting approval? |
150 | - if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) |
|
151 | - $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
156 | + if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) { |
|
157 | + $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
158 | + } |
|
152 | 159 | |
153 | 160 | $children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link']; |
154 | 161 | } |
@@ -172,10 +179,11 @@ discard block |
||
172 | 179 | </div>'; |
173 | 180 | |
174 | 181 | // Show the mark all as read button? |
175 | - if ($context['user']['is_logged'] && !empty($context['categories'])) |
|
176 | - echo ' |
|
182 | + if ($context['user']['is_logged'] && !empty($context['categories'])) { |
|
183 | + echo ' |
|
177 | 184 | <div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>'; |
178 | -} |
|
185 | + } |
|
186 | + } |
|
179 | 187 | |
180 | 188 | /** |
181 | 189 | * The lower part of the outer layer of the board index |
@@ -192,8 +200,9 @@ discard block |
||
192 | 200 | { |
193 | 201 | global $context, $options, $txt; |
194 | 202 | |
195 | - if (empty($context['info_center'])) |
|
196 | - return; |
|
203 | + if (empty($context['info_center'])) { |
|
204 | + return; |
|
205 | + } |
|
197 | 206 | |
198 | 207 | // Here's where the "Info Center" starts... |
199 | 208 | echo ' |
@@ -293,14 +302,15 @@ discard block |
||
293 | 302 | /* Each post in latest_posts has: |
294 | 303 | board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), |
295 | 304 | subject, short_subject (shortened with...), time, link, and href. */ |
296 | - foreach ($context['latest_posts'] as $post) |
|
297 | - echo ' |
|
305 | + foreach ($context['latest_posts'] as $post) { |
|
306 | + echo ' |
|
298 | 307 | <tr class="windowbg"> |
299 | 308 | <td class="recentpost"><strong>', $post['link'], '</strong></td> |
300 | 309 | <td class="recentposter">', $post['poster']['link'], '</td> |
301 | 310 | <td class="recentboard">', $post['board']['link'], '</td> |
302 | 311 | <td class="recenttime">', $post['time'], '</td> |
303 | 312 | </tr>'; |
313 | + } |
|
304 | 314 | echo ' |
305 | 315 | </table>'; |
306 | 316 | } |
@@ -324,9 +334,10 @@ discard block |
||
324 | 334 | </div>'; |
325 | 335 | |
326 | 336 | // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. |
327 | - if (!empty($context['calendar_holidays'])) |
|
328 | - echo ' |
|
337 | + if (!empty($context['calendar_holidays'])) { |
|
338 | + echo ' |
|
329 | 339 | <p class="inline holiday"><span>', $txt['calendar_prompt'], '</span> ', implode(', ', $context['calendar_holidays']), '</p>'; |
340 | + } |
|
330 | 341 | |
331 | 342 | // People's birthdays. Like mine. And yours, I guess. Kidding. |
332 | 343 | if (!empty($context['calendar_birthdays'])) |
@@ -335,9 +346,10 @@ discard block |
||
335 | 346 | <p class="inline"> |
336 | 347 | <span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>'; |
337 | 348 | // 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?) |
338 | - foreach ($context['calendar_birthdays'] as $member) |
|
339 | - echo ' |
|
349 | + foreach ($context['calendar_birthdays'] as $member) { |
|
350 | + echo ' |
|
340 | 351 | <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', '; |
352 | + } |
|
341 | 353 | echo ' |
342 | 354 | </p>'; |
343 | 355 | } |
@@ -351,9 +363,10 @@ discard block |
||
351 | 363 | |
352 | 364 | // Each event in calendar_events should have: |
353 | 365 | // title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. |
354 | - foreach ($context['calendar_events'] as $event) |
|
355 | - echo ' |
|
366 | + foreach ($context['calendar_events'] as $event) { |
|
367 | + echo ' |
|
356 | 368 | ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><span class="generic_icons calendar_modify"></span></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br>' : ', '; |
369 | + } |
|
357 | 370 | echo ' |
358 | 371 | </p>'; |
359 | 372 | } |
@@ -398,15 +411,19 @@ discard block |
||
398 | 411 | |
399 | 412 | // Handle hidden users and buddies. |
400 | 413 | $bracketList = array(); |
401 | - if ($context['show_buddies']) |
|
402 | - $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
403 | - if (!empty($context['num_spiders'])) |
|
404 | - $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
405 | - if (!empty($context['num_users_hidden'])) |
|
406 | - $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
414 | + if ($context['show_buddies']) { |
|
415 | + $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
416 | + } |
|
417 | + if (!empty($context['num_spiders'])) { |
|
418 | + $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
419 | + } |
|
420 | + if (!empty($context['num_users_hidden'])) { |
|
421 | + $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
422 | + } |
|
407 | 423 | |
408 | - if (!empty($bracketList)) |
|
409 | - echo ' (' . implode(', ', $bracketList) . ')'; |
|
424 | + if (!empty($bracketList)) { |
|
425 | + echo ' (' . implode(', ', $bracketList) . ')'; |
|
426 | + } |
|
410 | 427 | |
411 | 428 | echo $context['show_who'] ? '</a>' : '', ' |
412 | 429 | |
@@ -420,9 +437,10 @@ discard block |
||
420 | 437 | ', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']); |
421 | 438 | |
422 | 439 | // Showing membergroups? |
423 | - if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) |
|
424 | - echo ' |
|
440 | + if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) { |
|
441 | + echo ' |
|
425 | 442 | <span class="membergroups">' . implode(', ', $context['membergroups']). '</span>'; |
443 | + } |
|
426 | 444 | } |
427 | 445 | |
428 | 446 | echo ' |