@@ -514,7 +514,9 @@ discard block |
||
| 514 | 514 | else |
| 515 | 515 | { |
| 516 | 516 | foreach ($this->_searchArray as $index => $value) |
| 517 | - $orParts[$index] = array($value); |
|
| 517 | + { |
|
| 518 | + $orParts[$index] = array($value); |
|
| 519 | + } |
|
| 518 | 520 | } |
| 519 | 521 | |
| 520 | 522 | // Make sure the excluded words are in all or-branches. |
@@ -612,7 +614,9 @@ discard block |
||
| 612 | 614 | } |
| 613 | 615 | |
| 614 | 616 | foreach ($temp_params as $k => $v) |
| 615 | - $encoded[] = $k . '|\'|' . $v; |
|
| 617 | + { |
|
| 618 | + $encoded[] = $k . '|\'|' . $v; |
|
| 619 | + } |
|
| 616 | 620 | |
| 617 | 621 | if (!empty($encoded)) |
| 618 | 622 | { |
@@ -766,12 +770,14 @@ discard block |
||
| 766 | 770 | // Create a list of database-escaped search names. |
| 767 | 771 | $realNameMatches = array(); |
| 768 | 772 | foreach ($possible_users as $possible_user) |
| 769 | - $realNameMatches[] = $this->_db->quote( |
|
| 773 | + { |
|
| 774 | + $realNameMatches[] = $this->_db->quote( |
|
| 770 | 775 | '{string:possible_user}', |
| 771 | 776 | array( |
| 772 | 777 | 'possible_user' => $possible_user |
| 773 | 778 | ) |
| 774 | 779 | ); |
| 780 | + } |
|
| 775 | 781 | |
| 776 | 782 | // Retrieve a list of possible members. |
| 777 | 783 | $request = $this->_db->query('', ' |
@@ -889,7 +895,9 @@ discard block |
||
| 889 | 895 | if (count($this->_search_params['brd']) != 0) |
| 890 | 896 | { |
| 891 | 897 | foreach ($this->_search_params['brd'] as $k => $v) |
| 892 | - $this->_search_params['brd'][$k] = (int) $v; |
|
| 898 | + { |
|
| 899 | + $this->_search_params['brd'][$k] = (int) $v; |
|
| 900 | + } |
|
| 893 | 901 | |
| 894 | 902 | // If we've selected all boards, this parameter can be left empty. |
| 895 | 903 | require_once(SUBSDIR . '/Boards.subs.php'); |
@@ -1510,7 +1518,9 @@ discard block |
||
| 1510 | 1518 | ); |
| 1511 | 1519 | $posters = array(); |
| 1512 | 1520 | while ($row = $this->_db->fetch_assoc($request)) |
| 1513 | - $posters[] = $row['id_member']; |
|
| 1521 | + { |
|
| 1522 | + $posters[] = $row['id_member']; |
|
| 1523 | + } |
|
| 1514 | 1524 | $this->_db->free_result($request); |
| 1515 | 1525 | |
| 1516 | 1526 | return $posters; |
@@ -1957,7 +1967,9 @@ discard block |
||
| 1957 | 1967 | |
| 1958 | 1968 | $usedIDs[$row['id_topic']] = true; |
| 1959 | 1969 | foreach ($row as $key => $value) |
| 1960 | - $inserts[$row['id_topic']][] = (int) $row[$key]; |
|
| 1970 | + { |
|
| 1971 | + $inserts[$row['id_topic']][] = (int) $row[$key]; |
|
| 1972 | + } |
|
| 1961 | 1973 | } |
| 1962 | 1974 | $this->_db->free_result($ignoreRequest); |
| 1963 | 1975 | |
@@ -1966,7 +1978,9 @@ discard block |
||
| 1966 | 1978 | { |
| 1967 | 1979 | $query_columns = array(); |
| 1968 | 1980 | foreach ($main_query['select'] as $k => $v) |
| 1969 | - $query_columns[$k] = 'int'; |
|
| 1981 | + { |
|
| 1982 | + $query_columns[$k] = 'int'; |
|
| 1983 | + } |
|
| 1970 | 1984 | |
| 1971 | 1985 | $this->_db->insert('', |
| 1972 | 1986 | '{db_prefix}log_search_results', |
@@ -803,8 +803,10 @@ |
||
| 803 | 803 | global $txt, $context; |
| 804 | 804 | |
| 805 | 805 | if ($output_method === 'echo') |
| 806 | - echo ' |
|
| 806 | + { |
|
| 807 | + echo ' |
|
| 807 | 808 | ', sprintf($txt['welcome_newest_member'], $context['common_stats']['latest_member']['link']), '<br />'; |
| 809 | + } |
|
| 808 | 810 | else |
| 809 | 811 | { |
| 810 | 812 | return $context['common_stats']['latest_member']; |
@@ -51,7 +51,9 @@ discard block |
||
| 51 | 51 | global $context, $settings, $txt, $options; |
| 52 | 52 | |
| 53 | 53 | if ($context['no_topic_listing']) |
| 54 | - return; |
|
| 54 | + { |
|
| 55 | + return; |
|
| 56 | + } |
|
| 55 | 57 | |
| 56 | 58 | template_pagesection('normal_buttons', 'right'); |
| 57 | 59 | |
@@ -62,14 +64,18 @@ discard block |
||
| 62 | 64 | |
| 63 | 65 | // Show the board description |
| 64 | 66 | if (!empty($context['description'])) |
| 65 | - echo ' |
|
| 67 | + { |
|
| 68 | + echo ' |
|
| 66 | 69 | <div id="boarddescription"> |
| 67 | 70 | ', $context['description'], ' |
| 68 | 71 | </div>'; |
| 72 | + } |
|
| 69 | 73 | |
| 70 | 74 | if (!empty($context['moderators'])) |
| 71 | - echo ' |
|
| 75 | + { |
|
| 76 | + echo ' |
|
| 72 | 77 | <div class="moderators">', count($context['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $context['link_moderators']), '.</div>'; |
| 78 | + } |
|
| 73 | 79 | |
| 74 | 80 | echo ' |
| 75 | 81 | <div id="whoisviewing">'; |
@@ -78,9 +84,12 @@ discard block |
||
| 78 | 84 | if (!empty($settings['display_who_viewing'])) |
| 79 | 85 | { |
| 80 | 86 | if ($settings['display_who_viewing'] == 1) |
| 81 | - echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
| 82 | - else |
|
| 83 | - echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); |
|
| 87 | + { |
|
| 88 | + echo count($context['view_members']), ' ', count($context['view_members']) === 1 ? $txt['who_member'] : $txt['members']; |
|
| 89 | + } |
|
| 90 | + else { |
|
| 91 | + echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); |
|
| 92 | + } |
|
| 84 | 93 | |
| 85 | 94 | echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board']; |
| 86 | 95 | } |
@@ -90,10 +99,12 @@ discard block |
||
| 90 | 99 | <ul id="sort_by" class="topic_sorting">'; |
| 91 | 100 | |
| 92 | 101 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1) |
| 93 | - echo ' |
|
| 102 | + { |
|
| 103 | + echo ' |
|
| 94 | 104 | <li class="listlevel1 quickmod_select_all"> |
| 95 | 105 | <input type="checkbox" onclick="invertAll(this, document.getElementById(\'quickModForm\'), \'topics[]\');" /> |
| 96 | 106 | </li>'; |
| 107 | + } |
|
| 97 | 108 | |
| 98 | 109 | $current_header = $context['topics_headers'][$context['sort_by']]; |
| 99 | 110 | echo ' |
@@ -106,8 +117,10 @@ discard block |
||
| 106 | 117 | <ul class="menulevel2" id="sortby">'; |
| 107 | 118 | |
| 108 | 119 | foreach ($context['topics_headers'] as $key => $value) |
| 109 | - echo ' |
|
| 120 | + { |
|
| 121 | + echo ' |
|
| 110 | 122 | <li class="listlevel2 sort_by_item" id="sort_by_item_', $key, '"><a href="', $value['url'], '" class="linklevel2">', $txt[$key], ' ', $value['sort_dir_img'], '</a></li>'; |
| 123 | + } |
|
| 111 | 124 | |
| 112 | 125 | echo ' |
| 113 | 126 | </ul> |
@@ -129,13 +142,17 @@ discard block |
||
| 129 | 142 | { |
| 130 | 143 | // If Quick Moderation is enabled start the form. |
| 131 | 144 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
| 132 | - echo ' |
|
| 145 | + { |
|
| 146 | + echo ' |
|
| 133 | 147 | <form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="UTF-8" class="clear" name="quickModForm" id="quickModForm">'; |
| 148 | + } |
|
| 134 | 149 | |
| 135 | 150 | // If this person can approve items and we have some awaiting approval tell them. |
| 136 | 151 | if (!empty($context['unapproved_posts_message'])) |
| 137 | - echo ' |
|
| 152 | + { |
|
| 153 | + echo ' |
|
| 138 | 154 | <div class="warningbox">', $context['unapproved_posts_message'], '</div>'; |
| 155 | + } |
|
| 139 | 156 | |
| 140 | 157 | echo ' |
| 141 | 158 | <main> |
@@ -143,7 +160,8 @@ discard block |
||
| 143 | 160 | |
| 144 | 161 | // No topics.... just say, "sorry bub". |
| 145 | 162 | if (empty($context['topics'])) |
| 146 | - echo ' |
|
| 163 | + { |
|
| 164 | + echo ' |
|
| 147 | 165 | <li class="basic_row"> |
| 148 | 166 | <div class="topic_info"> |
| 149 | 167 | <div class="topic_name"> |
@@ -153,24 +171,34 @@ discard block |
||
| 153 | 171 | </div> |
| 154 | 172 | </div> |
| 155 | 173 | </li>'; |
| 174 | + } |
|
| 156 | 175 | |
| 157 | 176 | foreach ($context['topics'] as $topic) |
| 158 | 177 | { |
| 159 | 178 | // Is this topic pending approval, or does it have any posts pending approval? |
| 160 | 179 | if ($context['can_approve_posts'] && $topic['unapproved_posts']) |
| 161 | - $color_class = !$topic['approved'] ? 'approvetopic_row' : 'approve_row'; |
|
| 180 | + { |
|
| 181 | + $color_class = !$topic['approved'] ? 'approvetopic_row' : 'approve_row'; |
|
| 182 | + } |
|
| 162 | 183 | // We start with locked and sticky topics. |
| 163 | 184 | elseif ($topic['is_sticky'] && $topic['is_locked']) |
| 164 | - $color_class = 'locked_row sticky_row'; |
|
| 185 | + { |
|
| 186 | + $color_class = 'locked_row sticky_row'; |
|
| 187 | + } |
|
| 165 | 188 | // Sticky topics should get a different color, too. |
| 166 | 189 | elseif ($topic['is_sticky']) |
| 167 | - $color_class = 'sticky_row'; |
|
| 190 | + { |
|
| 191 | + $color_class = 'sticky_row'; |
|
| 192 | + } |
|
| 168 | 193 | // Locked topics get special treatment as well. |
| 169 | 194 | elseif ($topic['is_locked']) |
| 170 | - $color_class = 'locked_row'; |
|
| 195 | + { |
|
| 196 | + $color_class = 'locked_row'; |
|
| 197 | + } |
|
| 171 | 198 | // Last, but not least: regular topics. |
| 172 | - else |
|
| 173 | - $color_class = 'basic_row'; |
|
| 199 | + else { |
|
| 200 | + $color_class = 'basic_row'; |
|
| 201 | + } |
|
| 174 | 202 | |
| 175 | 203 | echo ' |
| 176 | 204 | <li class="', $color_class, '"> |
@@ -178,8 +206,10 @@ discard block |
||
| 178 | 206 | <p class="topic_icons', empty($modSettings['messageIcons_enable']) ? ' topicicon i-' . $topic['first_post']['icon'] : '', '">'; |
| 179 | 207 | |
| 180 | 208 | if (!empty($modSettings['messageIcons_enable'])) |
| 181 | - echo ' |
|
| 209 | + { |
|
| 210 | + echo ' |
|
| 182 | 211 | <img src="', $topic['first_post']['icon_url'], '" alt="" />'; |
| 212 | + } |
|
| 183 | 213 | |
| 184 | 214 | echo ' |
| 185 | 215 | ', $topic['is_posted_in'] ? '<span class="fred topicicon i-profile"></span>' : '', ' |
@@ -189,12 +219,16 @@ discard block |
||
| 189 | 219 | |
| 190 | 220 | // Is this topic new? (assuming they are logged in!) |
| 191 | 221 | if ($topic['new'] && $context['user']['is_logged']) |
| 192 | - echo ' |
|
| 222 | + { |
|
| 223 | + echo ' |
|
| 193 | 224 | <a class="new_posts" href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '">' . $txt['new'] . '</a>'; |
| 225 | + } |
|
| 194 | 226 | |
| 195 | 227 | // Is this an unapproved topic and they can approve it? |
| 196 | 228 | if ($context['can_approve_posts'] && !$topic['approved']) |
| 197 | - echo '<span class="require_approval">' . $txt['awaiting_approval'] . '</span>'; |
|
| 229 | + { |
|
| 230 | + echo '<span class="require_approval">' . $txt['awaiting_approval'] . '</span>'; |
|
| 231 | + } |
|
| 198 | 232 | |
| 199 | 233 | echo ' |
| 200 | 234 | ', $topic['is_sticky'] ? '<strong>' : '', '<span class="preview" title="', $topic['default_preview'], '"><span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span></span>', $topic['is_sticky'] ? '</strong>' : '', ' |
@@ -212,19 +246,24 @@ discard block |
||
| 212 | 246 | |
| 213 | 247 | // Show likes? |
| 214 | 248 | if (!empty($modSettings['likes_enabled'])) |
| 215 | - echo '<br /> |
|
| 249 | + { |
|
| 250 | + echo '<br /> |
|
| 216 | 251 | ', $topic['likes'], ' ', $txt['likes']; |
| 252 | + } |
|
| 217 | 253 | |
| 218 | 254 | echo ' |
| 219 | 255 | </p> |
| 220 | 256 | <p class="topic_lastpost">'; |
| 221 | 257 | |
| 222 | 258 | if (!empty($topic['last_post']['member']['avatar'])) |
| 223 | - echo ' |
|
| 259 | + { |
|
| 260 | + echo ' |
|
| 224 | 261 | <span class="board_avatar"><a href="', $topic['last_post']['member']['href'], '"><img class="avatar" src="', $topic['last_post']['member']['avatar']['href'], '" alt="" loading="lazy" /></a></span>'; |
| 225 | - else |
|
| 226 | - echo ' |
|
| 262 | + } |
|
| 263 | + else { |
|
| 264 | + echo ' |
|
| 227 | 265 | <span class="board_avatar"><a href="#"></a></span>'; |
| 266 | + } |
|
| 228 | 267 | |
| 229 | 268 | echo ' |
| 230 | 269 | <a class="topicicon i-last_post" href="', $topic['last_post']['href'], '" title="', $txt['last_post'], '"></a> |
@@ -240,25 +279,37 @@ discard block |
||
| 240 | 279 | <p class="topic_moderation', $options['display_quick_mod'] == 1 ? '' : '_alt', '" >'; |
| 241 | 280 | |
| 242 | 281 | if ($options['display_quick_mod'] == 1) |
| 243 | - echo ' |
|
| 282 | + { |
|
| 283 | + echo ' |
|
| 244 | 284 | <input type="checkbox" name="topics[]" value="', $topic['id'], '" />'; |
| 285 | + } |
|
| 245 | 286 | else |
| 246 | 287 | { |
| 247 | 288 | // Check permissions on each and show only the ones they are allowed to use. |
| 248 | 289 | if ($topic['quick_mod']['remove']) |
| 249 | - echo '<a class="topicicon i-remove" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt['remove_topic'], '"></a>'; |
|
| 290 | + { |
|
| 291 | + echo '<a class="topicicon i-remove" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt['remove_topic'], '"></a>'; |
|
| 292 | + } |
|
| 250 | 293 | |
| 251 | 294 | if ($topic['quick_mod']['lock']) |
| 252 | - echo '<a class="topicicon i-locked" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_locked'] ? 'set_unlock' : 'set_lock'], '"></a>'; |
|
| 295 | + { |
|
| 296 | + echo '<a class="topicicon i-locked" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_locked'] ? 'set_unlock' : 'set_lock'], '"></a>'; |
|
| 297 | + } |
|
| 253 | 298 | |
| 254 | 299 | if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove']) |
| 255 | - echo '<br />'; |
|
| 300 | + { |
|
| 301 | + echo '<br />'; |
|
| 302 | + } |
|
| 256 | 303 | |
| 257 | 304 | if ($topic['quick_mod']['sticky']) |
| 258 | - echo '<a class="topicicon i-sticky" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_sticky'] ? 'set_nonsticky' : 'set_sticky'], '"></a>'; |
|
| 305 | + { |
|
| 306 | + echo '<a class="topicicon i-sticky" href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions%5B', $topic['id'], '%5D=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');" title="', $txt[$topic['is_sticky'] ? 'set_nonsticky' : 'set_sticky'], '"></a>'; |
|
| 307 | + } |
|
| 259 | 308 | |
| 260 | 309 | if ($topic['quick_mod']['move']) |
| 261 | - echo '<a class="topicicon i-move" href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0" title="', $txt['move_topic'], '"></a>'; |
|
| 310 | + { |
|
| 311 | + echo '<a class="topicicon i-move" href="', $scripturl, '?action=movetopic;current_board=', $context['current_board'], ';board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0" title="', $txt['move_topic'], '"></a>'; |
|
| 312 | + } |
|
| 262 | 313 | } |
| 263 | 314 | |
| 264 | 315 | echo ' |
@@ -281,17 +332,21 @@ discard block |
||
| 281 | 332 | <option value=""> </option>'; |
| 282 | 333 | |
| 283 | 334 | foreach ($context['qmod_actions'] as $qmod_action) |
| 284 | - if ($context['can_' . $qmod_action]) |
|
| 335 | + { |
|
| 336 | + if ($context['can_' . $qmod_action]) |
|
| 285 | 337 | echo ' |
| 286 | 338 | <option value="' . $qmod_action . '">➤ ', $txt['quick_mod_' . $qmod_action] . '</option>'; |
| 339 | + } |
|
| 287 | 340 | |
| 288 | 341 | echo ' |
| 289 | 342 | </select>'; |
| 290 | 343 | |
| 291 | 344 | // Show a list of boards they can move the topic to. |
| 292 | 345 | if ($context['can_move']) |
| 293 | - echo ' |
|
| 346 | + { |
|
| 347 | + echo ' |
|
| 294 | 348 | <span id="quick_mod_jump_to"> </span>'; |
| 349 | + } |
|
| 295 | 350 | |
| 296 | 351 | echo ' |
| 297 | 352 | <input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.forms.quickModForm.qaction.value != \'\' && confirm(\'', $txt['quickmod_confirm'], '\');" /> |
@@ -300,9 +355,11 @@ discard block |
||
| 300 | 355 | |
| 301 | 356 | // Finish off the form - again. |
| 302 | 357 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] > 0 && !empty($context['topics'])) |
| 303 | - echo ' |
|
| 358 | + { |
|
| 359 | + echo ' |
|
| 304 | 360 | <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" /> |
| 305 | 361 | </form>'; |
| 362 | + } |
|
| 306 | 363 | } |
| 307 | 364 | } |
| 308 | 365 | |
@@ -314,7 +371,9 @@ discard block |
||
| 314 | 371 | global $context, $txt, $options; |
| 315 | 372 | |
| 316 | 373 | if ($context['no_topic_listing']) |
| 317 | - return; |
|
| 374 | + { |
|
| 375 | + return; |
|
| 376 | + } |
|
| 318 | 377 | |
| 319 | 378 | template_pagesection('normal_buttons', 'right'); |
| 320 | 379 | |
@@ -326,17 +385,22 @@ discard block |
||
| 326 | 385 | <div class="qaction_row floatright" id="message_index_jump_to"> </div>'; |
| 327 | 386 | |
| 328 | 387 | if (!$context['no_topic_listing']) |
| 329 | - template_basicicons_legend(); |
|
| 388 | + { |
|
| 389 | + template_basicicons_legend(); |
|
| 390 | + } |
|
| 330 | 391 | |
| 331 | 392 | echo ' |
| 332 | 393 | <script>'; |
| 333 | 394 | |
| 334 | 395 | if (!empty($context['using_relative_time'])) |
| 335 | - echo ' |
|
| 396 | + { |
|
| 397 | + echo ' |
|
| 336 | 398 | $(\'.topic_latest\').addClass(\'relative\');'; |
| 399 | + } |
|
| 337 | 400 | |
| 338 | 401 | if (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1 && !empty($context['topics']) && $context['can_move']) |
| 339 | - echo ' |
|
| 402 | + { |
|
| 403 | + echo ' |
|
| 340 | 404 | aJumpTo[aJumpTo.length] = new JumpTo({ |
| 341 | 405 | sContainerId: "quick_mod_jump_to", |
| 342 | 406 | sClassName: "qaction", |
@@ -352,6 +416,7 @@ discard block |
||
| 352 | 416 | bDisabled: true, |
| 353 | 417 | sCustomName: "move_to" |
| 354 | 418 | });'; |
| 419 | + } |
|
| 355 | 420 | |
| 356 | 421 | echo ' |
| 357 | 422 | aJumpTo[aJumpTo.length] = new JumpTo({ |
@@ -35,15 +35,19 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | // When using Go Back due to fatal_error, allow the form to be re-submitted with changes. |
| 37 | 37 | if (isBrowser('is_firefox')) |
| 38 | - echo ' |
|
| 38 | + { |
|
| 39 | + echo ' |
|
| 39 | 40 | window.addEventListener("pageshow", reActivate, false);'; |
| 41 | + } |
|
| 40 | 42 | |
| 41 | 43 | // Start with message icons - and any missing from this theme. |
| 42 | 44 | echo ' |
| 43 | 45 | var icon_urls = {'; |
| 44 | 46 | foreach ($context['icons'] as $icon) |
| 45 | - echo ' |
|
| 47 | + { |
|
| 48 | + echo ' |
|
| 46 | 49 | \'', $icon['value'], '\': \'', $icon['url'], '\'', $icon['is_last'] ? '' : ','; |
| 50 | + } |
|
| 47 | 51 | echo ' |
| 48 | 52 | };'; |
| 49 | 53 | |
@@ -76,7 +80,9 @@ discard block |
||
| 76 | 80 | // If an error occurred, explain what happened. |
| 77 | 81 | template_show_error('post_error'); |
| 78 | 82 | if (!empty($context['attachment_error_keys'])) |
| 79 | - template_attachment_errors(); |
|
| 83 | + { |
|
| 84 | + template_attachment_errors(); |
|
| 85 | + } |
|
| 80 | 86 | |
| 81 | 87 | // If this won't be approved let them know! |
| 82 | 88 | // @todo why not use the template_show_error above? |
@@ -97,10 +103,12 @@ discard block |
||
| 97 | 103 | </p>'; |
| 98 | 104 | |
| 99 | 105 | if (!empty($context['drafts_autosave'])) |
| 100 | - echo ' |
|
| 106 | + { |
|
| 107 | + echo ' |
|
| 101 | 108 | <div id="draft_section" class="successbox', isset($context['draft_saved']) ? '"' : ' hide"', '> |
| 102 | 109 | ', sprintf($txt['draft_saved'], $scripturl . '?action=profile;u=' . $context['user']['id'] . ';area=showdrafts'), ' |
| 103 | 110 | </div>'; |
| 111 | + } |
|
| 104 | 112 | |
| 105 | 113 | // The post header... important stuff |
| 106 | 114 | echo ' |
@@ -118,13 +126,15 @@ discard block |
||
| 118 | 126 | </dd>'; |
| 119 | 127 | |
| 120 | 128 | if (empty($modSettings['guest_post_no_email'])) |
| 121 | - echo ' |
|
| 129 | + { |
|
| 130 | + echo ' |
|
| 122 | 131 | <dt> |
| 123 | 132 | <label for="email"', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</label> |
| 124 | 133 | </dt> |
| 125 | 134 | <dd> |
| 126 | 135 | <input type="email" id="email" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" required="required" /> |
| 127 | 136 | </dd>'; |
| 137 | + } |
|
| 128 | 138 | } |
| 129 | 139 | |
| 130 | 140 | // Now show the subject box for this post. |
@@ -143,8 +153,10 @@ discard block |
||
| 143 | 153 | |
| 144 | 154 | // Loop through each message icon allowed, adding it to the drop down list. |
| 145 | 155 | foreach ($context['icons'] as $icon) |
| 146 | - echo ' |
|
| 156 | + { |
|
| 157 | + echo ' |
|
| 147 | 158 | <option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected="selected"' : '', '>', $icon['name'], '</option>'; |
| 159 | + } |
|
| 148 | 160 | |
| 149 | 161 | echo ' |
| 150 | 162 | </select> |
@@ -152,12 +164,14 @@ discard block |
||
| 152 | 164 | </dd>'; |
| 153 | 165 | |
| 154 | 166 | if (!empty($context['show_boards_dropdown'])) |
| 155 | - echo ' |
|
| 167 | + { |
|
| 168 | + echo ' |
|
| 156 | 169 | <dt class="clear_left"> |
| 157 | 170 | <label for="post_in_board">', $txt['post_in_board'], '</label>: |
| 158 | 171 | </dt> |
| 159 | 172 | <dd>', template_select_boards('post_in_board'), ' |
| 160 | 173 | </dd>'; |
| 174 | + } |
|
| 161 | 175 | |
| 162 | 176 | echo ' |
| 163 | 177 | </dl>'; |
@@ -199,8 +213,10 @@ discard block |
||
| 199 | 213 | |
| 200 | 214 | // Show a list of all the years we allow... |
| 201 | 215 | for ($year = $context['cal_minyear']; $year <= $context['cal_maxyear']; $year++) |
| 202 | - echo ' |
|
| 216 | + { |
|
| 217 | + echo ' |
|
| 203 | 218 | <option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, ' </option>'; |
| 219 | + } |
|
| 204 | 220 | |
| 205 | 221 | echo ' |
| 206 | 222 | </select> |
@@ -209,8 +225,10 @@ discard block |
||
| 209 | 225 | |
| 210 | 226 | // There are 12 months per year - ensure that they all get listed. |
| 211 | 227 | for ($month = 1; $month <= 12; $month++) |
| 212 | - echo ' |
|
| 228 | + { |
|
| 229 | + echo ' |
|
| 213 | 230 | <option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], ' </option>'; |
| 231 | + } |
|
| 214 | 232 | |
| 215 | 233 | echo ' |
| 216 | 234 | </select> |
@@ -219,8 +237,10 @@ discard block |
||
| 219 | 237 | |
| 220 | 238 | // This prints out all the days in the current month - this changes dynamically as we switch months. |
| 221 | 239 | for ($day = 1; $day <= $context['event']['last_day']; $day++) |
| 222 | - echo ' |
|
| 240 | + { |
|
| 241 | + echo ' |
|
| 223 | 242 | <option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, ' </option>'; |
| 243 | + } |
|
| 224 | 244 | |
| 225 | 245 | echo ' |
| 226 | 246 | </select> |
@@ -240,8 +260,10 @@ discard block |
||
| 240 | 260 | <select id="span" name="span">'; |
| 241 | 261 | |
| 242 | 262 | for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++) |
| 243 | - echo ' |
|
| 263 | + { |
|
| 264 | + echo ' |
|
| 244 | 265 | <option value="', $days, '"', $days == $context['event']['span'] ? ' selected="selected"' : '', '>', $days, ' </option>'; |
| 266 | + } |
|
| 245 | 267 | |
| 246 | 268 | echo ' |
| 247 | 269 | </select> |
@@ -262,8 +284,10 @@ discard block |
||
| 262 | 284 | } |
| 263 | 285 | |
| 264 | 286 | if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) |
| 265 | - echo ' |
|
| 287 | + { |
|
| 288 | + echo ' |
|
| 266 | 289 | <input type="hidden" name="eventid" value="', $context['event']['id'], '" />'; |
| 290 | + } |
|
| 267 | 291 | |
| 268 | 292 | echo ' |
| 269 | 293 | </fieldset> |
@@ -288,8 +312,10 @@ discard block |
||
| 288 | 312 | <div id="mentioned" class="hide">'; |
| 289 | 313 | |
| 290 | 314 | foreach ($context['member_ids'] as $id) |
| 291 | - echo ' |
|
| 315 | + { |
|
| 316 | + echo ' |
|
| 292 | 317 | <input type="hidden" name="uid[]" value="', $id, '" />'; |
| 318 | + } |
|
| 293 | 319 | |
| 294 | 320 | echo ' |
| 295 | 321 | </div>'; |
@@ -302,13 +328,17 @@ discard block |
||
| 302 | 328 | |
| 303 | 329 | // Option to delete an event if user is editing one. |
| 304 | 330 | if (!empty($context['make_event']) && !$context['event']['new']) |
| 305 | - echo ' |
|
| 331 | + { |
|
| 332 | + echo ' |
|
| 306 | 333 | <input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['event_delete_confirm'], '\');" />'; |
| 334 | + } |
|
| 307 | 335 | |
| 308 | 336 | // Option to add a poll (javascript if enabled, otherwise preview with poll) |
| 309 | 337 | if (empty($context['make_poll']) && $context['can_add_poll']) |
| 310 | - echo ' |
|
| 338 | + { |
|
| 339 | + echo ' |
|
| 311 | 340 | <input type="submit" name="poll" aria-label="', $txt['add_poll'], '" value="', $txt['add_poll'], '" onclick="return loadAddNewPoll(this, ', empty($context['current_board']) ? '0' : $context['current_board'], ', \'postmodify\');" />'; |
| 341 | + } |
|
| 312 | 342 | |
| 313 | 343 | echo ' |
| 314 | 344 | </div>'; |
@@ -323,18 +353,22 @@ discard block |
||
| 323 | 353 | |
| 324 | 354 | // If the admin has enabled the hiding of the additional options - show a link and image for it. |
| 325 | 355 | if (!empty($settings['additional_options_collapsible'])) |
| 326 | - echo ' |
|
| 356 | + { |
|
| 357 | + echo ' |
|
| 327 | 358 | <h3 id="postAdditionalOptionsHeader" class="category_header panel_toggle"> |
| 328 | 359 | <i id="postMoreExpand" class="chevricon i-chevron-', empty($context['minmax_preferences']['post']) ? 'up' : 'down', ' hide" title="', $txt['hide'], '"></i> |
| 329 | 360 | <a href="#" id="postMoreExpandLink">', !empty($context['attachments']) && $context['attachments']['can']['post'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a> |
| 330 | 361 | </h3>'; |
| 362 | + } |
|
| 331 | 363 | |
| 332 | 364 | echo ' |
| 333 | 365 | <div id="', empty($settings['additional_options_collapsible']) ? 'postAdditionalOptionsNC"' : 'postAdditionalOptions"', empty($settings['additional_options_collapsible']) || empty($context['minmax_preferences']['post']) ? '' : ' class="hide"', '>'; |
| 334 | 366 | |
| 335 | 367 | // Is the user allowed to post or if this post already has attachments on it give them the boxes. |
| 336 | 368 | if (!empty($context['attachments']) && ($context['attachments']['can']['post'] || !empty($context['attachments']['current']))) |
| 337 | - $context['attachments']['template'](); |
|
| 369 | + { |
|
| 370 | + $context['attachments']['template'](); |
|
| 371 | + } |
|
| 338 | 372 | |
| 339 | 373 | // Display the check boxes for all the standard options - if they are available to the user! |
| 340 | 374 | echo ' |
@@ -387,7 +421,8 @@ discard block |
||
| 387 | 421 | |
| 388 | 422 | // Show more boxes if they aren't approaching that limit. |
| 389 | 423 | if ($context['attachments']['num_allowed'] > 1) |
| 390 | - echo ' |
|
| 424 | + { |
|
| 425 | + echo ' |
|
| 391 | 426 | <script> |
| 392 | 427 | var allowed_attachments = ', $context['attachments']['num_allowed'], ', |
| 393 | 428 | current_attachment = 1, |
@@ -397,18 +432,24 @@ discard block |
||
| 397 | 432 | </script> |
| 398 | 433 | </dd> |
| 399 | 434 | <dd class="smalltext drop_attachments_no_js" id="moreAttachments"><a href="#" onclick="addAttachment(); return false;">(', $txt['more_attachments'], ')</a></dd>'; |
| 400 | - else |
|
| 401 | - echo ' |
|
| 435 | + } |
|
| 436 | + else { |
|
| 437 | + echo ' |
|
| 402 | 438 | </dd>'; |
| 439 | + } |
|
| 403 | 440 | } |
| 404 | 441 | |
| 405 | 442 | foreach ($context['attachments']['current'] as $attachment) |
| 406 | 443 | { |
| 407 | 444 | $label = $attachment['name']; |
| 408 | 445 | if (empty($attachment['approved'])) |
| 409 | - $label .= ' (' . $txt['awaiting_approval'] . ')'; |
|
| 446 | + { |
|
| 447 | + $label .= ' (' . $txt['awaiting_approval'] . ')'; |
|
| 448 | + } |
|
| 410 | 449 | if (!empty($modSettings['attachmentPostLimit']) || !empty($modSettings['attachmentSizeLimit'])) |
| 411 | - $label .= sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0)); |
|
| 450 | + { |
|
| 451 | + $label .= sprintf($txt['attach_kb'], comma_format(round(max($attachment['size'], 1024) / 1024), 0)); |
|
| 452 | + } |
|
| 412 | 453 | |
| 413 | 454 | echo ' |
| 414 | 455 | <dd class="smalltext"> |
@@ -423,20 +464,28 @@ discard block |
||
| 423 | 464 | |
| 424 | 465 | // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. |
| 425 | 466 | if (!empty($context['attachments']['allowed_extensions'])) |
| 426 | - echo ' |
|
| 467 | + { |
|
| 468 | + echo ' |
|
| 427 | 469 | <p id="types">', $txt['allowed_types'], ': ', $context['attachments']['allowed_extensions'], '</p>'; |
| 470 | + } |
|
| 428 | 471 | |
| 429 | 472 | if (!empty($context['attachments']['restrictions'])) |
| 430 | - echo ' |
|
| 473 | + { |
|
| 474 | + echo ' |
|
| 431 | 475 | <p id="restrictions">', $txt['attach_restrictions'], ' ', implode(', ', $context['attachments']['restrictions']), '</p>'; |
| 476 | + } |
|
| 432 | 477 | |
| 433 | 478 | if ($context['attachments']['num_allowed'] == 0) |
| 434 | - echo ' |
|
| 479 | + { |
|
| 480 | + echo ' |
|
| 435 | 481 | <p class="infobox">', $txt['attach_limit_nag'], '</p>'; |
| 482 | + } |
|
| 436 | 483 | |
| 437 | 484 | if (!$context['attachments']['can']['post_unapproved']) |
| 438 | - echo ' |
|
| 485 | + { |
|
| 486 | + echo ' |
|
| 439 | 487 | <p class="warningbox">', $txt['attachment_requires_approval'], '</p>'; |
| 488 | + } |
|
| 440 | 489 | |
| 441 | 490 | echo ' |
| 442 | 491 | </dd> |
@@ -537,9 +586,11 @@ discard block |
||
| 537 | 586 | </dd>'; |
| 538 | 587 | |
| 539 | 588 | foreach ($context['drafts'] as $draft) |
| 540 | - echo ' |
|
| 589 | + { |
|
| 590 | + echo ' |
|
| 541 | 591 | <dt>', $draft['link'], '</dt> |
| 542 | 592 | <dd>', $draft['poster_time'], '</dd>'; |
| 593 | + } |
|
| 543 | 594 | |
| 544 | 595 | echo ' |
| 545 | 596 | </dl> |
@@ -600,7 +651,9 @@ discard block |
||
| 600 | 651 | { |
| 601 | 652 | $ignoring = false; |
| 602 | 653 | if (!empty($post['is_ignored'])) |
| 603 | - $ignored_posts[] = $ignoring = $post['id']; |
|
| 654 | + { |
|
| 655 | + $ignored_posts[] = $ignoring = $post['id']; |
|
| 656 | + } |
|
| 604 | 657 | |
| 605 | 658 | echo ' |
| 606 | 659 | <div class="content forumposts"> |
@@ -611,20 +664,24 @@ discard block |
||
| 611 | 664 | </h5>'; |
| 612 | 665 | |
| 613 | 666 | if ($context['can_quote']) |
| 614 | - echo ' |
|
| 667 | + { |
|
| 668 | + echo ' |
|
| 615 | 669 | <ul class="quickbuttons" id="msg_', $post['id'], '_quote"> |
| 616 | 670 | <li class="listlevel1"><a href="#postmodify" onmousedown="return insertQuoteFast(', $post['id'], ');" class="linklevel1 quote_button">', $txt['bbc_quote'], '</a></li> |
| 617 | 671 | </ul>'; |
| 672 | + } |
|
| 618 | 673 | |
| 619 | 674 | echo ' |
| 620 | 675 | </div>'; |
| 621 | 676 | |
| 622 | 677 | if ($ignoring) |
| 623 | - echo ' |
|
| 678 | + { |
|
| 679 | + echo ' |
|
| 624 | 680 | <div id="msg_', $post['id'], '_ignored_prompt"> |
| 625 | 681 | ', $txt['ignoring_user'], ' |
| 626 | 682 | <a href="#" id="msg_', $post['id'], '_ignored_link" class="hide">', $txt['show_ignore_user_post'], '</a> |
| 627 | 683 | </div>'; |
| 684 | + } |
|
| 628 | 685 | |
| 629 | 686 | echo ' |
| 630 | 687 | <div class="inner" id="msg_', $post['id'], '_body">', $post['body'], '</div> |
@@ -706,8 +763,10 @@ discard block |
||
| 706 | 763 | |
| 707 | 764 | // If we are starting a new topic starting from another one, here is the place to remember some details |
| 708 | 765 | if (!empty($context['original_post'])) |
| 709 | - echo ' |
|
| 766 | + { |
|
| 767 | + echo ' |
|
| 710 | 768 | <input type="hidden" name="followup" value="' . $context['original_post'] . '" />'; |
| 769 | + } |
|
| 711 | 770 | |
| 712 | 771 | echo ' |
| 713 | 772 | <input type="hidden" name="additional_options" id="additional_options" value="', $context['show_additional_options'] ? '1' : '0', '" /> |
@@ -737,7 +796,8 @@ discard block |
||
| 737 | 796 | |
| 738 | 797 | // Code for showing and hiding additional options. |
| 739 | 798 | if (!empty($settings['additional_options_collapsible'])) |
| 740 | - addInlineJavascript(' |
|
| 799 | + { |
|
| 800 | + addInlineJavascript(' |
|
| 741 | 801 | var oSwapAdditionalOptions = new elk_Toggle({ |
| 742 | 802 | bToggleEnabled: true, |
| 743 | 803 | bCurrentlyCollapsed: ' . (empty($context['minmax_preferences']['post']) ? 'false' : 'true') . ', |
@@ -774,6 +834,7 @@ discard block |
||
| 774 | 834 | sAdditionalVars: \';minmax_key=post\' |
| 775 | 835 | }, |
| 776 | 836 | });', true); |
| 837 | + } |
|
| 777 | 838 | |
| 778 | 839 | template_topic_replies_below(); |
| 779 | 840 | } |
@@ -316,7 +316,9 @@ discard block |
||
| 316 | 316 | if (!empty($this->js_vars) && !$do_deferred) |
| 317 | 317 | { |
| 318 | 318 | foreach ($this->js_vars as $var => $value) |
| 319 | - $js_vars[] = $var . ' = ' . $value; |
|
| 319 | + { |
|
| 320 | + $js_vars[] = $var . ' = ' . $value; |
|
| 321 | + } |
|
| 320 | 322 | |
| 321 | 323 | // Newlines and tabs are here to make it look nice in the page source view, stripped if minimized though |
| 322 | 324 | $this->js_inline['standard'][] = 'var ' . implode(",\n\t\t\t", $js_vars) . ';'; |
@@ -383,14 +385,18 @@ discard block |
||
| 383 | 385 | } |
| 384 | 386 | |
| 385 | 387 | foreach ($combiner->getSpares() as $id => $file) |
| 386 | - echo ' |
|
| 388 | + { |
|
| 389 | + echo ' |
|
| 387 | 390 | <link rel="stylesheet" href="', $file['filename'], '" id="', $id, '" />'; |
| 391 | + } |
|
| 388 | 392 | } |
| 389 | 393 | else |
| 390 | 394 | { |
| 391 | 395 | foreach ($this->css_files as $id => $file) |
| 392 | - echo ' |
|
| 396 | + { |
|
| 397 | + echo ' |
|
| 393 | 398 | <link rel="stylesheet" href="', $file['filename'], '" id="', $id, '" />'; |
| 399 | + } |
|
| 394 | 400 | } |
| 395 | 401 | } |
| 396 | 402 | } |
@@ -766,7 +772,9 @@ discard block |
||
| 766 | 772 | // Since it's nice to have avatars all of the same size, and in some cases the size detection may fail, |
| 767 | 773 | // let's add the css in any case |
| 768 | 774 | if (!isset($context['html_headers'])) |
| 769 | - $context['html_headers'] = ''; |
|
| 775 | + { |
|
| 776 | + $context['html_headers'] = ''; |
|
| 777 | + } |
|
| 770 | 778 | |
| 771 | 779 | if (!empty($modSettings['avatar_max_width']) || !empty($modSettings['avatar_max_height'])) |
| 772 | 780 | { |
@@ -1097,7 +1105,9 @@ discard block |
||
| 1097 | 1105 | |
| 1098 | 1106 | // Load each template... |
| 1099 | 1107 | foreach ($templates as $template) |
| 1100 | - $this->templates->load($template); |
|
| 1108 | + { |
|
| 1109 | + $this->templates->load($template); |
|
| 1110 | + } |
|
| 1101 | 1111 | |
| 1102 | 1112 | // ...and attempt to load their associated language files. |
| 1103 | 1113 | $required_files = implode('+', array_merge($templates, array('Addons'))); |
@@ -39,8 +39,10 @@ discard block |
||
| 39 | 39 | <th scope="col">', $txt['status'], '</th>'; |
| 40 | 40 | |
| 41 | 41 | if ($context['can_send_email']) |
| 42 | - echo ' |
|
| 42 | + { |
|
| 43 | + echo ' |
|
| 43 | 44 | <th scope="col">', $txt['email'], '</th>'; |
| 45 | + } |
|
| 44 | 46 | |
| 45 | 47 | echo ' |
| 46 | 48 | <th scope="col">', $txt['profile_contact'], '</th> |
@@ -49,12 +51,14 @@ discard block |
||
| 49 | 51 | |
| 50 | 52 | // If they don't have any buddies don't list them! |
| 51 | 53 | if (empty($context['buddies'])) |
| 52 | - echo ' |
|
| 54 | + { |
|
| 55 | + echo ' |
|
| 53 | 56 | <tr> |
| 54 | 57 | <td colspan="5" class="centertext"> |
| 55 | 58 | <strong>', $txt['no_buddies'], '</strong> |
| 56 | 59 | </td> |
| 57 | 60 | </tr>'; |
| 61 | + } |
|
| 58 | 62 | |
| 59 | 63 | // Now loop through each buddy showing info on each. |
| 60 | 64 | foreach ($context['buddies'] as $buddy) |
@@ -67,8 +71,10 @@ discard block |
||
| 67 | 71 | </td>'; |
| 68 | 72 | |
| 69 | 73 | if ($context['can_send_email']) |
| 70 | - echo ' |
|
| 74 | + { |
|
| 75 | + echo ' |
|
| 71 | 76 | <td>', template_member_email($buddy), '</td>'; |
| 77 | + } |
|
| 72 | 78 | |
| 73 | 79 | // Any custom profile (with icon) fields to show |
| 74 | 80 | $im = array(); |
@@ -76,8 +82,10 @@ discard block |
||
| 76 | 82 | { |
| 77 | 83 | |
| 78 | 84 | foreach ($buddy['custom_fields'] as $key => $cpf) |
| 79 | - if ($cpf['placement'] == 1) |
|
| 85 | + { |
|
| 86 | + if ($cpf['placement'] == 1) |
|
| 80 | 87 | $im[] = $cpf['value']; |
| 88 | + } |
|
| 81 | 89 | } |
| 82 | 90 | |
| 83 | 91 | echo ' |
@@ -111,8 +119,10 @@ discard block |
||
| 111 | 119 | </dl>'; |
| 112 | 120 | |
| 113 | 121 | if (!empty($context['token_check'])) |
| 114 | - echo ' |
|
| 122 | + { |
|
| 123 | + echo ' |
|
| 115 | 124 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />'; |
| 125 | + } |
|
| 116 | 126 | |
| 117 | 127 | echo ' |
| 118 | 128 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
@@ -152,8 +162,10 @@ discard block |
||
| 152 | 162 | <th scope="col">', $txt['status'], '</th>'; |
| 153 | 163 | |
| 154 | 164 | if ($context['can_send_email']) |
| 155 | - echo ' |
|
| 165 | + { |
|
| 166 | + echo ' |
|
| 156 | 167 | <th scope="col">', $txt['email'], '</th>'; |
| 168 | + } |
|
| 157 | 169 | |
| 158 | 170 | echo ' |
| 159 | 171 | <th scope="col"></th> |
@@ -161,12 +173,14 @@ discard block |
||
| 161 | 173 | |
| 162 | 174 | // If they don't have anyone on their ignore list, don't list it! |
| 163 | 175 | if (empty($context['ignore_list'])) |
| 164 | - echo ' |
|
| 176 | + { |
|
| 177 | + echo ' |
|
| 165 | 178 | <tr> |
| 166 | 179 | <td colspan="4" class="centertext"> |
| 167 | 180 | <strong>', $txt['no_ignore'], '</strong> |
| 168 | 181 | </td> |
| 169 | 182 | </tr>'; |
| 183 | + } |
|
| 170 | 184 | |
| 171 | 185 | // Now loop through each buddy showing info on each. |
| 172 | 186 | foreach ($context['ignore_list'] as $member) |
@@ -179,8 +193,10 @@ discard block |
||
| 179 | 193 | </td>'; |
| 180 | 194 | |
| 181 | 195 | if ($context['can_send_email']) |
| 182 | - echo ' |
|
| 196 | + { |
|
| 197 | + echo ' |
|
| 183 | 198 | <td>', template_member_email($member), '</td>'; |
| 199 | + } |
|
| 184 | 200 | |
| 185 | 201 | echo ' |
| 186 | 202 | <td class="righttext"> |
@@ -211,8 +227,10 @@ discard block |
||
| 211 | 227 | </dl>'; |
| 212 | 228 | |
| 213 | 229 | if (!empty($context['token_check'])) |
| 214 | - echo ' |
|
| 230 | + { |
|
| 231 | + echo ' |
|
| 215 | 232 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />'; |
| 233 | + } |
|
| 216 | 234 | |
| 217 | 235 | echo ' |
| 218 | 236 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> |
@@ -249,31 +267,40 @@ discard block |
||
| 249 | 267 | |
| 250 | 268 | // Don't say "Profile" if this isn't the profile... |
| 251 | 269 | if (!empty($context['profile_header_text'])) |
| 252 | - echo ' |
|
| 270 | + { |
|
| 271 | + echo ' |
|
| 253 | 272 | ', $context['profile_header_text']; |
| 254 | - else |
|
| 255 | - echo ' |
|
| 273 | + } |
|
| 274 | + else { |
|
| 275 | + echo ' |
|
| 256 | 276 | ', $txt['profile']; |
| 277 | + } |
|
| 257 | 278 | |
| 258 | 279 | echo ' |
| 259 | 280 | </h2>'; |
| 260 | 281 | |
| 261 | 282 | // Have we some description? |
| 262 | 283 | if ($context['page_desc']) |
| 263 | - echo ' |
|
| 284 | + { |
|
| 285 | + echo ' |
|
| 264 | 286 | <p class="description">', $context['page_desc'], '</p>'; |
| 287 | + } |
|
| 265 | 288 | |
| 266 | 289 | echo ' |
| 267 | 290 | <div class="content">'; |
| 268 | 291 | |
| 269 | 292 | // Any bits at the start? |
| 270 | 293 | if (!empty($context['profile_prehtml'])) |
| 271 | - echo ' |
|
| 294 | + { |
|
| 295 | + echo ' |
|
| 272 | 296 | <div>', $context['profile_prehtml'], '</div>'; |
| 297 | + } |
|
| 273 | 298 | |
| 274 | 299 | if (!empty($context['profile_fields'])) |
| 275 | - echo ' |
|
| 300 | + { |
|
| 301 | + echo ' |
|
| 276 | 302 | <dl>'; |
| 303 | + } |
|
| 277 | 304 | |
| 278 | 305 | // Start the big old loop 'of love. |
| 279 | 306 | $lastItem = 'hr'; |
@@ -281,7 +308,9 @@ discard block |
||
| 281 | 308 | { |
| 282 | 309 | // We add a little hack to be sure we never get more than one hr in a row! |
| 283 | 310 | if ($lastItem === 'hr' && $field['type'] === 'hr') |
| 284 | - continue; |
|
| 311 | + { |
|
| 312 | + continue; |
|
| 313 | + } |
|
| 285 | 314 | |
| 286 | 315 | $lastItem = $field['type']; |
| 287 | 316 | if ($field['type'] === 'hr') |
@@ -307,8 +336,10 @@ discard block |
||
| 307 | 336 | |
| 308 | 337 | // Does it have any subtext to show? |
| 309 | 338 | if (!empty($field['subtext'])) |
| 310 | - echo ' |
|
| 339 | + { |
|
| 340 | + echo ' |
|
| 311 | 341 | <p class="smalltext">', $field['subtext'], '</p>'; |
| 342 | + } |
|
| 312 | 343 | |
| 313 | 344 | echo ' |
| 314 | 345 | </dt> |
@@ -316,28 +347,38 @@ discard block |
||
| 316 | 347 | |
| 317 | 348 | // Want to put something in front of the box? |
| 318 | 349 | if (!empty($field['preinput'])) |
| 319 | - echo ' |
|
| 350 | + { |
|
| 351 | + echo ' |
|
| 320 | 352 | ', $field['preinput']; |
| 353 | + } |
|
| 321 | 354 | |
| 322 | 355 | // What type of data are we showing? |
| 323 | 356 | if ($field['type'] === 'label') |
| 324 | - echo ' |
|
| 357 | + { |
|
| 358 | + echo ' |
|
| 325 | 359 | ', $field['value']; |
| 360 | + } |
|
| 326 | 361 | |
| 327 | 362 | // Maybe it's a text box - very likely! |
| 328 | 363 | elseif (in_array($field['type'], array('int', 'float', 'text', 'password'))) |
| 329 | - echo ' |
|
| 364 | + { |
|
| 365 | + echo ' |
|
| 330 | 366 | <input type="', $field['type'] == 'password' ? 'password' : 'text', '" name="', $key, '" id="', $key, '" size="', empty($field['size']) ? 30 : $field['size'], '" value="', $field['value'], '" ', $field['input_attr'], ' class="input_', $field['type'] == 'password' ? 'password' : 'text', '" />'; |
| 367 | + } |
|
| 331 | 368 | |
| 332 | 369 | // Maybe it's an html5 input |
| 333 | 370 | elseif (in_array($field['type'], array('url', 'search', 'date', 'email', 'color'))) |
| 334 | - echo ' |
|
| 371 | + { |
|
| 372 | + echo ' |
|
| 335 | 373 | <input type="', $field['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', '" />'; |
| 374 | + } |
|
| 336 | 375 | |
| 337 | 376 | // You "checking" me out? ;) |
| 338 | 377 | elseif ($field['type'] === 'check') |
| 339 | - echo ' |
|
| 378 | + { |
|
| 379 | + echo ' |
|
| 340 | 380 | <input type="hidden" name="', $key, '" value="0" /><input type="checkbox" name="', $key, '" id="', $key, '" ', !empty($field['value']) ? ' checked="checked"' : '', ' value="1" ', $field['input_attr'], ' />'; |
| 381 | + } |
|
| 341 | 382 | |
| 342 | 383 | // Always fun - select boxes! |
| 343 | 384 | elseif ($field['type'] === 'select') |
@@ -362,9 +403,11 @@ discard block |
||
| 362 | 403 | |
| 363 | 404 | // Assuming we now have some! |
| 364 | 405 | if (is_array($field['options'])) |
| 365 | - foreach ($field['options'] as $value => $name) |
|
| 406 | + { |
|
| 407 | + foreach ($field['options'] as $value => $name) |
|
| 366 | 408 | echo ' |
| 367 | 409 | <option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>'; |
| 410 | + } |
|
| 368 | 411 | } |
| 369 | 412 | |
| 370 | 413 | echo ' |
@@ -373,8 +416,10 @@ discard block |
||
| 373 | 416 | |
| 374 | 417 | // Something to end with? |
| 375 | 418 | if (!empty($field['postinput'])) |
| 376 | - echo ' |
|
| 419 | + { |
|
| 420 | + echo ' |
|
| 377 | 421 | ', $field['postinput']; |
| 422 | + } |
|
| 378 | 423 | |
| 379 | 424 | echo ' |
| 380 | 425 | </dd>'; |
@@ -382,15 +427,19 @@ discard block |
||
| 382 | 427 | } |
| 383 | 428 | |
| 384 | 429 | if (!empty($context['profile_fields'])) |
| 385 | - echo ' |
|
| 430 | + { |
|
| 431 | + echo ' |
|
| 386 | 432 | </dl>'; |
| 433 | + } |
|
| 387 | 434 | |
| 388 | 435 | // Are there any custom profile fields - if so print them! |
| 389 | 436 | if (!empty($context['custom_fields'])) |
| 390 | 437 | { |
| 391 | 438 | if ($lastItem !== 'hr') |
| 392 | - echo ' |
|
| 439 | + { |
|
| 440 | + echo ' |
|
| 393 | 441 | <hr class="clear" />'; |
| 442 | + } |
|
| 394 | 443 | |
| 395 | 444 | echo ' |
| 396 | 445 | <dl>'; |
@@ -413,8 +462,10 @@ discard block |
||
| 413 | 462 | |
| 414 | 463 | // Any closing HTML? |
| 415 | 464 | if (!empty($context['profile_posthtml'])) |
| 416 | - echo ' |
|
| 465 | + { |
|
| 466 | + echo ' |
|
| 417 | 467 | <div>', $context['profile_posthtml'], '</div>'; |
| 468 | + } |
|
| 418 | 469 | |
| 419 | 470 | // Only show the password box if it's actually needed. |
| 420 | 471 | template_profile_save(); |
@@ -431,18 +482,22 @@ discard block |
||
| 431 | 482 | |
| 432 | 483 | // If this part requires a password, make sure to give a warning. |
| 433 | 484 | if ($context['require_password']) |
| 434 | - echo ' |
|
| 485 | + { |
|
| 486 | + echo ' |
|
| 435 | 487 | // Did you forget to type your password? |
| 436 | 488 | if (document.forms.creator.oldpasswrd.value === "") |
| 437 | 489 | { |
| 438 | 490 | alert("', $txt['required_security_reasons'], '"); |
| 439 | 491 | return false; |
| 440 | 492 | }'; |
| 493 | + } |
|
| 441 | 494 | |
| 442 | 495 | // Any onsubmit javascript? |
| 443 | 496 | if (!empty($context['profile_onsubmit_javascript'])) |
| 444 | - echo ' |
|
| 497 | + { |
|
| 498 | + echo ' |
|
| 445 | 499 | ', $context['profile_onsubmit_javascript']; |
| 500 | + } |
|
| 446 | 501 | |
| 447 | 502 | echo ' |
| 448 | 503 | } |
@@ -450,12 +505,14 @@ discard block |
||
| 450 | 505 | |
| 451 | 506 | // Any final spellchecking stuff? |
| 452 | 507 | if (!empty($context['show_spellchecking'])) |
| 453 | - echo ' |
|
| 508 | + { |
|
| 509 | + echo ' |
|
| 454 | 510 | <form name="spell_form" id="spell_form" method="post" accept-charset="UTF-8" target="spellWindow" action="', $scripturl, '?action=spellcheck"> |
| 455 | 511 | <input type="hidden" id="spellstring" name="spellstring" value="" /> |
| 456 | 512 | <input type="hidden" id="fulleditor" name="fulleditor" value="" /> |
| 457 | 513 | </form>'; |
| 458 | -} |
|
| 514 | + } |
|
| 515 | + } |
|
| 459 | 516 | |
| 460 | 517 | /** |
| 461 | 518 | * Personal Message settings. |
@@ -493,8 +550,10 @@ discard block |
||
| 493 | 550 | <option value="1"', !empty($context['send_email']) && ($context['send_email'] == 1 || (empty($modSettings['enable_buddylist']) && $context['send_email'] > 1)) ? ' selected="selected"' : '', '>', $txt['email_notify_always'], '</option>'; |
| 494 | 551 | |
| 495 | 552 | if (!empty($modSettings['enable_buddylist'])) |
| 496 | - echo ' |
|
| 553 | + { |
|
| 554 | + echo ' |
|
| 497 | 555 | <option value="2"', !empty($context['send_email']) && $context['send_email'] > 1 ? ' selected="selected"' : '', '>', $txt['email_notify_buddies'], '</option>'; |
| 556 | + } |
|
| 498 | 557 | |
| 499 | 558 | echo ' |
| 500 | 559 | </select> |
@@ -562,7 +621,8 @@ discard block |
||
| 562 | 621 | </dd>'; |
| 563 | 622 | |
| 564 | 623 | if ($context['allow_no_censored']) |
| 565 | - echo ' |
|
| 624 | + { |
|
| 625 | + echo ' |
|
| 566 | 626 | <dt> |
| 567 | 627 | <label for="show_no_censored">', $txt['show_no_censored'], '</label> |
| 568 | 628 | </dt> |
@@ -570,6 +630,7 @@ discard block |
||
| 570 | 630 | <input type="hidden" name="default_options[show_no_censored]" value="0" /> |
| 571 | 631 | <input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked="checked"' : '') . ' /> |
| 572 | 632 | </dd>'; |
| 633 | + } |
|
| 573 | 634 | |
| 574 | 635 | echo ' |
| 575 | 636 | <dt> |
@@ -624,7 +685,8 @@ discard block |
||
| 624 | 685 | } |
| 625 | 686 | |
| 626 | 687 | if (!empty($modSettings['cal_enabled'])) |
| 627 | - echo ' |
|
| 688 | + { |
|
| 689 | + echo ' |
|
| 628 | 690 | <dt> |
| 629 | 691 | <label for="calendar_start_day">', $txt['calendar_start_day'], '</label> |
| 630 | 692 | </dt> |
@@ -635,9 +697,11 @@ discard block |
||
| 635 | 697 | <option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected="selected"' : '', '>', $txt['days'][6], '</option> |
| 636 | 698 | </select> |
| 637 | 699 | </dd>'; |
| 700 | + } |
|
| 638 | 701 | |
| 639 | 702 | if (!empty($modSettings['drafts_enabled']) && !empty($modSettings['drafts_autosave_enabled'])) |
| 640 | - echo ' |
|
| 703 | + { |
|
| 704 | + echo ' |
|
| 641 | 705 | <dt> |
| 642 | 706 | <label for="drafts_autosave_enabled">', $txt['drafts_autosave_enabled'], '</label> |
| 643 | 707 | </dt> |
@@ -645,6 +709,7 @@ discard block |
||
| 645 | 709 | <input type="hidden" name="default_options[drafts_autosave_enabled]" value="0" /> |
| 646 | 710 | <label for="drafts_autosave_enabled"><input type="checkbox" name="default_options[drafts_autosave_enabled]" id="drafts_autosave_enabled" value="1"', !empty($context['member']['options']['drafts_autosave_enabled']) ? ' checked="checked"' : '', ' /></label> |
| 647 | 711 | </dd>'; |
| 712 | + } |
|
| 648 | 713 | |
| 649 | 714 | echo ' |
| 650 | 715 | <dt> |
@@ -719,7 +784,8 @@ discard block |
||
| 719 | 784 | |
| 720 | 785 | // Allow notification on announcements to be disabled? |
| 721 | 786 | if (!empty($modSettings['allow_disableAnnounce'])) |
| 722 | - echo ' |
|
| 787 | + { |
|
| 788 | + echo ' |
|
| 723 | 789 | <dt> |
| 724 | 790 | <label for="notify_announcements">', $txt['notify_important_email'], '</label> |
| 725 | 791 | </dt> |
@@ -727,6 +793,7 @@ discard block |
||
| 727 | 793 | <input type="hidden" name="notify_announcements" value="0" /> |
| 728 | 794 | <input type="checkbox" id="notify_announcements" name="notify_announcements"', !empty($context['member']['notify_announcements']) ? ' checked="checked"' : '', ' /> |
| 729 | 795 | </dd>'; |
| 796 | + } |
|
| 730 | 797 | |
| 731 | 798 | // Auto notification when you reply / start a topic? |
| 732 | 799 | echo ' |
@@ -741,7 +808,8 @@ discard block |
||
| 741 | 808 | |
| 742 | 809 | // Can the body of the post be sent, PBE will ensure it can |
| 743 | 810 | if (empty($modSettings['disallow_sendBody'])) |
| 744 | - echo ' |
|
| 811 | + { |
|
| 812 | + echo ' |
|
| 745 | 813 | <dt> |
| 746 | 814 | <label for="notify_send_body">', $txt['notify_send_body' . (!empty($modSettings['maillist_enabled']) ? '_pbe' : '')], '</label> |
| 747 | 815 | </dt> |
@@ -750,6 +818,7 @@ discard block |
||
| 750 | 818 | <input type="checkbox" id="notify_send_body" name="notify_send_body"', !empty($context['member']['notify_send_body']) ? ' checked="checked"' : '', ' /> |
| 751 | 819 | ', (!empty($modSettings['maillist_enabled']) ? $txt['notify_send_body_pbe_post'] : ''), ' |
| 752 | 820 | </dd>'; |
| 821 | + } |
|
| 753 | 822 | |
| 754 | 823 | // How often do you want to hear from us, instant, daily, weekly? |
| 755 | 824 | echo ' |
@@ -823,10 +892,12 @@ discard block |
||
| 823 | 892 | |
| 824 | 893 | // Do we have an update message? |
| 825 | 894 | if (!empty($context['update_message'])) |
| 826 | - echo ' |
|
| 895 | + { |
|
| 896 | + echo ' |
|
| 827 | 897 | <div class="successbox"> |
| 828 | 898 | ', $context['update_message'], ' |
| 829 | 899 | </div>'; |
| 900 | + } |
|
| 830 | 901 | |
| 831 | 902 | // Requesting membership to a group? |
| 832 | 903 | if (!empty($context['group_request'])) |
@@ -862,10 +933,12 @@ discard block |
||
| 862 | 933 | <tr id="primdiv_', $group['id'], '">'; |
| 863 | 934 | |
| 864 | 935 | if ($context['can_edit_primary']) |
| 865 | - echo ' |
|
| 936 | + { |
|
| 937 | + echo ' |
|
| 866 | 938 | <td> |
| 867 | 939 | <input type="radio" name="primary" id="primary_', $group['id'], '" value="', $group['id'], '" ', $group['is_primary'] ? 'checked="checked" ' : '', $group['can_be_primary'] ? '' : 'disabled="disabled" ', ' /> |
| 868 | 940 | </td>'; |
| 941 | + } |
|
| 869 | 942 | |
| 870 | 943 | echo ' |
| 871 | 944 | <td> |
@@ -877,8 +950,10 @@ discard block |
||
| 877 | 950 | |
| 878 | 951 | // Can they leave their group? |
| 879 | 952 | if ($group['can_leave']) |
| 880 | - echo ' |
|
| 953 | + { |
|
| 954 | + echo ' |
|
| 881 | 955 | <a class="linkbutton" 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>'; |
| 956 | + } |
|
| 882 | 957 | echo ' |
| 883 | 958 | </td> |
| 884 | 959 | </tr>'; |
@@ -889,10 +964,12 @@ discard block |
||
| 889 | 964 | </table>'; |
| 890 | 965 | |
| 891 | 966 | if ($context['can_edit_primary']) |
| 892 | - echo ' |
|
| 967 | + { |
|
| 968 | + echo ' |
|
| 893 | 969 | <div class="submitbutton"> |
| 894 | 970 | <input type="submit" value="', $txt['make_primary'], '" /> |
| 895 | 971 | </div>'; |
| 972 | + } |
|
| 896 | 973 | |
| 897 | 974 | // Any groups they can join? |
| 898 | 975 | if (!empty($context['groups']['available'])) |
@@ -920,15 +997,21 @@ discard block |
||
| 920 | 997 | <td class="lefttext">'; |
| 921 | 998 | |
| 922 | 999 | if ($group['type'] == 3) |
| 923 | - echo ' |
|
| 1000 | + { |
|
| 1001 | + echo ' |
|
| 924 | 1002 | <a class="linkbutton_right" 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['join_group'], '</a>'; |
| 1003 | + } |
|
| 925 | 1004 | elseif ($group['type'] == 2 && $group['pending']) |
| 926 | - echo ' |
|
| 1005 | + { |
|
| 1006 | + echo ' |
|
| 927 | 1007 | ', $txt['approval_pending']; |
| 1008 | + } |
|
| 928 | 1009 | elseif ($group['type'] == 2) |
| 929 | - echo ' |
|
| 1010 | + { |
|
| 1011 | + echo ' |
|
| 930 | 1012 | <a class="linkbutton_right" href="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=groupmembership;request=', $group['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['request_group'], '</a>'; |
| 931 | -// @todo |
|
| 1013 | + } |
|
| 1014 | + // @todo |
|
| 932 | 1015 | // <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />'; |
| 933 | 1016 | |
| 934 | 1017 | echo ' |
@@ -948,16 +1031,20 @@ discard block |
||
| 948 | 1031 | prevDiv = "";'; |
| 949 | 1032 | |
| 950 | 1033 | if (isset($context['groups']['member'][$context['primary_group']])) |
| 951 | - echo ' |
|
| 1034 | + { |
|
| 1035 | + echo ' |
|
| 952 | 1036 | initHighlightSelection("primdiv_' . $context['primary_group'] . '");'; |
| 1037 | + } |
|
| 953 | 1038 | |
| 954 | 1039 | echo ' |
| 955 | 1040 | </script>'; |
| 956 | 1041 | } |
| 957 | 1042 | |
| 958 | 1043 | if (!empty($context['token_check'])) |
| 959 | - echo ' |
|
| 1044 | + { |
|
| 1045 | + echo ' |
|
| 960 | 1046 | <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />'; |
| 1047 | + } |
|
| 961 | 1048 | |
| 962 | 1049 | echo ' |
| 963 | 1050 | <input type="hidden" name="save" value="save" /> |
@@ -1011,11 +1098,13 @@ discard block |
||
| 1011 | 1098 | |
| 1012 | 1099 | // Fill the select box with all primary membergroups that can be assigned to a member. |
| 1013 | 1100 | foreach ($context['member_groups'] as $member_group) |
| 1014 | - if (!empty($member_group['can_be_primary'])) |
|
| 1101 | + { |
|
| 1102 | + if (!empty($member_group['can_be_primary'])) |
|
| 1015 | 1103 | echo ' |
| 1016 | 1104 | <option value="', $member_group['id'], '"', $member_group['is_primary'] ? ' selected="selected"' : '', '> |
| 1017 | 1105 | ', $member_group['name'], ' |
| 1018 | 1106 | </option>'; |
| 1107 | + } |
|
| 1019 | 1108 | |
| 1020 | 1109 | echo ' |
| 1021 | 1110 | </select> |
@@ -1031,11 +1120,13 @@ discard block |
||
| 1031 | 1120 | |
| 1032 | 1121 | // For each membergroup show a checkbox so members can be assigned to more than one group. |
| 1033 | 1122 | foreach ($context['member_groups'] as $member_group) |
| 1034 | - if ($member_group['can_be_additional']) |
|
| 1123 | + { |
|
| 1124 | + if ($member_group['can_be_additional']) |
|
| 1035 | 1125 | echo ' |
| 1036 | 1126 | <li> |
| 1037 | 1127 | <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="checked"' : '', ' /> ', $member_group['name'], '</label> |
| 1038 | 1128 | </li>'; |
| 1129 | + } |
|
| 1039 | 1130 | |
| 1040 | 1131 | echo ' |
| 1041 | 1132 | </ul> |
@@ -1093,20 +1184,28 @@ discard block |
||
| 1093 | 1184 | |
| 1094 | 1185 | // If there is a limit at all! |
| 1095 | 1186 | if (!empty($context['signature_limits']['max_length'])) |
| 1096 | - echo ' |
|
| 1187 | + { |
|
| 1188 | + echo ' |
|
| 1097 | 1189 | <p class="smalltext">', sprintf($txt['max_sig_characters'], $context['signature_limits']['max_length']), ' <span id="signatureLeft">', $context['signature_limits']['max_length'], '</span></p>'; |
| 1190 | + } |
|
| 1098 | 1191 | |
| 1099 | 1192 | if ($context['show_spellchecking']) |
| 1100 | - echo ' |
|
| 1193 | + { |
|
| 1194 | + echo ' |
|
| 1101 | 1195 | <input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'creator\', \'signature\', false);" tabindex="', $context['tabindex']++, '" class="right_submit" />'; |
| 1196 | + } |
|
| 1102 | 1197 | |
| 1103 | 1198 | if (!empty($context['show_preview_button'])) |
| 1104 | - echo ' |
|
| 1199 | + { |
|
| 1200 | + echo ' |
|
| 1105 | 1201 | <input type="submit" name="preview_signature" id="preview_button" value="', $txt['preview_signature'], '" tabindex="', $context['tabindex']++, '" class="right_submit" />'; |
| 1202 | + } |
|
| 1106 | 1203 | |
| 1107 | 1204 | if ($context['signature_warning']) |
| 1108 | - echo ' |
|
| 1205 | + { |
|
| 1206 | + echo ' |
|
| 1109 | 1207 | <span class="smalltext">', $context['signature_warning'], '</span>'; |
| 1208 | + } |
|
| 1110 | 1209 | |
| 1111 | 1210 | // Some javascript used to count how many characters have been used so far in the signature. |
| 1112 | 1211 | echo ' |
@@ -1179,8 +1278,10 @@ discard block |
||
| 1179 | 1278 | |
| 1180 | 1279 | // This lists all the file categories. |
| 1181 | 1280 | foreach ($context['avatars'] as $avatar) |
| 1182 | - echo ' |
|
| 1281 | + { |
|
| 1282 | + echo ' |
|
| 1183 | 1283 | <option value="', $avatar['filename'] . ($avatar['is_dir'] ? '/' : ''), '"', ($avatar['checked'] ? ' selected="selected"' : ''), '>', $avatar['name'], '</option>'; |
| 1284 | + } |
|
| 1184 | 1285 | echo ' |
| 1185 | 1286 | </select> |
| 1186 | 1287 | </div> |
@@ -1290,8 +1391,10 @@ discard block |
||
| 1290 | 1391 | |
| 1291 | 1392 | // Help the user by showing a list of common time formats. |
| 1292 | 1393 | foreach ($context['easy_timeformats'] as $time_format) |
| 1293 | - echo ' |
|
| 1394 | + { |
|
| 1395 | + echo ' |
|
| 1294 | 1396 | <option value="', $time_format['format'], '"', $time_format['format'] == $context['member']['time_format'] ? ' selected="selected"' : '', '>', $time_format['title'], '</option>'; |
| 1397 | + } |
|
| 1295 | 1398 | |
| 1296 | 1399 | echo ' |
| 1297 | 1400 | </select> |
@@ -1348,8 +1451,10 @@ discard block |
||
| 1348 | 1451 | <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\';">'; |
| 1349 | 1452 | |
| 1350 | 1453 | foreach ($context['smiley_sets'] as $set) |
| 1351 | - echo ' |
|
| 1454 | + { |
|
| 1455 | + echo ' |
|
| 1352 | 1456 | <option value="', $set['id'], '"', $set['selected'] ? ' selected="selected"' : '', '>', $set['name'], '</option>'; |
| 1457 | + } |
|
| 1353 | 1458 | |
| 1354 | 1459 | echo ' |
| 1355 | 1460 | </select> |
@@ -60,9 +60,12 @@ discard block |
||
| 60 | 60 | $diff_alternate = $diff_current - 2 * ($categories[$last_group] + 1); |
| 61 | 61 | |
| 62 | 62 | if (abs($diff_alternate) < $diff_current) |
| 63 | - array_unshift($groups[1], $last_group); |
|
| 64 | - else |
|
| 65 | - $groups[0][] = $last_group; |
|
| 63 | + { |
|
| 64 | + array_unshift($groups[1], $last_group); |
|
| 65 | + } |
|
| 66 | + else { |
|
| 67 | + $groups[0][] = $last_group; |
|
| 68 | + } |
|
| 66 | 69 | } |
| 67 | 70 | // If we have less on the left, let's try picking one from the right |
| 68 | 71 | elseif ($diff_current < 0) |
@@ -72,9 +75,12 @@ discard block |
||
| 72 | 75 | $diff_alternate = $diff_current + 2 * ($categories[$first_group] + 1); |
| 73 | 76 | |
| 74 | 77 | if (abs($diff_alternate) < abs($diff_current)) |
| 75 | - $groups[0][] = $first_group; |
|
| 76 | - else |
|
| 77 | - array_unshift($groups[1], $first_group); |
|
| 78 | + { |
|
| 79 | + $groups[0][] = $first_group; |
|
| 80 | + } |
|
| 81 | + else { |
|
| 82 | + array_unshift($groups[1], $first_group); |
|
| 83 | + } |
|
| 78 | 84 | } |
| 79 | 85 | |
| 80 | 86 | return $groups; |
@@ -106,18 +112,23 @@ discard block |
||
| 106 | 112 | |
| 107 | 113 | // If the board or children is new, show an indicator. |
| 108 | 114 | if ($board['new'] || $board['children_new']) |
| 109 | - echo ' |
|
| 115 | + { |
|
| 116 | + echo ' |
|
| 110 | 117 | <span class="board_icon ', $board['new'] ? 'i-board-new' : 'i-board-sub', '" title="', $txt['new_posts'], '"></span>'; |
| 118 | + } |
|
| 111 | 119 | |
| 112 | 120 | // Is it a redirection board? |
| 113 | 121 | elseif ($board['is_redirect']) |
| 114 | - echo ' |
|
| 122 | + { |
|
| 123 | + echo ' |
|
| 115 | 124 | <span class="board_icon i-board-redirect" title="', sprintf($txt['redirect_board_to'], Util::htmlspecialchars($board['name'])), '"></span>'; |
| 125 | + } |
|
| 116 | 126 | |
| 117 | 127 | // No new posts at all! The agony!! |
| 118 | - else |
|
| 119 | - echo ' |
|
| 128 | + else { |
|
| 129 | + echo ' |
|
| 120 | 130 | <span class="board_icon i-board-off" title="', $txt['old_posts'], '"></span>'; |
| 131 | + } |
|
| 121 | 132 | |
| 122 | 133 | echo ' |
| 123 | 134 | </a> |
@@ -126,8 +137,10 @@ discard block |
||
| 126 | 137 | |
| 127 | 138 | // Has it outstanding posts for approval? @todo - Might change presentation here. |
| 128 | 139 | if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) |
| 129 | - echo ' |
|
| 140 | + { |
|
| 141 | + echo ' |
|
| 130 | 142 | <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"><i class="icon i-alert"></i></a>'; |
| 143 | + } |
|
| 131 | 144 | |
| 132 | 145 | echo ' |
| 133 | 146 | </h3> |
@@ -135,8 +148,10 @@ discard block |
||
| 135 | 148 | |
| 136 | 149 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
| 137 | 150 | if (!empty($board['moderators'])) |
| 138 | - echo ' |
|
| 151 | + { |
|
| 152 | + echo ' |
|
| 139 | 153 | <p class="moderators">', count($board['moderators']) === 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>'; |
| 154 | + } |
|
| 140 | 155 | |
| 141 | 156 | // Show some basic information about the number of posts, etc. |
| 142 | 157 | echo ' |
@@ -156,11 +171,14 @@ discard block |
||
| 156 | 171 | <p class="board_lastpost">'; |
| 157 | 172 | |
| 158 | 173 | if (!empty($board['last_post']['member']['avatar'])) |
| 159 | - echo ' |
|
| 174 | + { |
|
| 175 | + echo ' |
|
| 160 | 176 | <span class="board_avatar"><a href="', $board['last_post']['member']['href'], '"><img class="avatar" src="', $board['last_post']['member']['avatar']['href'], '" alt="" loading="lazy" /></a></span>'; |
| 161 | - else |
|
| 162 | - echo ' |
|
| 177 | + } |
|
| 178 | + else { |
|
| 179 | + echo ' |
|
| 163 | 180 | <span class="board_avatar"><a href="#"></a></span>'; |
| 181 | + } |
|
| 164 | 182 | echo ' |
| 165 | 183 | ', $board['last_post']['last_post_message'], ' |
| 166 | 184 | </p>'; |
@@ -181,13 +199,18 @@ discard block |
||
| 181 | 199 | foreach ($board['children'] as $child) |
| 182 | 200 | { |
| 183 | 201 | if (!$child['is_redirect']) |
| 184 | - $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 ' . ($child['new'] ? 'class="new_posts" ' : '') . '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>'; |
|
| 185 | - else |
|
| 186 | - $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>'; |
|
| 202 | + { |
|
| 203 | + $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 ' . ($child['new'] ? 'class="new_posts" ' : '') . '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>'; |
|
| 204 | + } |
|
| 205 | + else { |
|
| 206 | + $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>'; |
|
| 207 | + } |
|
| 187 | 208 | |
| 188 | 209 | // Has it posts awaiting approval? |
| 189 | 210 | if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) |
| 190 | - $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"><i class="icon i-alert"></i></a>'; |
|
| 211 | + { |
|
| 212 | + $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"><i class="icon i-alert"></i></a>'; |
|
| 213 | + } |
|
| 191 | 214 | |
| 192 | 215 | $children[] = $child['link']; |
| 193 | 216 | } |
@@ -226,7 +249,8 @@ discard block |
||
| 226 | 249 | global $context, $txt; |
| 227 | 250 | |
| 228 | 251 | if ($select_all) |
| 229 | - echo ' |
|
| 252 | + { |
|
| 253 | + echo ' |
|
| 230 | 254 | <h3 class="secondary_header panel_toggle"> |
| 231 | 255 | <span> |
| 232 | 256 | <span id="advanced_panel_toggle" class="chevricon i-chevron-', $context['boards_check_all'] ? 'down' : 'up', ' hide" title="', $txt['hide'], '"></span> |
@@ -234,6 +258,7 @@ discard block |
||
| 234 | 258 | <a href="#" id="advanced_panel_link">', $txt['choose_board'], '</a> |
| 235 | 259 | </h3> |
| 236 | 260 | <div id="advanced_panel_div"', $context['boards_check_all'] ? ' class="hide"' : '', '>'; |
| 261 | + } |
|
| 237 | 262 | |
| 238 | 263 | // Make two nice columns of boards, link each category header to toggle select all boards in each |
| 239 | 264 | $group_cats = optimizeBoardsSubdivision($context['boards_in_category'], $context['num_boards']); |
@@ -70,9 +70,10 @@ discard block |
||
| 70 | 70 | <subject is_first="', $context['message']['first_in_topic'] ? '1' : '0', '"><![CDATA[', cleanXml($context['message']['subject']), ']]></subject> |
| 71 | 71 | <body><![CDATA[', $context['message']['body'], ']]></body>'; |
| 72 | 72 | } |
| 73 | - else |
|
| 74 | - echo ' |
|
| 73 | + else { |
|
| 74 | + echo ' |
|
| 75 | 75 | <error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '" in_body="', cleanXml($context['message']['error_in_body']) ? '1' : '0', '"><![CDATA[', implode('<br />', $context['message']['errors']), ']]></error>'; |
| 76 | + } |
|
| 76 | 77 | |
| 77 | 78 | echo ' |
| 78 | 79 | </message> |
@@ -94,12 +95,15 @@ discard block |
||
| 94 | 95 | echo ' |
| 95 | 96 | <modified><![CDATA[', empty($context['message']['modified']['time']) ? '' : cleanXml('« <em>' . sprintf($txt['last_edit_by'], $context['message']['modified']['time'], $context['message']['modified']['name']) . '</em> »'), ']]></modified>'; |
| 96 | 97 | if (!empty($context['message']['subject'])) |
| 97 | - echo ' |
|
| 98 | + { |
|
| 99 | + echo ' |
|
| 98 | 100 | <subject><![CDATA[', cleanXml($context['message']['subject']), ']]></subject>'; |
| 101 | + } |
|
| 99 | 102 | } |
| 100 | - else |
|
| 101 | - echo ' |
|
| 103 | + else { |
|
| 104 | + echo ' |
|
| 102 | 105 | <error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '"><![CDATA[', cleanXml(implode('<br />', $context['message']['errors'])), ']]></error>'; |
| 106 | + } |
|
| 103 | 107 | echo ' |
| 104 | 108 | </message> |
| 105 | 109 | </elk>'; |
@@ -121,9 +125,11 @@ discard block |
||
| 121 | 125 | <errors serious="', empty($context['errors']['type']) || $context['errors']['type'] != 'serious' ? '0' : '1', '" topic_locked="', $context['locked'] ? '1' : '0', '">'; |
| 122 | 126 | |
| 123 | 127 | if (!empty($context['post_error']['errors'])) |
| 124 | - foreach ($context['post_error']['errors'] as $key => $message) |
|
| 128 | + { |
|
| 129 | + foreach ($context['post_error']['errors'] as $key => $message) |
|
| 125 | 130 | echo ' |
| 126 | 131 | <error code="', cleanXml($key), '"><![CDATA[', cleanXml($message), ']]></error>'; |
| 132 | + } |
|
| 127 | 133 | |
| 128 | 134 | echo ' |
| 129 | 135 | <caption name="guestname" class="', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? 'error' : '', '" /> |
@@ -139,13 +145,15 @@ discard block |
||
| 139 | 145 | echo ' |
| 140 | 146 | <new_posts>'; |
| 141 | 147 | foreach ($context['previous_posts'] as $post) |
| 142 | - echo ' |
|
| 148 | + { |
|
| 149 | + echo ' |
|
| 143 | 150 | <post id="', $post['id'], '"> |
| 144 | 151 | <time><![CDATA[', $post['time'], ']]></time> |
| 145 | 152 | <poster><![CDATA[', cleanXml($post['poster']), ']]></poster> |
| 146 | 153 | <message><![CDATA[', cleanXml($post['body']), ']]></message> |
| 147 | 154 | <is_ignored>', $post['is_ignored'] ? '1' : '0', '</is_ignored> |
| 148 | 155 | </post>'; |
| 156 | + } |
|
| 149 | 157 | echo ' |
| 150 | 158 | </new_posts>'; |
| 151 | 159 | } |
@@ -170,9 +178,11 @@ discard block |
||
| 170 | 178 | <errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '">'; |
| 171 | 179 | |
| 172 | 180 | if (!empty($context['post_error']['errors'])) |
| 173 | - foreach ($context['post_error']['errors'] as $key => $message) |
|
| 181 | + { |
|
| 182 | + foreach ($context['post_error']['errors'] as $key => $message) |
|
| 174 | 183 | echo ' |
| 175 | 184 | <error code="', cleanXml($key), '"><![CDATA[', cleanXml($message), ']]></error>'; |
| 185 | + } |
|
| 176 | 186 | |
| 177 | 187 | // This is the not so generic section, mainly used by PM preview, can be used by others as well |
| 178 | 188 | echo ' |
@@ -197,13 +207,17 @@ discard block |
||
| 197 | 207 | echo '<', '?xml version="1.0" encoding="UTF-8"?', '> |
| 198 | 208 | <elk>'; |
| 199 | 209 | foreach ($context['yearly'] as $year) |
| 200 | - foreach ($year['months'] as $month) |
|
| 210 | + { |
|
| 211 | + foreach ($year['months'] as $month) |
|
| 201 | 212 | { |
| 202 | 213 | echo ' |
| 203 | 214 | <month id="', $month['date']['year'], $month['date']['month'], '">'; |
| 215 | + } |
|
| 204 | 216 | foreach ($month['days'] as $day) |
| 205 | - echo ' |
|
| 217 | + { |
|
| 218 | + echo ' |
|
| 206 | 219 | <day date="', $day['year'], '-', $day['month'], '-', $day['day'], '" new_topics="', $day['new_topics'], '" new_posts="', $day['new_posts'], '" new_members="', $day['new_members'], '" most_members_online="', $day['most_members_online'], '"', empty($modSettings['hitStats']) ? '' : ' hits="' . $day['hits'] . '"', ' />'; |
| 220 | + } |
|
| 207 | 221 | echo ' |
| 208 | 222 | </month>'; |
| 209 | 223 | } |
@@ -225,16 +239,19 @@ discard block |
||
| 225 | 239 | foreach ($context['changes'] as $change) |
| 226 | 240 | { |
| 227 | 241 | if ($change['type'] == 'remove') |
| 228 | - echo ' |
|
| 242 | + { |
|
| 243 | + echo ' |
|
| 229 | 244 | <change id="', $change['id'], '" curAction="remove" section="', $change['section'], '" />'; |
| 230 | - else |
|
| 231 | - echo ' |
|
| 245 | + } |
|
| 246 | + else { |
|
| 247 | + echo ' |
|
| 232 | 248 | <change id="', $change['id'], '" curAction="insert" section="', $change['section'], '"> |
| 233 | 249 | <subject><![CDATA[', cleanXml($change['insert_value']['subject']), ']]></subject> |
| 234 | 250 | <time><![CDATA[', cleanXml($change['insert_value']['time']), ']]></time> |
| 235 | 251 | <body><![CDATA[', cleanXml($change['insert_value']['body']), ']]></body> |
| 236 | 252 | <poster><![CDATA[', cleanXml($change['insert_value']['poster']), ']]></poster> |
| 237 | 253 | </change>'; |
| 254 | + } |
|
| 238 | 255 | } |
| 239 | 256 | |
| 240 | 257 | echo ' |
@@ -251,8 +268,10 @@ discard block |
||
| 251 | 268 | <elk>'; |
| 252 | 269 | |
| 253 | 270 | if (empty($context['topics'])) |
| 254 | - echo ' |
|
| 271 | + { |
|
| 272 | + echo ' |
|
| 255 | 273 | <noresults>', $txt['search_no_results'], '</noresults>'; |
| 274 | + } |
|
| 256 | 275 | else |
| 257 | 276 | { |
| 258 | 277 | echo ' |
@@ -323,8 +342,10 @@ discard block |
||
| 323 | 342 | echo ' |
| 324 | 343 | <item type="category" id="', $category['id'], '"><![CDATA[', cleanXml($category['name']), ']]></item>'; |
| 325 | 344 | foreach ($category['boards'] as $board) |
| 326 | - echo ' |
|
| 345 | + { |
|
| 346 | + echo ' |
|
| 327 | 347 | <item type="board" id="', $board['id'], '" childlevel="', $board['child_level'], '"><![CDATA[', cleanXml($board['name']), ']]></item>'; |
| 348 | + } |
|
| 328 | 349 | } |
| 329 | 350 | |
| 330 | 351 | echo ' |
@@ -342,8 +363,10 @@ discard block |
||
| 342 | 363 | <elk>'; |
| 343 | 364 | |
| 344 | 365 | foreach ($context['icons'] as $icon) |
| 345 | - echo ' |
|
| 366 | + { |
|
| 367 | + echo ' |
|
| 346 | 368 | <icon value="', $icon['value'], '" url="', $icon['url'], '"><![CDATA[', cleanXml($icon['name']), ']]></icon>'; |
| 369 | + } |
|
| 347 | 370 | |
| 348 | 371 | echo ' |
| 349 | 372 | </elk>'; |
@@ -378,8 +401,10 @@ discard block |
||
| 378 | 401 | foreach ($context['xml_data'] as $key => $val) |
| 379 | 402 | { |
| 380 | 403 | if ($key != 'error') |
| 381 | - echo ' |
|
| 404 | + { |
|
| 405 | + echo ' |
|
| 382 | 406 | <', $key, '><![CDATA[', cleanXml($val), ']]></', $key, '>'; |
| 407 | + } |
|
| 383 | 408 | } |
| 384 | 409 | |
| 385 | 410 | echo ' |
@@ -419,15 +444,19 @@ discard block |
||
| 419 | 444 | { |
| 420 | 445 | // A group? |
| 421 | 446 | if (is_array($data) && isset($data['identifier'])) |
| 422 | - template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level); |
|
| 447 | + { |
|
| 448 | + template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level); |
|
| 449 | + } |
|
| 423 | 450 | // An item... |
| 424 | 451 | elseif (is_array($data) && isset($data['value'])) |
| 425 | 452 | { |
| 426 | 453 | echo "\n", str_repeat("\t", $level), '<', $child_ident; |
| 427 | 454 | |
| 428 | 455 | if (!empty($data['attributes'])) |
| 429 | - foreach ($data['attributes'] as $k => $v) |
|
| 456 | + { |
|
| 457 | + foreach ($data['attributes'] as $k => $v) |
|
| 430 | 458 | echo ' ' . $k . '="' . $v . '"'; |
| 459 | + } |
|
| 431 | 460 | |
| 432 | 461 | echo '><![CDATA[', cleanXml($data['value']), ']]></', $child_ident, '>'; |
| 433 | 462 | } |
@@ -453,7 +482,9 @@ discard block |
||
| 453 | 482 | { |
| 454 | 483 | // Skip it, it's been set to null. |
| 455 | 484 | if ($val === null) |
| 456 | - continue; |
|
| 485 | + { |
|
| 486 | + continue; |
|
| 487 | + } |
|
| 457 | 488 | |
| 458 | 489 | // If a tag was passed, use it instead of the key. |
| 459 | 490 | $key = isset($tag) ? $tag : $key; |
@@ -470,9 +501,13 @@ discard block |
||
| 470 | 501 | |
| 471 | 502 | // If it's empty/0/nothing simply output an empty tag. |
| 472 | 503 | if ($val == '') |
| 473 | - echo '<', $key, ' />'; |
|
| 504 | + { |
|
| 505 | + echo '<', $key, ' />'; |
|
| 506 | + } |
|
| 474 | 507 | elseif ($xml_format == 'atom' && $key == 'category') |
| 475 | - echo '<', $key, ' term="', $val, '" />'; |
|
| 508 | + { |
|
| 509 | + echo '<', $key, ' term="', $val, '" />'; |
|
| 510 | + } |
|
| 476 | 511 | else |
| 477 | 512 | { |
| 478 | 513 | // Beginning tag. |
@@ -483,9 +518,12 @@ discard block |
||
| 483 | 518 | echo '<dc:format>text/html</dc:format>'; |
| 484 | 519 | } |
| 485 | 520 | elseif ($xml_format == 'atom' && $key == 'summary') |
| 486 | - echo '<', $key, ' type="html">'; |
|
| 487 | - else |
|
| 488 | - echo '<', $key, '>'; |
|
| 521 | + { |
|
| 522 | + echo '<', $key, ' type="html">'; |
|
| 523 | + } |
|
| 524 | + else { |
|
| 525 | + echo '<', $key, '>'; |
|
| 526 | + } |
|
| 489 | 527 | |
| 490 | 528 | if (is_array($val)) |
| 491 | 529 | { |
@@ -495,10 +533,13 @@ discard block |
||
| 495 | 533 | } |
| 496 | 534 | // A string with returns in it.... show this as a multiline element. |
| 497 | 535 | elseif (strpos($val, "\n") !== false || strpos($val, '<br />') !== false) |
| 498 | - echo "\n", fix_possible_url($val), "\n", str_repeat("\t", $i), '</', $key, '>'; |
|
| 536 | + { |
|
| 537 | + echo "\n", fix_possible_url($val), "\n", str_repeat("\t", $i), '</', $key, '>'; |
|
| 538 | + } |
|
| 499 | 539 | // A simple string. |
| 500 | - else |
|
| 501 | - echo fix_possible_url($val), '</', $key, '>'; |
|
| 540 | + else { |
|
| 541 | + echo fix_possible_url($val), '</', $key, '>'; |
|
| 542 | + } |
|
| 502 | 543 | } |
| 503 | 544 | } |
| 504 | 545 | } |
@@ -520,8 +561,10 @@ discard block |
||
| 520 | 561 | <rdf:Seq>'; |
| 521 | 562 | |
| 522 | 563 | foreach ($context['recent_posts_data'] as $item) |
| 523 | - echo ' |
|
| 564 | + { |
|
| 565 | + echo ' |
|
| 524 | 566 | <rdf:li rdf:resource="', $item['link'], '" />'; |
| 567 | + } |
|
| 525 | 568 | |
| 526 | 569 | echo ' |
| 527 | 570 | </rdf:Seq> |
@@ -36,7 +36,9 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | // If there are no parent boards we can see, avoid showing an empty category (unless its collapsed). |
| 38 | 38 | if (empty($category['boards']) && !$category['is_collapsed']) |
| 39 | - continue; |
|
| 39 | + { |
|
| 40 | + continue; |
|
| 41 | + } |
|
| 40 | 42 | |
| 41 | 43 | // @todo - Invent nifty class name for boardindex header bars. |
| 42 | 44 | echo ' |
@@ -45,8 +47,10 @@ discard block |
||
| 45 | 47 | |
| 46 | 48 | // If this category even can collapse, show a link to collapse it. |
| 47 | 49 | if ($category['can_collapse']) |
| 48 | - echo ' |
|
| 50 | + { |
|
| 51 | + echo ' |
|
| 49 | 52 | <a class="chevricon i-chevron-', $category['is_collapsed'] ? 'down' : 'up', '" href="', $category['collapse_href'], '" title="', $category['is_collapsed'] ? $txt['show'] : $txt['hide'], '"></a>'; |
| 53 | + } |
|
| 50 | 54 | |
| 51 | 55 | // The "category link" is only a link for logged in members. Guests just get the name. |
| 52 | 56 | echo ' |
@@ -56,7 +60,9 @@ discard block |
||
| 56 | 60 | |
| 57 | 61 | // Assuming the category hasn't been collapsed... |
| 58 | 62 | if (!$category['is_collapsed']) |
| 59 | - template_list_boards($category['boards'], 'category_' . $category['id'] . '_boards'); |
|
| 63 | + { |
|
| 64 | + template_list_boards($category['boards'], 'category_' . $category['id'] . '_boards'); |
|
| 65 | + } |
|
| 60 | 66 | |
| 61 | 67 | echo ' |
| 62 | 68 | </section>'; |
@@ -99,12 +105,16 @@ discard block |
||
| 99 | 105 | |
| 100 | 106 | // Show the mark all as read button? |
| 101 | 107 | if ($settings['show_mark_read'] && !$context['user']['is_guest'] && !empty($context['categories'])) |
| 102 | - echo ' |
|
| 108 | + { |
|
| 109 | + echo ' |
|
| 103 | 110 | ', template_button_strip($context['mark_read_button'], 'right'); |
| 111 | + } |
|
| 104 | 112 | |
| 105 | 113 | if ($context['user']['is_logged']) |
| 106 | - echo ' |
|
| 114 | + { |
|
| 115 | + echo ' |
|
| 107 | 116 | <p title="', $txt['new_posts'], '"><i class="icon i-board-new"></i>', $txt['new_posts'], '</p>'; |
| 117 | + } |
|
| 108 | 118 | |
| 109 | 119 | echo ' |
| 110 | 120 | <p title="', $txt['old_posts'], '"><i class="icon i-board-off"></i>', $txt['old_posts'], '</p> |
@@ -252,8 +262,10 @@ discard block |
||
| 252 | 262 | |
| 253 | 263 | // Holidays like "Christmas", "Hanukkah", and "We Love [Unknown] Day" :P. |
| 254 | 264 | if (!empty($context['calendar_holidays'])) |
| 255 | - echo ' |
|
| 265 | + { |
|
| 266 | + echo ' |
|
| 256 | 267 | <p class="inline holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</p>'; |
| 268 | + } |
|
| 257 | 269 | |
| 258 | 270 | // People's birthdays. Like mine. And yours, I guess. Kidding. |
| 259 | 271 | if (!empty($context['calendar_birthdays'])) |
@@ -264,8 +276,10 @@ discard block |
||
| 264 | 276 | |
| 265 | 277 | // Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) |
| 266 | 278 | foreach ($context['calendar_birthdays'] as $member) |
| 267 | - echo ' |
|
| 279 | + { |
|
| 280 | + echo ' |
|
| 268 | 281 | <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', '; |
| 282 | + } |
|
| 269 | 283 | |
| 270 | 284 | echo ' |
| 271 | 285 | </p>'; |
@@ -281,8 +295,10 @@ discard block |
||
| 281 | 295 | // Each event in calendar_events should have: |
| 282 | 296 | // title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. |
| 283 | 297 | foreach ($context['calendar_events'] as $event) |
| 284 | - echo ' |
|
| 298 | + { |
|
| 299 | + echo ' |
|
| 285 | 300 | ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '" class="icon i-modify"></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', '; |
| 301 | + } |
|
| 286 | 302 | |
| 287 | 303 | echo ' |
| 288 | 304 | </p>'; |
@@ -328,16 +344,24 @@ discard block |
||
| 328 | 344 | // Handle hidden users and buddies. |
| 329 | 345 | $bracketList = array(); |
| 330 | 346 | if ($context['show_buddies']) |
| 331 | - $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
| 347 | + { |
|
| 348 | + $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
| 349 | + } |
|
| 332 | 350 | |
| 333 | 351 | if (!empty($context['num_spiders'])) |
| 334 | - $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
| 352 | + { |
|
| 353 | + $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
| 354 | + } |
|
| 335 | 355 | |
| 336 | 356 | if (!empty($context['num_users_hidden'])) |
| 337 | - $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_users_hidden'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
| 357 | + { |
|
| 358 | + $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_users_hidden'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
| 359 | + } |
|
| 338 | 360 | |
| 339 | 361 | if (!empty($bracketList)) |
| 340 | - echo ' (' . implode(', ', $bracketList) . ')'; |
|
| 362 | + { |
|
| 363 | + echo ' (' . implode(', ', $bracketList) . ')'; |
|
| 364 | + } |
|
| 341 | 365 | |
| 342 | 366 | echo $context['show_who'] ? '</a>' : '', ' |
| 343 | 367 | </h3>'; |
@@ -350,8 +374,10 @@ discard block |
||
| 350 | 374 | |
| 351 | 375 | // Showing membergroups? |
| 352 | 376 | if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) |
| 353 | - echo ' |
|
| 377 | + { |
|
| 378 | + echo ' |
|
| 354 | 379 | <p class="inline membergroups">[' . implode(', ', $context['membergroups']) . ']</p>'; |
| 380 | + } |
|
| 355 | 381 | } |
| 356 | 382 | echo ' |
| 357 | 383 | </li>'; |