@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | foreach ($message['custom_fields']['above_member'] as $custom) |
232 | 232 | echo ' |
233 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
233 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
234 | 234 | |
235 | 235 | echo ' |
236 | 236 | </ul> |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | if (!empty($message['custom_fields']['below_avatar'])) |
280 | 280 | foreach ($message['custom_fields']['below_avatar'] as $custom) |
281 | 281 | echo ' |
282 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
282 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
283 | 283 | |
284 | 284 | if (!$message['member']['is_guest']) |
285 | 285 | echo ' |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | foreach ($message['custom_fields']['icons'] as $custom) |
323 | 323 | echo ' |
324 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
324 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
325 | 325 | |
326 | 326 | echo ' |
327 | 327 | </ol> |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | if (!empty($message['custom_fields']['standard'])) |
386 | 386 | foreach ($message['custom_fields']['standard'] as $custom) |
387 | 387 | echo ' |
388 | - <li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>'; |
|
388 | + <li class="custom ', $custom['col_name'], '">', $custom['title'], ': ', $custom['value'], '</li>'; |
|
389 | 389 | |
390 | 390 | // Are we showing the warning status? |
391 | 391 | if ($message['member']['can_see_warning']) |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | if (!empty($message['custom_fields']['bottom_poster'])) |
397 | 397 | foreach ($message['custom_fields']['bottom_poster'] as $custom) |
398 | 398 | echo ' |
399 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
399 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | // Done with the information about the poster... on to the post itself. |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | |
498 | 498 | foreach ($message['custom_fields']['above_signature'] as $custom) |
499 | 499 | echo ' |
500 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
500 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
501 | 501 | |
502 | 502 | echo ' |
503 | 503 | </ul> |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | |
521 | 521 | foreach ($message['custom_fields']['below_signature'] as $custom) |
522 | 522 | echo ' |
523 | - <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
|
523 | + <li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>'; |
|
524 | 524 | |
525 | 525 | echo ' |
526 | 526 | </ul> |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | while ($message = $context['get_pmessage']('subject')) |
657 | 657 | { |
658 | 658 | echo ' |
659 | - <tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '','"> |
|
659 | + <tr class="windowbg', $message['is_unread'] ? ' unread_pm' : '', '"> |
|
660 | 660 | <td class="table_icon"> |
661 | 661 | <script> |
662 | 662 | currentLabels[', $message['id'], '] = {'; |
@@ -956,13 +956,13 @@ discard block |
||
956 | 956 | // You can only reply if they are not a guest... |
957 | 957 | if (!$message['member']['is_guest']) |
958 | 958 | echo ' |
959 | - <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], ' |
|
960 | - <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button , '</a> ', $context['menu_separator']; |
|
959 | + <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button, '</a>', $context['menu_separator'], ' |
|
960 | + <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button, '</a> ', $context['menu_separator']; |
|
961 | 961 | |
962 | 962 | // This is for "forwarding" - even if the member is gone. |
963 | 963 | else |
964 | 964 | echo ' |
965 | - <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button , '</a>', $context['menu_separator']; |
|
965 | + <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button, '</a>', $context['menu_separator']; |
|
966 | 966 | } |
967 | 967 | |
968 | 968 | echo ' |
@@ -1062,7 +1062,7 @@ discard block |
||
1062 | 1062 | <div class="', empty($context['error_type']) || $context['error_type'] != 'serious' ? 'noticebox' : 'errorbox', '"', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors"> |
1063 | 1063 | <dl> |
1064 | 1064 | <dt> |
1065 | - <strong id="error_serious">', $txt['error_while_submitting'] , '</strong> |
|
1065 | + <strong id="error_serious">', $txt['error_while_submitting'], '</strong> |
|
1066 | 1066 | </dt> |
1067 | 1067 | <dd class="error" id="error_list"> |
1068 | 1068 | ', empty($context['post_error']['messages']) ? '' : implode('<br>', $context['post_error']['messages']), ' |
@@ -1118,7 +1118,7 @@ discard block |
||
1118 | 1118 | <span', (isset($context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', $txt['subject'], ':</span> |
1119 | 1119 | </dt> |
1120 | 1120 | <dd id="pm_subject"> |
1121 | - <input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"',isset($context['post_error']['no_subject']) ? ' class="error"' : '', '> |
|
1121 | + <input type="text" name="subject" value="', $context['subject'], '" tabindex="', $context['tabindex']++, '" size="80" maxlength="80"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', '> |
|
1122 | 1122 | </dd> |
1123 | 1123 | </dl>'; |
1124 | 1124 | |
@@ -1471,7 +1471,7 @@ discard block |
||
1471 | 1471 | echo ' |
1472 | 1472 | <div class="block righttext"> |
1473 | 1473 | <input type="submit" name="save" value="', $txt['save'], '" class="button"> |
1474 | - <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button you_sure"> |
|
1474 | + <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'], '" class="button you_sure"> |
|
1475 | 1475 | </div>'; |
1476 | 1476 | |
1477 | 1477 | echo ' |
@@ -1635,7 +1635,7 @@ discard block |
||
1635 | 1635 | if (!empty($context['rules'])) |
1636 | 1636 | echo ' |
1637 | 1637 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
1638 | - <input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button smalltext you_sure">'; |
|
1638 | + <input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'], '" class="button smalltext you_sure">'; |
|
1639 | 1639 | |
1640 | 1640 | echo ' |
1641 | 1641 | </div> |
@@ -1878,9 +1878,9 @@ discard block |
||
1878 | 1878 | |
1879 | 1879 | echo ' |
1880 | 1880 | <select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();"> |
1881 | - <option value="">', $txt['pm_rule_sel_action'] , ':</option> |
|
1882 | - <option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'] , '</option> |
|
1883 | - <option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'] , '</option> |
|
1881 | + <option value="">', $txt['pm_rule_sel_action'], ':</option> |
|
1882 | + <option value="lab"', $action['t'] == 'lab' ? ' selected' : '', '>', $txt['pm_rule_label'], '</option> |
|
1883 | + <option value="del"', $action['t'] == 'del' ? ' selected' : '', '>', $txt['pm_rule_delete'], '</option> |
|
1884 | 1884 | </select> |
1885 | 1885 | <span id="labdiv', $k, '"> |
1886 | 1886 | <select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();"> |
@@ -1992,7 +1992,7 @@ discard block |
||
1992 | 1992 | </div> |
1993 | 1993 | <ul class="quickbuttons"> |
1994 | 1994 | <li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;id_draft=', $draft['id_draft'], ';', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons modifybutton"></span>', $txt['draft_edit'], '</a></li> |
1995 | - <li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;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> |
|
1995 | + <li><a href="', $scripturl, '?action=pm;sa=showpmdrafts;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> |
|
1996 | 1996 | </ul> |
1997 | 1997 | </div><!-- .windowbg -->'; |
1998 | 1998 | } |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | <div id="personal_messages">'; |
22 | 22 | |
23 | 23 | // Show the capacity bar, if available. |
24 | - if (!empty($context['limit_bar'])) |
|
25 | - echo ' |
|
24 | + if (!empty($context['limit_bar'])) { |
|
25 | + echo ' |
|
26 | 26 | <div class="cat_bar"> |
27 | 27 | <h3 class="catbg"> |
28 | 28 | <span class="floatleft">', $txt['pm_capacity'], ':</span> |
@@ -32,14 +32,16 @@ discard block |
||
32 | 32 | <span class="floatright', $context['limit_bar']['percent'] > 90 ? ' alert' : '', '">', $context['limit_bar']['text'], '</span> |
33 | 33 | </h3> |
34 | 34 | </div>'; |
35 | + } |
|
35 | 36 | |
36 | 37 | // Message sent? Show a small indication. |
37 | - if (isset($context['pm_sent'])) |
|
38 | - echo ' |
|
38 | + if (isset($context['pm_sent'])) { |
|
39 | + echo ' |
|
39 | 40 | <div class="infobox"> |
40 | 41 | ', $txt['pm_sent'], ' |
41 | 42 | </div>'; |
42 | -} |
|
43 | + } |
|
44 | + } |
|
43 | 45 | |
44 | 46 | /** |
45 | 47 | * Just the end of the index bar, nothing special. |
@@ -68,13 +70,13 @@ discard block |
||
68 | 70 | </div> |
69 | 71 | <div class="pm_unread">'; |
70 | 72 | |
71 | - if (empty($context['unread_pms'])) |
|
72 | - echo ' |
|
73 | + if (empty($context['unread_pms'])) { |
|
74 | + echo ' |
|
73 | 75 | <div class="no_unread">', $txt['pm_no_unread'], '</div>'; |
74 | - else |
|
76 | + } else |
|
75 | 77 | { |
76 | - foreach ($context['unread_pms'] as $id_pm => $pm_details) |
|
77 | - echo ' |
|
78 | + foreach ($context['unread_pms'] as $id_pm => $pm_details) { |
|
79 | + echo ' |
|
78 | 80 | <div class="unread"> |
79 | 81 | ', !empty($pm_details['member']) ? $pm_details['member']['avatar']['image'] : '', ' |
80 | 82 | <div class="details"> |
@@ -85,6 +87,7 @@ discard block |
||
85 | 87 | </div> |
86 | 88 | </div> |
87 | 89 | </div>'; |
90 | + } |
|
88 | 91 | } |
89 | 92 | |
90 | 93 | echo ' |
@@ -193,14 +196,15 @@ discard block |
||
193 | 196 | if ($context['get_pmessage']('message', true)) |
194 | 197 | { |
195 | 198 | // Show the helpful titlebar - generally. |
196 | - if ($context['display_mode'] != 1) |
|
197 | - echo ' |
|
199 | + if ($context['display_mode'] != 1) { |
|
200 | + echo ' |
|
198 | 201 | <div class="cat_bar"> |
199 | 202 | <h3 class="catbg"> |
200 | 203 | <span id="author">', $txt['author'], '</span> |
201 | 204 | <span id="topic_title">', $txt[$context['display_mode'] == 0 ? 'messages' : 'conversation'], '</span> |
202 | 205 | </h3> |
203 | 206 | </div>'; |
207 | + } |
|
204 | 208 | |
205 | 209 | // Show a few buttons if we are in conversation mode and outputting the first message. |
206 | 210 | if ($context['display_mode'] == 2) |
@@ -228,9 +232,10 @@ discard block |
||
228 | 232 | <div class="custom_fields_above_member"> |
229 | 233 | <ul class="nolist">'; |
230 | 234 | |
231 | - foreach ($message['custom_fields']['above_member'] as $custom) |
|
232 | - echo ' |
|
235 | + foreach ($message['custom_fields']['above_member'] as $custom) { |
|
236 | + echo ' |
|
233 | 237 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
238 | + } |
|
234 | 239 | |
235 | 240 | echo ' |
236 | 241 | </ul> |
@@ -242,25 +247,28 @@ discard block |
||
242 | 247 | <a id="msg', $message['id'], '"></a>'; |
243 | 248 | |
244 | 249 | // Show online and offline buttons? |
245 | - if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) |
|
246 | - echo ' |
|
250 | + if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) { |
|
251 | + echo ' |
|
247 | 252 | <span class="' . ($message['member']['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $message['member']['online']['text'] . '"></span>'; |
253 | + } |
|
248 | 254 | |
249 | 255 | // Custom fields BEFORE the username? |
250 | - if (!empty($message['custom_fields']['before_member'])) |
|
251 | - foreach ($message['custom_fields']['before_member'] as $custom) |
|
256 | + if (!empty($message['custom_fields']['before_member'])) { |
|
257 | + foreach ($message['custom_fields']['before_member'] as $custom) |
|
252 | 258 | echo ' |
253 | 259 | <span class="custom ', $custom['col_name'], '">', $custom['value'], '</span>'; |
260 | + } |
|
254 | 261 | |
255 | 262 | // Show a link to the member's profile. |
256 | 263 | echo ' |
257 | 264 | ', $message['member']['link']; |
258 | 265 | |
259 | 266 | // Custom fields AFTER the username? |
260 | - if (!empty($message['custom_fields']['after_member'])) |
|
261 | - foreach ($message['custom_fields']['after_member'] as $custom) |
|
267 | + if (!empty($message['custom_fields']['after_member'])) { |
|
268 | + foreach ($message['custom_fields']['after_member'] as $custom) |
|
262 | 269 | echo ' |
263 | 270 | <span class="custom ', $custom['col_name'], '">', $custom['value'], '</span>'; |
271 | + } |
|
264 | 272 | |
265 | 273 | echo ' |
266 | 274 | </h4>'; |
@@ -269,48 +277,56 @@ discard block |
||
269 | 277 | <ul class="user_info">'; |
270 | 278 | |
271 | 279 | // Show the user's avatar. |
272 | - if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) |
|
273 | - echo ' |
|
280 | + if (!empty($modSettings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])) { |
|
281 | + echo ' |
|
274 | 282 | <li class="avatar"> |
275 | 283 | <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">', $message['member']['avatar']['image'], '</a> |
276 | 284 | </li>'; |
285 | + } |
|
277 | 286 | |
278 | 287 | // Are there any custom fields below the avatar? |
279 | - if (!empty($message['custom_fields']['below_avatar'])) |
|
280 | - foreach ($message['custom_fields']['below_avatar'] as $custom) |
|
288 | + if (!empty($message['custom_fields']['below_avatar'])) { |
|
289 | + foreach ($message['custom_fields']['below_avatar'] as $custom) |
|
281 | 290 | echo ' |
282 | 291 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
292 | + } |
|
283 | 293 | |
284 | - if (!$message['member']['is_guest']) |
|
285 | - echo ' |
|
294 | + if (!$message['member']['is_guest']) { |
|
295 | + echo ' |
|
286 | 296 | <li class="icons">', $message['member']['group_icons'], '</li>'; |
297 | + } |
|
287 | 298 | // Show the member's primary group (like 'Administrator') if they have one. |
288 | - if (isset($message['member']['group']) && $message['member']['group'] != '') |
|
289 | - echo ' |
|
299 | + if (isset($message['member']['group']) && $message['member']['group'] != '') { |
|
300 | + echo ' |
|
290 | 301 | <li class="membergroup">', $message['member']['group'], '</li>'; |
302 | + } |
|
291 | 303 | |
292 | 304 | // Show the member's custom title, if they have one. |
293 | - if (isset($message['member']['title']) && $message['member']['title'] != '') |
|
294 | - echo ' |
|
305 | + if (isset($message['member']['title']) && $message['member']['title'] != '') { |
|
306 | + echo ' |
|
295 | 307 | <li class="title">', $message['member']['title'], '</li>'; |
308 | + } |
|
296 | 309 | |
297 | 310 | // Don't show these things for guests. |
298 | 311 | if (!$message['member']['is_guest']) |
299 | 312 | { |
300 | 313 | // Show the post group if and only if they have no other group or the option is on, and they are in a post group. |
301 | - if ((empty($modSettings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') |
|
302 | - echo ' |
|
314 | + if ((empty($modSettings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') { |
|
315 | + echo ' |
|
303 | 316 | <li class="postgroup">', $message['member']['post_group'], '</li>'; |
317 | + } |
|
304 | 318 | |
305 | 319 | // Show how many posts they have made. |
306 | - if (!isset($context['disabled_fields']['posts'])) |
|
307 | - echo ' |
|
320 | + if (!isset($context['disabled_fields']['posts'])) { |
|
321 | + echo ' |
|
308 | 322 | <li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>'; |
323 | + } |
|
309 | 324 | |
310 | 325 | // Show their personal text? |
311 | - if (!empty($modSettings['show_blurb']) && $message['member']['blurb'] != '') |
|
312 | - echo ' |
|
326 | + if (!empty($modSettings['show_blurb']) && $message['member']['blurb'] != '') { |
|
327 | + echo ' |
|
313 | 328 | <li class="blurb">', $message['member']['blurb'], '</li>'; |
329 | + } |
|
314 | 330 | |
315 | 331 | // Any custom fields to show as icons? |
316 | 332 | if (!empty($message['custom_fields']['icons'])) |
@@ -319,9 +335,10 @@ discard block |
||
319 | 335 | <li class="im_icons"> |
320 | 336 | <ol>'; |
321 | 337 | |
322 | - foreach ($message['custom_fields']['icons'] as $custom) |
|
323 | - echo ' |
|
338 | + foreach ($message['custom_fields']['icons'] as $custom) { |
|
339 | + echo ' |
|
324 | 340 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
341 | + } |
|
325 | 342 | |
326 | 343 | echo ' |
327 | 344 | </ol> |
@@ -329,25 +346,28 @@ discard block |
||
329 | 346 | } |
330 | 347 | |
331 | 348 | // Show the IP to this user for this post - because you can moderate? |
332 | - if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip'])) |
|
333 | - echo ' |
|
349 | + if (!empty($context['can_moderate_forum']) && !empty($message['member']['ip'])) { |
|
350 | + echo ' |
|
334 | 351 | <li class="poster_ip"> |
335 | 352 | <a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqOverlayDiv(this.href);" class="help">(?)</a> |
336 | 353 | </li>'; |
354 | + } |
|
337 | 355 | |
338 | 356 | // Or, should we show it because this is you? |
339 | - elseif ($message['can_see_ip']) |
|
340 | - echo ' |
|
357 | + elseif ($message['can_see_ip']) { |
|
358 | + echo ' |
|
341 | 359 | <li class="poster_ip"> |
342 | 360 | <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $message['member']['ip'], '</a> |
343 | 361 | </li>'; |
362 | + } |
|
344 | 363 | |
345 | 364 | // Okay, you are logged in, then we can show something about why IPs are logged... |
346 | - else |
|
347 | - echo ' |
|
365 | + else { |
|
366 | + echo ' |
|
348 | 367 | <li class="poster_ip"> |
349 | 368 | <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqOverlayDiv(this.href);" class="help">', $txt['logged'], '</a> |
350 | 369 | </li>'; |
370 | + } |
|
351 | 371 | |
352 | 372 | // Show the profile, website, email address, and personal message buttons. |
353 | 373 | if ($message['member']['show_profile_buttons']) |
@@ -357,24 +377,28 @@ discard block |
||
357 | 377 | <ol class="profile_icons">'; |
358 | 378 | |
359 | 379 | // Show the profile button |
360 | - if ($message['member']['can_view_profile']) |
|
361 | - echo ' |
|
380 | + if ($message['member']['can_view_profile']) { |
|
381 | + echo ' |
|
362 | 382 | <li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.png" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '">' : $txt['view_profile']), '</a></li>'; |
383 | + } |
|
363 | 384 | |
364 | 385 | // Don't show an icon if they haven't specified a website. |
365 | - if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) |
|
366 | - echo ' |
|
386 | + if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) { |
|
387 | + echo ' |
|
367 | 388 | <li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" rel="noopener">', ($settings['use_image_buttons'] ? '<span class="generic_icons www centericon" title="' . $message['member']['website']['title'] . '"></span>' : $txt['www']), '</a></li>'; |
389 | + } |
|
368 | 390 | |
369 | 391 | // Don't show the email address if they want it hidden. |
370 | - if ($message['member']['show_email']) |
|
371 | - echo ' |
|
392 | + if ($message['member']['show_email']) { |
|
393 | + echo ' |
|
372 | 394 | <li><a href="mailto:', $message['member']['email'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<span class="generic_icons mail centericon" title="' . $txt['email'] . '"></span>' : $txt['email']), '</a></li>'; |
395 | + } |
|
373 | 396 | |
374 | 397 | // Since we know this person isn't a guest, you *can* message them. |
375 | - if ($context['can_send_pm']) |
|
376 | - echo ' |
|
398 | + if ($context['can_send_pm']) { |
|
399 | + echo ' |
|
377 | 400 | <li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<span class="generic_icons im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . ' centericon" title="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '"></span> ' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>'; |
401 | + } |
|
378 | 402 | |
379 | 403 | echo ' |
380 | 404 | </ol> |
@@ -382,21 +406,24 @@ discard block |
||
382 | 406 | } |
383 | 407 | |
384 | 408 | // Any custom fields for standard placement? |
385 | - if (!empty($message['custom_fields']['standard'])) |
|
386 | - foreach ($message['custom_fields']['standard'] as $custom) |
|
409 | + if (!empty($message['custom_fields']['standard'])) { |
|
410 | + foreach ($message['custom_fields']['standard'] as $custom) |
|
387 | 411 | echo ' |
388 | 412 | <li class="custom ', $custom['col_name'] ,'">', $custom['title'], ': ', $custom['value'], '</li>'; |
413 | + } |
|
389 | 414 | |
390 | 415 | // Are we showing the warning status? |
391 | - if ($message['member']['can_see_warning']) |
|
392 | - echo ' |
|
416 | + if ($message['member']['can_see_warning']) { |
|
417 | + echo ' |
|
393 | 418 | <li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<span class="generic_icons warning_', $message['member']['warning_status'], '"></span>', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>'; |
419 | + } |
|
394 | 420 | |
395 | 421 | // Are there any custom fields to show at the bottom of the poster info? |
396 | - if (!empty($message['custom_fields']['bottom_poster'])) |
|
397 | - foreach ($message['custom_fields']['bottom_poster'] as $custom) |
|
422 | + if (!empty($message['custom_fields']['bottom_poster'])) { |
|
423 | + foreach ($message['custom_fields']['bottom_poster'] as $custom) |
|
398 | 424 | echo ' |
399 | 425 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
426 | + } |
|
400 | 427 | } |
401 | 428 | |
402 | 429 | // Done with the information about the poster... on to the post itself. |
@@ -415,25 +442,29 @@ discard block |
||
415 | 442 | <span class="smalltext">« <strong> ', $txt['sent_to'], ':</strong> '; |
416 | 443 | |
417 | 444 | // People it was sent directly to.... |
418 | - if (!empty($message['recipients']['to'])) |
|
419 | - echo implode(', ', $message['recipients']['to']); |
|
445 | + if (!empty($message['recipients']['to'])) { |
|
446 | + echo implode(', ', $message['recipients']['to']); |
|
447 | + } |
|
420 | 448 | |
421 | 449 | // Otherwise, we're just going to say "some people"... |
422 | - elseif ($context['folder'] != 'sent') |
|
423 | - echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
450 | + elseif ($context['folder'] != 'sent') { |
|
451 | + echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
452 | + } |
|
424 | 453 | |
425 | 454 | echo ' |
426 | 455 | <strong> ', $txt['on'], ':</strong> ', $message['time'], ' » |
427 | 456 | </span>'; |
428 | 457 | |
429 | 458 | // If we're in the sent items, show who it was sent to besides the "To:" people. |
430 | - if (!empty($message['recipients']['bcc'])) |
|
431 | - echo '<br> |
|
459 | + if (!empty($message['recipients']['bcc'])) { |
|
460 | + echo '<br> |
|
432 | 461 | <span class="smalltext">« <strong> ', $txt['pm_bcc'], ':</strong> ', implode(', ', $message['recipients']['bcc']), ' »</span>'; |
462 | + } |
|
433 | 463 | |
434 | - if (!empty($message['is_replied_to'])) |
|
435 | - echo '<br> |
|
464 | + if (!empty($message['is_replied_to'])) { |
|
465 | + echo '<br> |
|
436 | 466 | <span class="smalltext">« ', $context['folder'] == 'sent' ? $txt['pm_sent_is_replied_to'] : $txt['pm_is_replied_to'], ' »</span>'; |
467 | + } |
|
437 | 468 | |
438 | 469 | echo ' |
439 | 470 | </div><!-- .keyinfo --> |
@@ -443,13 +474,15 @@ discard block |
||
443 | 474 | ', $message['body'], ' |
444 | 475 | </div>'; |
445 | 476 | |
446 | - if ($message['can_report'] || $context['can_send_pm']) |
|
447 | - echo ' |
|
477 | + if ($message['can_report'] || $context['can_send_pm']) { |
|
478 | + echo ' |
|
448 | 479 | <div class="under_message">'; |
480 | + } |
|
449 | 481 | |
450 | - if ($message['can_report']) |
|
451 | - echo ' |
|
482 | + if ($message['can_report']) { |
|
483 | + echo ' |
|
452 | 484 | <a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '" class="floatright">' . $txt['pm_report_to_admin'] . '</a>'; |
485 | + } |
|
453 | 486 | |
454 | 487 | echo ' |
455 | 488 | <ul class="quickbuttons">'; |
@@ -461,32 +494,36 @@ discard block |
||
461 | 494 | if (!$message['member']['is_guest']) |
462 | 495 | { |
463 | 496 | // Is there than more than one recipient you can reply to? |
464 | - if ($message['number_recipients'] > 1) |
|
465 | - echo ' |
|
497 | + if ($message['number_recipients'] > 1) { |
|
498 | + echo ' |
|
466 | 499 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=all"><span class="generic_icons reply_all_button"></span>', $txt['reply_to_all'], '</a></li>'; |
500 | + } |
|
467 | 501 | |
468 | 502 | echo ' |
469 | 503 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li> |
470 | 504 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote', $context['folder'] == 'sent' ? '' : ';u=' . $message['member']['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>'; |
471 | 505 | } |
472 | 506 | // This is for "forwarding" - even if the member is gone. |
473 | - else |
|
474 | - echo ' |
|
507 | + else { |
|
508 | + echo ' |
|
475 | 509 | <li><a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote"><span class="generic_icons quote"></span>', $txt['reply_quote'], '</a></li>'; |
510 | + } |
|
476 | 511 | } |
477 | 512 | echo ' |
478 | 513 | <li><a href="', $scripturl, '?action=pm;sa=pmactions;pm_actions%5b', $message['id'], '%5D=delete;f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';', $context['session_var'], '=', $context['session_id'], '" data-confirm="', addslashes($txt['remove_message_question']), '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['delete'], '</a></li>'; |
479 | 514 | |
480 | - if (empty($context['display_mode'])) |
|
481 | - echo ' |
|
515 | + if (empty($context['display_mode'])) { |
|
516 | + echo ' |
|
482 | 517 | <li><input type="checkbox" name="pms[]" id="deletedisplay', $message['id'], '" value="', $message['id'], '" onclick="document.getElementById(\'deletelisting', $message['id'], '\').checked = this.checked;"></li>'; |
518 | + } |
|
483 | 519 | |
484 | 520 | echo ' |
485 | 521 | </ul>'; |
486 | 522 | |
487 | - if ($message['can_report'] || $context['can_send_pm']) |
|
488 | - echo ' |
|
523 | + if ($message['can_report'] || $context['can_send_pm']) { |
|
524 | + echo ' |
|
489 | 525 | </div><!-- .under_message -->'; |
526 | + } |
|
490 | 527 | |
491 | 528 | // Are there any custom profile fields for above the signature? |
492 | 529 | if (!empty($message['custom_fields']['above_signature'])) |
@@ -495,9 +532,10 @@ discard block |
||
495 | 532 | <div class="custom_fields_above_signature"> |
496 | 533 | <ul class="nolist">'; |
497 | 534 | |
498 | - foreach ($message['custom_fields']['above_signature'] as $custom) |
|
499 | - echo ' |
|
535 | + foreach ($message['custom_fields']['above_signature'] as $custom) { |
|
536 | + echo ' |
|
500 | 537 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
538 | + } |
|
501 | 539 | |
502 | 540 | echo ' |
503 | 541 | </ul> |
@@ -505,11 +543,12 @@ discard block |
||
505 | 543 | } |
506 | 544 | |
507 | 545 | // Show the member's signature? |
508 | - if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) |
|
509 | - echo ' |
|
546 | + if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled']) { |
|
547 | + echo ' |
|
510 | 548 | <div class="signature"> |
511 | 549 | ', $message['member']['signature'], ' |
512 | 550 | </div>'; |
551 | + } |
|
513 | 552 | |
514 | 553 | // Are there any custom profile fields for below the signature? |
515 | 554 | if (!empty($message['custom_fields']['below_signature'])) |
@@ -518,9 +557,10 @@ discard block |
||
518 | 557 | <div class="custom_fields_below_signature"> |
519 | 558 | <ul class="nolist">'; |
520 | 559 | |
521 | - foreach ($message['custom_fields']['below_signature'] as $custom) |
|
522 | - echo ' |
|
560 | + foreach ($message['custom_fields']['below_signature'] as $custom) { |
|
561 | + echo ' |
|
523 | 562 | <li class="custom ', $custom['col_name'] ,'">', $custom['value'], '</li>'; |
563 | + } |
|
524 | 564 | |
525 | 565 | echo ' |
526 | 566 | </ul> |
@@ -547,10 +587,11 @@ discard block |
||
547 | 587 | echo ' |
548 | 588 | <option value="" disabled>', $txt['pm_msg_label_apply'], ':</option>'; |
549 | 589 | |
550 | - foreach ($context['labels'] as $label) |
|
551 | - if (!isset($message['labels'][$label['id']])) |
|
590 | + foreach ($context['labels'] as $label) { |
|
591 | + if (!isset($message['labels'][$label['id']])) |
|
552 | 592 | echo ' |
553 | 593 | <option value="', $label['id'], '">', $label['name'], '</option>'; |
594 | + } |
|
554 | 595 | } |
555 | 596 | |
556 | 597 | // ... and are there any that can be removed? |
@@ -559,9 +600,10 @@ discard block |
||
559 | 600 | echo ' |
560 | 601 | <option value="" disabled>', $txt['pm_msg_label_remove'], ':</option>'; |
561 | 602 | |
562 | - foreach ($message['labels'] as $label) |
|
563 | - echo ' |
|
603 | + foreach ($message['labels'] as $label) { |
|
604 | + echo ' |
|
564 | 605 | <option value="', $label['id'], '"> ', $label['name'], '</option>'; |
606 | + } |
|
565 | 607 | } |
566 | 608 | echo ' |
567 | 609 | </select> |
@@ -580,14 +622,15 @@ discard block |
||
580 | 622 | </div><!-- .windowbg -->'; |
581 | 623 | } |
582 | 624 | |
583 | - if (empty($context['display_mode'])) |
|
584 | - echo ' |
|
625 | + if (empty($context['display_mode'])) { |
|
626 | + echo ' |
|
585 | 627 | <div class="pagesection"> |
586 | 628 | <div class="floatleft">', $context['page_index'], '</div> |
587 | 629 | <div class="floatright"> |
588 | 630 | <input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" onclick="if (!confirm(\'', $txt['delete_selected_confirm'], '\')) return false;" class="button"> |
589 | 631 | </div> |
590 | 632 | </div>'; |
633 | + } |
|
591 | 634 | |
592 | 635 | // Show a few buttons if we are in conversation mode and outputting the first message. |
593 | 636 | elseif ($context['display_mode'] == 2 && isset($context['conversation_buttons'])) |
@@ -647,11 +690,12 @@ discard block |
||
647 | 690 | </thead> |
648 | 691 | <tbody>'; |
649 | 692 | |
650 | - if (!$context['show_delete']) |
|
651 | - echo ' |
|
693 | + if (!$context['show_delete']) { |
|
694 | + echo ' |
|
652 | 695 | <tr class="windowbg"> |
653 | 696 | <td colspan="5">', $txt['pm_alert_none'], '</td> |
654 | 697 | </tr>'; |
698 | + } |
|
655 | 699 | |
656 | 700 | while ($message = $context['get_pmessage']('subject')) |
657 | 701 | { |
@@ -709,17 +753,19 @@ discard block |
||
709 | 753 | |
710 | 754 | foreach ($context['labels'] as $label) |
711 | 755 | { |
712 | - if ($label['id'] != $context['current_label_id']) |
|
713 | - echo ' |
|
756 | + if ($label['id'] != $context['current_label_id']) { |
|
757 | + echo ' |
|
714 | 758 | <option value="add_', $label['id'], '"> ', $label['name'], '</option>'; |
759 | + } |
|
715 | 760 | } |
716 | 761 | |
717 | 762 | echo ' |
718 | 763 | <option value="" disabled>', $txt['pm_msg_label_remove'], ':</option>'; |
719 | 764 | |
720 | - foreach ($context['labels'] as $label) |
|
721 | - echo ' |
|
765 | + foreach ($context['labels'] as $label) { |
|
766 | + echo ' |
|
722 | 767 | <option value="rem_', $label['id'], '"> ', $label['name'], '</option>'; |
768 | + } |
|
723 | 769 | |
724 | 770 | echo ' |
725 | 771 | </select> |
@@ -744,11 +790,12 @@ discard block |
||
744 | 790 | { |
745 | 791 | global $context, $scripturl, $txt; |
746 | 792 | |
747 | - if (!empty($context['search_errors'])) |
|
748 | - echo ' |
|
793 | + if (!empty($context['search_errors'])) { |
|
794 | + echo ' |
|
749 | 795 | <div class="errorbox"> |
750 | 796 | ', implode('<br>', $context['search_errors']['messages']), ' |
751 | 797 | </div>'; |
798 | + } |
|
752 | 799 | |
753 | 800 | echo ' |
754 | 801 | <form action="', $scripturl, '?action=pm;sa=search2" method="post" accept-charset="', $context['character_set'], '" name="searchform" id="searchform"> |
@@ -816,9 +863,10 @@ discard block |
||
816 | 863 | </dd> |
817 | 864 | </dl>'; |
818 | 865 | |
819 | - if (!$context['currently_using_labels']) |
|
820 | - echo ' |
|
866 | + if (!$context['currently_using_labels']) { |
|
867 | + echo ' |
|
821 | 868 | <input type="submit" name="pm_search" value="', $txt['pm_search_go'], '" class="button floatright">'; |
869 | + } |
|
822 | 870 | |
823 | 871 | echo ' |
824 | 872 | </div><!-- .roundframe -->'; |
@@ -837,12 +885,13 @@ discard block |
||
837 | 885 | <div id="advanced_panel_div"> |
838 | 886 | <ul id="searchLabelsExpand">'; |
839 | 887 | |
840 | - foreach ($context['search_labels'] as $label) |
|
841 | - echo ' |
|
888 | + foreach ($context['search_labels'] as $label) { |
|
889 | + echo ' |
|
842 | 890 | <li> |
843 | 891 | <label for="searchlabel_', $label['id'], '"><input type="checkbox" id="searchlabel_', $label['id'], '" name="searchlabel[', $label['id'], ']" value="', $label['id'], '"', $label['checked'] ? ' checked' : '', '> |
844 | 892 | ', $label['name'], '</label> |
845 | 893 | </li>'; |
894 | + } |
|
846 | 895 | |
847 | 896 | echo ' |
848 | 897 | </ul> |
@@ -904,8 +953,8 @@ discard block |
||
904 | 953 | </div>'; |
905 | 954 | |
906 | 955 | // Complete results? |
907 | - if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) |
|
908 | - echo ' |
|
956 | + if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) { |
|
957 | + echo ' |
|
909 | 958 | <table class="table_grid"> |
910 | 959 | <thead> |
911 | 960 | <tr class="title_bar"> |
@@ -915,6 +964,7 @@ discard block |
||
915 | 964 | </tr> |
916 | 965 | </thead> |
917 | 966 | <tbody>'; |
967 | + } |
|
918 | 968 | |
919 | 969 | // Print each message out... |
920 | 970 | foreach ($context['personal_messages'] as $message) |
@@ -934,12 +984,14 @@ discard block |
||
934 | 984 | |
935 | 985 | // Show the recipients. |
936 | 986 | // @todo This doesn't deal with the sent item searching quite right for bcc. |
937 | - if (!empty($message['recipients']['to'])) |
|
938 | - echo implode(', ', $message['recipients']['to']); |
|
987 | + if (!empty($message['recipients']['to'])) { |
|
988 | + echo implode(', ', $message['recipients']['to']); |
|
989 | + } |
|
939 | 990 | |
940 | 991 | // Otherwise, we're just going to say "some people"... |
941 | - elseif ($context['folder'] != 'sent') |
|
942 | - echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
992 | + elseif ($context['folder'] != 'sent') { |
|
993 | + echo '(', $txt['pm_undisclosed_recipients'], ')'; |
|
994 | + } |
|
943 | 995 | |
944 | 996 | echo ' |
945 | 997 | </h3> |
@@ -954,15 +1006,17 @@ discard block |
||
954 | 1006 | $reply_button = create_button('im_reply.png', 'reply', 'reply', 'class="centericon"'); |
955 | 1007 | |
956 | 1008 | // You can only reply if they are not a guest... |
957 | - if (!$message['member']['is_guest']) |
|
958 | - echo ' |
|
1009 | + if (!$message['member']['is_guest']) { |
|
1010 | + echo ' |
|
959 | 1011 | <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote;u=', $context['folder'] == 'sent' ? '' : $message['member']['id'], '">', $quote_button , '</a>', $context['menu_separator'], ' |
960 | 1012 | <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';u=', $message['member']['id'], '">', $reply_button , '</a> ', $context['menu_separator']; |
1013 | + } |
|
961 | 1014 | |
962 | 1015 | // This is for "forwarding" - even if the member is gone. |
963 | - else |
|
964 | - echo ' |
|
1016 | + else { |
|
1017 | + echo ' |
|
965 | 1018 | <a href="', $scripturl, '?action=pm;sa=send;f=', $context['folder'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';pmsg=', $message['id'], ';quote">', $quote_button , '</a>', $context['menu_separator']; |
1019 | + } |
|
966 | 1020 | } |
967 | 1021 | |
968 | 1022 | echo ' |
@@ -971,27 +1025,30 @@ discard block |
||
971 | 1025 | } |
972 | 1026 | // Otherwise just a simple list! |
973 | 1027 | // @todo No context at all of the search? |
974 | - else |
|
975 | - echo ' |
|
1028 | + else { |
|
1029 | + echo ' |
|
976 | 1030 | <tr class="windowbg"> |
977 | 1031 | <td>', $message['time'], '</td> |
978 | 1032 | <td>', $message['link'], '</td> |
979 | 1033 | <td>', $message['member']['link'], '</td> |
980 | 1034 | </tr>'; |
1035 | + } |
|
981 | 1036 | } |
982 | 1037 | |
983 | 1038 | // Finish off the page... |
984 | - if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) |
|
985 | - echo ' |
|
1039 | + if (empty($context['search_params']['show_complete']) && !empty($context['personal_messages'])) { |
|
1040 | + echo ' |
|
986 | 1041 | </tbody> |
987 | 1042 | </table>'; |
1043 | + } |
|
988 | 1044 | |
989 | 1045 | // No results? |
990 | - if (empty($context['personal_messages'])) |
|
991 | - echo ' |
|
1046 | + if (empty($context['personal_messages'])) { |
|
1047 | + echo ' |
|
992 | 1048 | <div class="windowbg"> |
993 | 1049 | <p class="centertext">', $txt['pm_search_none_found'], '</p> |
994 | 1050 | </div>'; |
1051 | + } |
|
995 | 1052 | |
996 | 1053 | echo ' |
997 | 1054 | <div class="pagesection"> |
@@ -1016,15 +1073,17 @@ discard block |
||
1016 | 1073 | </div> |
1017 | 1074 | <div class="windowbg">'; |
1018 | 1075 | |
1019 | - if (!empty($context['send_log']['sent'])) |
|
1020 | - foreach ($context['send_log']['sent'] as $log_entry) |
|
1076 | + if (!empty($context['send_log']['sent'])) { |
|
1077 | + foreach ($context['send_log']['sent'] as $log_entry) |
|
1021 | 1078 | echo ' |
1022 | 1079 | <span class="error">', $log_entry, '</span><br>'; |
1080 | + } |
|
1023 | 1081 | |
1024 | - if (!empty($context['send_log']['failed'])) |
|
1025 | - foreach ($context['send_log']['failed'] as $log_entry) |
|
1082 | + if (!empty($context['send_log']['failed'])) { |
|
1083 | + foreach ($context['send_log']['failed'] as $log_entry) |
|
1026 | 1084 | echo ' |
1027 | 1085 | <span class="error">', $log_entry, '</span><br>'; |
1086 | + } |
|
1028 | 1087 | |
1029 | 1088 | echo ' |
1030 | 1089 | </div> |
@@ -1070,12 +1129,13 @@ discard block |
||
1070 | 1129 | </dl> |
1071 | 1130 | </div>'; |
1072 | 1131 | |
1073 | - if (!empty($modSettings['drafts_pm_enabled'])) |
|
1074 | - echo ' |
|
1132 | + if (!empty($modSettings['drafts_pm_enabled'])) { |
|
1133 | + echo ' |
|
1075 | 1134 | <div id="draft_section" class="infobox"', isset($context['draft_saved']) ? '' : ' style="display: none;"', '>', |
1076 | 1135 | sprintf($txt['draft_pm_saved'], $scripturl . '?action=pm;sa=showpmdrafts'), ' |
1077 | 1136 | ', (!empty($modSettings['drafts_keep_days']) ? ' <strong>' . sprintf($txt['draft_save_warning'], $modSettings['drafts_keep_days']) . '</strong>' : ''), ' |
1078 | 1137 | </div>'; |
1138 | + } |
|
1079 | 1139 | |
1080 | 1140 | echo ' |
1081 | 1141 | <dl id="post_header">'; |
@@ -1141,22 +1201,24 @@ discard block |
||
1141 | 1201 | <dt><strong>', $txt['subject'], '</strong></dt> |
1142 | 1202 | <dd><strong>', $txt['draft_saved_on'], '</strong></dd>'; |
1143 | 1203 | |
1144 | - foreach ($context['drafts'] as $draft) |
|
1145 | - echo ' |
|
1204 | + foreach ($context['drafts'] as $draft) { |
|
1205 | + echo ' |
|
1146 | 1206 | <dt>', $draft['link'], '</dt> |
1147 | 1207 | <dd>', $draft['poster_time'], '</dd>'; |
1208 | + } |
|
1148 | 1209 | echo ' |
1149 | 1210 | </dl> |
1150 | 1211 | </div>'; |
1151 | 1212 | } |
1152 | 1213 | |
1153 | 1214 | // Require an image to be typed to save spamming? |
1154 | - if ($context['require_verification']) |
|
1155 | - echo ' |
|
1215 | + if ($context['require_verification']) { |
|
1216 | + echo ' |
|
1156 | 1217 | <div class="post_verification"> |
1157 | 1218 | <strong>', $txt['pm_visual_verification_label'], ':</strong> |
1158 | 1219 | ', template_control_verification($context['visual_verification_id'], 'all'), ' |
1159 | 1220 | </div>'; |
1221 | + } |
|
1160 | 1222 | |
1161 | 1223 | // Send, Preview, spellcheck buttons. |
1162 | 1224 | echo ' |
@@ -1274,8 +1336,8 @@ discard block |
||
1274 | 1336 | }'; |
1275 | 1337 | |
1276 | 1338 | // Code for showing and hiding drafts |
1277 | - if (!empty($context['drafts'])) |
|
1278 | - echo ' |
|
1339 | + if (!empty($context['drafts'])) { |
|
1340 | + echo ' |
|
1279 | 1341 | var oSwapDraftOptions = new smc_Toggle({ |
1280 | 1342 | bToggleEnabled: true, |
1281 | 1343 | bCurrentlyCollapsed: true, |
@@ -1297,13 +1359,14 @@ discard block |
||
1297 | 1359 | } |
1298 | 1360 | ] |
1299 | 1361 | });'; |
1362 | + } |
|
1300 | 1363 | |
1301 | 1364 | echo ' |
1302 | 1365 | </script>'; |
1303 | 1366 | |
1304 | 1367 | // Show the message you're replying to. |
1305 | - if ($context['reply']) |
|
1306 | - echo ' |
|
1368 | + if ($context['reply']) { |
|
1369 | + echo ' |
|
1307 | 1370 | <br><br> |
1308 | 1371 | <div class="cat_bar"> |
1309 | 1372 | <h3 class="catbg">', $txt['subject'], ': ', $context['quoted_message']['subject'], '</h3> |
@@ -1317,6 +1380,7 @@ discard block |
||
1317 | 1380 | ', $context['quoted_message']['body'], ' |
1318 | 1381 | </div> |
1319 | 1382 | <br class="clear">'; |
1383 | + } |
|
1320 | 1384 | |
1321 | 1385 | echo ' |
1322 | 1386 | <script> |
@@ -1328,23 +1392,25 @@ discard block |
||
1328 | 1392 | sToControlId: \'to_control\', |
1329 | 1393 | aToRecipients: ['; |
1330 | 1394 | |
1331 | - foreach ($context['recipients']['to'] as $i => $member) |
|
1332 | - echo ' |
|
1395 | + foreach ($context['recipients']['to'] as $i => $member) { |
|
1396 | + echo ' |
|
1333 | 1397 | { |
1334 | 1398 | sItemId: ', JavaScriptEscape($member['id']), ', |
1335 | 1399 | sItemName: ', JavaScriptEscape($member['name']), ' |
1336 | 1400 | }', $i == count($context['recipients']['to']) - 1 ? '' : ','; |
1401 | + } |
|
1337 | 1402 | |
1338 | 1403 | echo ' |
1339 | 1404 | ], |
1340 | 1405 | aBccRecipients: ['; |
1341 | 1406 | |
1342 | - foreach ($context['recipients']['bcc'] as $i => $member) |
|
1343 | - echo ' |
|
1407 | + foreach ($context['recipients']['bcc'] as $i => $member) { |
|
1408 | + echo ' |
|
1344 | 1409 | { |
1345 | 1410 | sItemId: ', JavaScriptEscape($member['id']), ', |
1346 | 1411 | sItemName: ', JavaScriptEscape($member['name']), ' |
1347 | 1412 | }', $i == count($context['recipients']['bcc']) - 1 ? '' : ','; |
1413 | + } |
|
1348 | 1414 | |
1349 | 1415 | echo ' |
1350 | 1416 | ], |
@@ -1433,26 +1499,28 @@ discard block |
||
1433 | 1499 | </th> |
1434 | 1500 | <th class="centertext table_icon">'; |
1435 | 1501 | |
1436 | - if (count($context['labels']) > 2) |
|
1437 | - echo ' |
|
1502 | + if (count($context['labels']) > 2) { |
|
1503 | + echo ' |
|
1438 | 1504 | <input type="checkbox" onclick="invertAll(this, this.form);">'; |
1505 | + } |
|
1439 | 1506 | |
1440 | 1507 | echo ' |
1441 | 1508 | </th> |
1442 | 1509 | </tr> |
1443 | 1510 | </thead> |
1444 | 1511 | <tbody>'; |
1445 | - if (count($context['labels']) < 2) |
|
1446 | - echo ' |
|
1512 | + if (count($context['labels']) < 2) { |
|
1513 | + echo ' |
|
1447 | 1514 | <tr class="windowbg"> |
1448 | 1515 | <td colspan="2">', $txt['pm_labels_no_exist'], '</td> |
1449 | 1516 | </tr>'; |
1450 | - else |
|
1517 | + } else |
|
1451 | 1518 | { |
1452 | 1519 | foreach ($context['labels'] as $label) |
1453 | 1520 | { |
1454 | - if ($label['id'] == -1) |
|
1455 | - continue; |
|
1521 | + if ($label['id'] == -1) { |
|
1522 | + continue; |
|
1523 | + } |
|
1456 | 1524 | |
1457 | 1525 | echo ' |
1458 | 1526 | <tr class="windowbg"> |
@@ -1467,12 +1535,13 @@ discard block |
||
1467 | 1535 | </tbody> |
1468 | 1536 | </table>'; |
1469 | 1537 | |
1470 | - if (!count($context['labels']) < 2) |
|
1471 | - echo ' |
|
1538 | + if (!count($context['labels']) < 2) { |
|
1539 | + echo ' |
|
1472 | 1540 | <div class="block righttext"> |
1473 | 1541 | <input type="submit" name="save" value="', $txt['save'], '" class="button"> |
1474 | 1542 | <input type="submit" name="delete" value="', $txt['quickmod_delete_selected'], '" data-confirm="', $txt['pm_labels_delete'] ,'" class="button you_sure"> |
1475 | 1543 | </div>'; |
1544 | + } |
|
1476 | 1545 | |
1477 | 1546 | echo ' |
1478 | 1547 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -1528,9 +1597,10 @@ discard block |
||
1528 | 1597 | <select name="id_admin"> |
1529 | 1598 | <option value="0">', $txt['pm_report_all_admins'], '</option>'; |
1530 | 1599 | |
1531 | - foreach ($context['admins'] as $id => $name) |
|
1532 | - echo ' |
|
1600 | + foreach ($context['admins'] as $id => $name) { |
|
1601 | + echo ' |
|
1533 | 1602 | <option value="', $id, '">', $name, '</option>'; |
1603 | + } |
|
1534 | 1604 | |
1535 | 1605 | echo ' |
1536 | 1606 | </select> |
@@ -1593,9 +1663,10 @@ discard block |
||
1593 | 1663 | </th> |
1594 | 1664 | <th class="centertext table_icon">'; |
1595 | 1665 | |
1596 | - if (!empty($context['rules'])) |
|
1597 | - echo ' |
|
1666 | + if (!empty($context['rules'])) { |
|
1667 | + echo ' |
|
1598 | 1668 | <input type="checkbox" onclick="invertAll(this, this.form);">'; |
1669 | + } |
|
1599 | 1670 | |
1600 | 1671 | echo ' |
1601 | 1672 | </th> |
@@ -1603,16 +1674,17 @@ discard block |
||
1603 | 1674 | </thead> |
1604 | 1675 | <tbody>'; |
1605 | 1676 | |
1606 | - if (empty($context['rules'])) |
|
1607 | - echo ' |
|
1677 | + if (empty($context['rules'])) { |
|
1678 | + echo ' |
|
1608 | 1679 | <tr class="windowbg"> |
1609 | 1680 | <td colspan="2"> |
1610 | 1681 | ', $txt['pm_rules_none'], ' |
1611 | 1682 | </td> |
1612 | 1683 | </tr>'; |
1684 | + } |
|
1613 | 1685 | |
1614 | - foreach ($context['rules'] as $rule) |
|
1615 | - echo ' |
|
1686 | + foreach ($context['rules'] as $rule) { |
|
1687 | + echo ' |
|
1616 | 1688 | <tr class="windowbg"> |
1617 | 1689 | <td> |
1618 | 1690 | <a href="', $scripturl, '?action=pm;sa=manrules;add;rid=', $rule['id'], '">', $rule['name'], '</a> |
@@ -1621,6 +1693,7 @@ discard block |
||
1621 | 1693 | <input type="checkbox" name="delrule[', $rule['id'], ']"> |
1622 | 1694 | </td> |
1623 | 1695 | </tr>'; |
1696 | + } |
|
1624 | 1697 | |
1625 | 1698 | echo ' |
1626 | 1699 | </tbody> |
@@ -1628,14 +1701,16 @@ discard block |
||
1628 | 1701 | <div class="righttext"> |
1629 | 1702 | <a class="button" href="', $scripturl, '?action=pm;sa=manrules;add;rid=0">', $txt['pm_add_rule'], '</a>'; |
1630 | 1703 | |
1631 | - if (!empty($context['rules'])) |
|
1632 | - echo ' |
|
1704 | + if (!empty($context['rules'])) { |
|
1705 | + echo ' |
|
1633 | 1706 | [<a href="', $scripturl, '?action=pm;sa=manrules;apply;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['pm_js_apply_rules_confirm'], '\');">', $txt['pm_apply_rules'], '</a>]'; |
1707 | + } |
|
1634 | 1708 | |
1635 | - if (!empty($context['rules'])) |
|
1636 | - echo ' |
|
1709 | + if (!empty($context['rules'])) { |
|
1710 | + echo ' |
|
1637 | 1711 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
1638 | 1712 | <input type="submit" name="delselected" value="', $txt['pm_delete_selected_rule'], '" data-confirm="', $txt['pm_js_delete_rule_confirm'] ,'" class="button smalltext you_sure">'; |
1713 | + } |
|
1639 | 1714 | |
1640 | 1715 | echo ' |
1641 | 1716 | </div> |
@@ -1657,14 +1732,16 @@ discard block |
||
1657 | 1732 | var groups = new Array() |
1658 | 1733 | var labels = new Array()'; |
1659 | 1734 | |
1660 | - foreach ($context['groups'] as $id => $title) |
|
1661 | - echo ' |
|
1735 | + foreach ($context['groups'] as $id => $title) { |
|
1736 | + echo ' |
|
1662 | 1737 | groups[', $id, '] = "', addslashes($title), '";'; |
1738 | + } |
|
1663 | 1739 | |
1664 | - foreach ($context['labels'] as $label) |
|
1665 | - if ($label['id'] != -1) |
|
1740 | + foreach ($context['labels'] as $label) { |
|
1741 | + if ($label['id'] != -1) |
|
1666 | 1742 | echo ' |
1667 | 1743 | labels[', ($label['id']), '] = "', addslashes($label['name']), '";'; |
1744 | + } |
|
1668 | 1745 | |
1669 | 1746 | echo ' |
1670 | 1747 | function addCriteriaOption() |
@@ -1679,8 +1756,9 @@ discard block |
||
1679 | 1756 | |
1680 | 1757 | setOuterHTML(document.getElementById("criteriaAddHere"), \'<br><select name="ruletype[\' + criteriaNum + \']" id="ruletype\' + criteriaNum + \'" onchange="updateRuleDef(\' + criteriaNum + \'); rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_criteria_pick']), ':<\' + \'/option><option value="mid">', addslashes($txt['pm_rule_mid']), '<\' + \'/option><option value="gid">', addslashes($txt['pm_rule_gid']), '<\' + \'/option><option value="sub">', addslashes($txt['pm_rule_sub']), '<\' + \'/option><option value="msg">', addslashes($txt['pm_rule_msg']), '<\' + \'/option><option value="bud">', addslashes($txt['pm_rule_bud']), '<\' + \'/option><\' + \'/select> <span id="defdiv\' + criteriaNum + \'" style="display: none;"><input type="text" name="ruledef[\' + criteriaNum + \']" id="ruledef\' + criteriaNum + \'" onkeyup="rebuildRuleDesc();" value=""><\' + \'/span><span id="defseldiv\' + criteriaNum + \'" style="display: none;"><select name="ruledefgroup[\' + criteriaNum + \']" id="ruledefgroup\' + criteriaNum + \'" onchange="rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_group']), '<\' + \'/option>'; |
1681 | 1758 | |
1682 | - foreach ($context['groups'] as $id => $group) |
|
1683 | - echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>'; |
|
1759 | + foreach ($context['groups'] as $id => $group) { |
|
1760 | + echo '<option value="', $id, '">', strtr($group, array("'" => "\'")), '<\' + \'/option>'; |
|
1761 | + } |
|
1684 | 1762 | |
1685 | 1763 | echo '<\' + \'/select><\' + \'/span><span id="criteriaAddHere"><\' + \'/span>\'); |
1686 | 1764 | } |
@@ -1697,9 +1775,10 @@ discard block |
||
1697 | 1775 | |
1698 | 1776 | setOuterHTML(document.getElementById("actionAddHere"), \'<br><select name="acttype[\' + actionNum + \']" id="acttype\' + actionNum + \'" onchange="updateActionDef(\' + actionNum + \'); rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_action']), ':<\' + \'/option><option value="lab">', addslashes($txt['pm_rule_label']), '<\' + \'/option><option value="del">', addslashes($txt['pm_rule_delete']), '<\' + \'/option><\' + \'/select> <span id="labdiv\' + actionNum + \'" style="display: none;"><select name="labdef[\' + actionNum + \']" id="labdef\' + actionNum + \'" onchange="rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_label']), '<\' + \'/option>'; |
1699 | 1777 | |
1700 | - foreach ($context['labels'] as $label) |
|
1701 | - if ($label['id'] != -1) |
|
1778 | + foreach ($context['labels'] as $label) { |
|
1779 | + if ($label['id'] != -1) |
|
1702 | 1780 | echo '<option value="', ($label['id']), '">', addslashes($label['name']), '<\' + \'/option>'; |
1781 | + } |
|
1703 | 1782 | |
1704 | 1783 | echo '<\' + \'/select><\' + \'/span><span id="actionAddHere"><\' + \'/span>\'); |
1705 | 1784 | } |
@@ -1813,19 +1892,20 @@ discard block |
||
1813 | 1892 | $isFirst = true; |
1814 | 1893 | foreach ($context['rule']['criteria'] as $k => $criteria) |
1815 | 1894 | { |
1816 | - if (!$isFirst && $criteria['t'] == '') |
|
1817 | - echo '<div id="removeonjs1">'; |
|
1818 | - |
|
1819 | - elseif (!$isFirst) |
|
1820 | - echo '<br>'; |
|
1895 | + if (!$isFirst && $criteria['t'] == '') { |
|
1896 | + echo '<div id="removeonjs1">'; |
|
1897 | + } elseif (!$isFirst) { |
|
1898 | + echo '<br>'; |
|
1899 | + } |
|
1821 | 1900 | |
1822 | 1901 | echo ' |
1823 | 1902 | <select name="ruletype[', $k, ']" id="ruletype', $k, '" onchange="updateRuleDef(', $k, '); rebuildRuleDesc();"> |
1824 | 1903 | <option value="">', $txt['pm_rule_criteria_pick'], ':</option>'; |
1825 | 1904 | |
1826 | - foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr) |
|
1827 | - echo ' |
|
1905 | + foreach (array('mid', 'gid', 'sub', 'msg', 'bud') as $cr) { |
|
1906 | + echo ' |
|
1828 | 1907 | <option value="', $cr, '"', $criteria['t'] == $cr ? ' selected' : '', '>', $txt['pm_rule_' . $cr], '</option>'; |
1908 | + } |
|
1829 | 1909 | |
1830 | 1910 | echo ' |
1831 | 1911 | </select> |
@@ -1836,19 +1916,20 @@ discard block |
||
1836 | 1916 | <select name="ruledefgroup[', $k, ']" id="ruledefgroup', $k, '" onchange="rebuildRuleDesc();"> |
1837 | 1917 | <option value="">', $txt['pm_rule_sel_group'], '</option>'; |
1838 | 1918 | |
1839 | - foreach ($context['groups'] as $id => $group) |
|
1840 | - echo ' |
|
1919 | + foreach ($context['groups'] as $id => $group) { |
|
1920 | + echo ' |
|
1841 | 1921 | <option value="', $id, '"', $criteria['t'] == 'gid' && $criteria['v'] == $id ? ' selected' : '', '>', $group, '</option>'; |
1922 | + } |
|
1842 | 1923 | echo ' |
1843 | 1924 | </select> |
1844 | 1925 | </span>'; |
1845 | 1926 | |
1846 | 1927 | // If this is the dummy we add a means to hide for non js users. |
1847 | - if ($isFirst) |
|
1848 | - $isFirst = false; |
|
1849 | - |
|
1850 | - elseif ($criteria['t'] == '') |
|
1851 | - echo '</div><!-- .removeonjs1 -->'; |
|
1928 | + if ($isFirst) { |
|
1929 | + $isFirst = false; |
|
1930 | + } elseif ($criteria['t'] == '') { |
|
1931 | + echo '</div><!-- .removeonjs1 -->'; |
|
1932 | + } |
|
1852 | 1933 | } |
1853 | 1934 | |
1854 | 1935 | echo ' |
@@ -1871,10 +1952,11 @@ discard block |
||
1871 | 1952 | $isFirst = true; |
1872 | 1953 | foreach ($context['rule']['actions'] as $k => $action) |
1873 | 1954 | { |
1874 | - if (!$isFirst && $action['t'] == '') |
|
1875 | - echo '<div id="removeonjs2">'; |
|
1876 | - elseif (!$isFirst) |
|
1877 | - echo '<br>'; |
|
1955 | + if (!$isFirst && $action['t'] == '') { |
|
1956 | + echo '<div id="removeonjs2">'; |
|
1957 | + } elseif (!$isFirst) { |
|
1958 | + echo '<br>'; |
|
1959 | + } |
|
1878 | 1960 | |
1879 | 1961 | echo ' |
1880 | 1962 | <select name="acttype[', $k, ']" id="acttype', $k, '" onchange="updateActionDef(', $k, '); rebuildRuleDesc();"> |
@@ -1886,20 +1968,21 @@ discard block |
||
1886 | 1968 | <select name="labdef[', $k, ']" id="labdef', $k, '" onchange="rebuildRuleDesc();"> |
1887 | 1969 | <option value="">', $txt['pm_rule_sel_label'], '</option>'; |
1888 | 1970 | |
1889 | - foreach ($context['labels'] as $label) |
|
1890 | - if ($label['id'] != -1) |
|
1971 | + foreach ($context['labels'] as $label) { |
|
1972 | + if ($label['id'] != -1) |
|
1891 | 1973 | echo ' |
1892 | 1974 | <option value="', ($label['id']), '"', $action['t'] == 'lab' && $action['v'] == $label['id'] ? ' selected' : '', '>', $label['name'], '</option>'; |
1975 | + } |
|
1893 | 1976 | |
1894 | 1977 | echo ' |
1895 | 1978 | </select> |
1896 | 1979 | </span>'; |
1897 | 1980 | |
1898 | - if ($isFirst) |
|
1899 | - $isFirst = false; |
|
1900 | - |
|
1901 | - elseif ($action['t'] == '') |
|
1902 | - echo '</div><!-- .removeonjs2 -->'; |
|
1981 | + if ($isFirst) { |
|
1982 | + $isFirst = false; |
|
1983 | + } elseif ($action['t'] == '') { |
|
1984 | + echo '</div><!-- .removeonjs2 -->'; |
|
1985 | + } |
|
1903 | 1986 | } |
1904 | 1987 | |
1905 | 1988 | echo ' |
@@ -1923,22 +2006,25 @@ discard block |
||
1923 | 2006 | echo ' |
1924 | 2007 | <script>'; |
1925 | 2008 | |
1926 | - foreach ($context['rule']['criteria'] as $k => $c) |
|
1927 | - echo ' |
|
2009 | + foreach ($context['rule']['criteria'] as $k => $c) { |
|
2010 | + echo ' |
|
1928 | 2011 | updateRuleDef(', $k, ');'; |
2012 | + } |
|
1929 | 2013 | |
1930 | - foreach ($context['rule']['actions'] as $k => $c) |
|
1931 | - echo ' |
|
2014 | + foreach ($context['rule']['actions'] as $k => $c) { |
|
2015 | + echo ' |
|
1932 | 2016 | updateActionDef(', $k, ');'; |
2017 | + } |
|
1933 | 2018 | |
1934 | 2019 | echo ' |
1935 | 2020 | rebuildRuleDesc();'; |
1936 | 2021 | |
1937 | 2022 | // If this isn't a new rule and we have JS enabled remove the JS compatibility stuff. |
1938 | - if ($context['rid']) |
|
1939 | - echo ' |
|
2023 | + if ($context['rid']) { |
|
2024 | + echo ' |
|
1940 | 2025 | document.getElementById("removeonjs1").style.display = "none"; |
1941 | 2026 | document.getElementById("removeonjs2").style.display = "none";'; |
2027 | + } |
|
1942 | 2028 | |
1943 | 2029 | echo ' |
1944 | 2030 | document.getElementById("addonjs1").style.display = ""; |
@@ -1966,12 +2052,12 @@ discard block |
||
1966 | 2052 | </div>'; |
1967 | 2053 | |
1968 | 2054 | // No drafts? Just show an informative message. |
1969 | - if (empty($context['drafts'])) |
|
1970 | - echo ' |
|
2055 | + if (empty($context['drafts'])) { |
|
2056 | + echo ' |
|
1971 | 2057 | <div class="windowbg centertext"> |
1972 | 2058 | ', $txt['draft_none'], ' |
1973 | 2059 | </div>'; |
1974 | - else |
|
2060 | + } else |
|
1975 | 2061 | { |
1976 | 2062 | // For every draft to be displayed, give it its own div, and show the important details of the draft. |
1977 | 2063 | foreach ($context['drafts'] as $draft) |