@@ -1,9 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
| 4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
| 5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 6 | +} else { |
|
| 7 | 7 | exit; |
| 8 | +} |
|
| 8 | 9 | |
| 9 | 10 | ?> |
| 10 | 11 | \ No newline at end of file |
@@ -1,9 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
| 4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
| 5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 6 | +} else { |
|
| 7 | 7 | exit; |
| 8 | +} |
|
| 8 | 9 | |
| 9 | 10 | ?> |
| 10 | 11 | \ No newline at end of file |
@@ -1,9 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
| 4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
| 5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 6 | +} else { |
|
| 7 | 7 | exit; |
| 8 | +} |
|
| 8 | 9 | |
| 9 | 10 | ?> |
| 10 | 11 | \ No newline at end of file |
@@ -12,7 +12,8 @@ |
||
| 12 | 12 | header('Location: ' . $boardurl); |
| 13 | 13 | } |
| 14 | 14 | // Can't find it... just forget it. |
| 15 | -else |
|
| 15 | +else { |
|
| 16 | 16 | exit; |
| 17 | +} |
|
| 17 | 18 | |
| 18 | 19 | ?> |
| 19 | 20 | \ No newline at end of file |
@@ -1,9 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
| 4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
| 5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 6 | +} else { |
|
| 7 | 7 | exit; |
| 8 | +} |
|
| 8 | 9 | |
| 9 | 10 | ?> |
| 10 | 11 | \ No newline at end of file |
@@ -12,7 +12,8 @@ |
||
| 12 | 12 | header('Location: ' . $boardurl); |
| 13 | 13 | } |
| 14 | 14 | // Can't find it... just forget it. |
| 15 | -else |
|
| 15 | +else { |
|
| 16 | 16 | exit; |
| 17 | +} |
|
| 17 | 18 | |
| 18 | 19 | ?> |
| 19 | 20 | \ No newline at end of file |
@@ -1,9 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
| 4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
| 5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 6 | +} else { |
|
| 7 | 7 | exit; |
| 8 | +} |
|
| 8 | 9 | |
| 9 | 10 | ?> |
| 10 | 11 | \ No newline at end of file |
@@ -67,8 +67,9 @@ discard block |
||
| 67 | 67 | foreach ($context['categories'] as $category) |
| 68 | 68 | { |
| 69 | 69 | // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed) |
| 70 | - if (empty($category['boards']) && !$category['is_collapsed']) |
|
| 71 | - continue; |
|
| 70 | + if (empty($category['boards']) && !$category['is_collapsed']) { |
|
| 71 | + continue; |
|
| 72 | + } |
|
| 72 | 73 | |
| 73 | 74 | echo ' |
| 74 | 75 | <div class="main_container"> |
@@ -76,9 +77,10 @@ discard block |
||
| 76 | 77 | <h3 class="catbg">'; |
| 77 | 78 | |
| 78 | 79 | // If this category even can collapse, show a link to collapse it. |
| 79 | - if ($category['can_collapse']) |
|
| 80 | - echo ' |
|
| 80 | + if ($category['can_collapse']) { |
|
| 81 | + echo ' |
|
| 81 | 82 | <span id="category_', $category['id'], '_upshrink" class="', $category['is_collapsed'] ? 'toggle_down' : 'toggle_up', ' floatright" data-collapsed="', (int) $category['is_collapsed'], '" title="', !$category['is_collapsed'] ? $txt['hide_category'] : $txt['show_category'], '" style="display: none;"></span>'; |
| 83 | + } |
|
| 82 | 84 | |
| 83 | 85 | echo ' |
| 84 | 86 | ', $category['link'], ' |
@@ -105,17 +107,19 @@ discard block |
||
| 105 | 107 | </a>'; |
| 106 | 108 | |
| 107 | 109 | // Has it outstanding posts for approval? |
| 108 | - if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) |
|
| 109 | - echo ' |
|
| 110 | + if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics'])) { |
|
| 111 | + echo ' |
|
| 110 | 112 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > 0 ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>'; |
| 113 | + } |
|
| 111 | 114 | |
| 112 | 115 | echo ' |
| 113 | 116 | <p class="board_description">', $board['description'], '</p>'; |
| 114 | 117 | |
| 115 | 118 | // Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.) |
| 116 | - if (!empty($board['link_moderators'])) |
|
| 117 | - echo ' |
|
| 119 | + if (!empty($board['link_moderators'])) { |
|
| 120 | + echo ' |
|
| 118 | 121 | <p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>'; |
| 122 | + } |
|
| 119 | 123 | |
| 120 | 124 | // Show some basic information about the number of posts, etc. |
| 121 | 125 | echo ' |
@@ -127,9 +131,10 @@ discard block |
||
| 127 | 131 | </div> |
| 128 | 132 | <div class="lastpost ',!empty($board['last_post']['id']) ? 'lpr_border' : 'hidden', '">'; |
| 129 | 133 | |
| 130 | - if (!empty($board['last_post']['id'])) |
|
| 131 | - echo ' |
|
| 134 | + if (!empty($board['last_post']['id'])) { |
|
| 135 | + echo ' |
|
| 132 | 136 | <p>', $board['last_post']['last_post_message'], '</p>'; |
| 137 | + } |
|
| 133 | 138 | echo ' |
| 134 | 139 | </div>'; |
| 135 | 140 | // Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...) |
@@ -141,14 +146,16 @@ discard block |
||
| 141 | 146 | id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */ |
| 142 | 147 | foreach ($board['children'] as $child) |
| 143 | 148 | { |
| 144 | - if (!$child['is_redirect']) |
|
| 145 | - $child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>'; |
|
| 146 | - else |
|
| 147 | - $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>'; |
|
| 149 | + if (!$child['is_redirect']) { |
|
| 150 | + $child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>'; |
|
| 151 | + } else { |
|
| 152 | + $child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>'; |
|
| 153 | + } |
|
| 148 | 154 | |
| 149 | 155 | // Has it posts awaiting approval? |
| 150 | - if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) |
|
| 151 | - $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
| 156 | + if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics'])) { |
|
| 157 | + $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>'; |
|
| 158 | + } |
|
| 152 | 159 | |
| 153 | 160 | $children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link']; |
| 154 | 161 | } |
@@ -172,10 +179,11 @@ discard block |
||
| 172 | 179 | </div>'; |
| 173 | 180 | |
| 174 | 181 | // Show the mark all as read button? |
| 175 | - if ($context['user']['is_logged'] && !empty($context['categories'])) |
|
| 176 | - echo ' |
|
| 182 | + if ($context['user']['is_logged'] && !empty($context['categories'])) { |
|
| 183 | + echo ' |
|
| 177 | 184 | <div class="mark_read">', template_button_strip($context['mark_read_button'], 'right'), '</div>'; |
| 178 | -} |
|
| 185 | + } |
|
| 186 | + } |
|
| 179 | 187 | |
| 180 | 188 | /** |
| 181 | 189 | * The lower part of the outer layer of the board index |
@@ -192,8 +200,9 @@ discard block |
||
| 192 | 200 | { |
| 193 | 201 | global $context, $options, $txt; |
| 194 | 202 | |
| 195 | - if (empty($context['info_center'])) |
|
| 196 | - return; |
|
| 203 | + if (empty($context['info_center'])) { |
|
| 204 | + return; |
|
| 205 | + } |
|
| 197 | 206 | |
| 198 | 207 | // Here's where the "Info Center" starts... |
| 199 | 208 | echo ' |
@@ -293,14 +302,15 @@ discard block |
||
| 293 | 302 | /* Each post in latest_posts has: |
| 294 | 303 | board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), |
| 295 | 304 | subject, short_subject (shortened with...), time, link, and href. */ |
| 296 | - foreach ($context['latest_posts'] as $post) |
|
| 297 | - echo ' |
|
| 305 | + foreach ($context['latest_posts'] as $post) { |
|
| 306 | + echo ' |
|
| 298 | 307 | <tr class="windowbg"> |
| 299 | 308 | <td class="recentpost"><strong>', $post['link'], '</strong></td> |
| 300 | 309 | <td class="recentposter">', $post['poster']['link'], '</td> |
| 301 | 310 | <td class="recentboard">', $post['board']['link'], '</td> |
| 302 | 311 | <td class="recenttime">', $post['time'], '</td> |
| 303 | 312 | </tr>'; |
| 313 | + } |
|
| 304 | 314 | echo ' |
| 305 | 315 | </table>'; |
| 306 | 316 | } |
@@ -324,9 +334,10 @@ discard block |
||
| 324 | 334 | </div>'; |
| 325 | 335 | |
| 326 | 336 | // Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P. |
| 327 | - if (!empty($context['calendar_holidays'])) |
|
| 328 | - echo ' |
|
| 337 | + if (!empty($context['calendar_holidays'])) { |
|
| 338 | + echo ' |
|
| 329 | 339 | <p class="inline holiday"><span>', $txt['calendar_prompt'], '</span> ', implode(', ', $context['calendar_holidays']), '</p>'; |
| 340 | + } |
|
| 330 | 341 | |
| 331 | 342 | // People's birthdays. Like mine. And yours, I guess. Kidding. |
| 332 | 343 | if (!empty($context['calendar_birthdays'])) |
@@ -335,9 +346,10 @@ discard block |
||
| 335 | 346 | <p class="inline"> |
| 336 | 347 | <span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>'; |
| 337 | 348 | // Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) |
| 338 | - foreach ($context['calendar_birthdays'] as $member) |
|
| 339 | - echo ' |
|
| 349 | + foreach ($context['calendar_birthdays'] as $member) { |
|
| 350 | + echo ' |
|
| 340 | 351 | <a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', '; |
| 352 | + } |
|
| 341 | 353 | echo ' |
| 342 | 354 | </p>'; |
| 343 | 355 | } |
@@ -351,9 +363,10 @@ discard block |
||
| 351 | 363 | |
| 352 | 364 | // Each event in calendar_events should have: |
| 353 | 365 | // title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. |
| 354 | - foreach ($context['calendar_events'] as $event) |
|
| 355 | - echo ' |
|
| 366 | + foreach ($context['calendar_events'] as $event) { |
|
| 367 | + echo ' |
|
| 356 | 368 | ', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><span class="generic_icons calendar_modify"></span></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br>' : ', '; |
| 369 | + } |
|
| 357 | 370 | echo ' |
| 358 | 371 | </p>'; |
| 359 | 372 | } |
@@ -398,15 +411,19 @@ discard block |
||
| 398 | 411 | |
| 399 | 412 | // Handle hidden users and buddies. |
| 400 | 413 | $bracketList = array(); |
| 401 | - if ($context['show_buddies']) |
|
| 402 | - $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
| 403 | - if (!empty($context['num_spiders'])) |
|
| 404 | - $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
| 405 | - if (!empty($context['num_users_hidden'])) |
|
| 406 | - $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
| 414 | + if ($context['show_buddies']) { |
|
| 415 | + $bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']); |
|
| 416 | + } |
|
| 417 | + if (!empty($context['num_spiders'])) { |
|
| 418 | + $bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']); |
|
| 419 | + } |
|
| 420 | + if (!empty($context['num_users_hidden'])) { |
|
| 421 | + $bracketList[] = comma_format($context['num_users_hidden']) . ' ' . ($context['num_spiders'] == 1 ? $txt['hidden'] : $txt['hidden_s']); |
|
| 422 | + } |
|
| 407 | 423 | |
| 408 | - if (!empty($bracketList)) |
|
| 409 | - echo ' (' . implode(', ', $bracketList) . ')'; |
|
| 424 | + if (!empty($bracketList)) { |
|
| 425 | + echo ' (' . implode(', ', $bracketList) . ')'; |
|
| 426 | + } |
|
| 410 | 427 | |
| 411 | 428 | echo $context['show_who'] ? '</a>' : '', ' |
| 412 | 429 | |
@@ -420,9 +437,10 @@ discard block |
||
| 420 | 437 | ', sprintf($txt['users_active'], $modSettings['lastActive']), ': ', implode(', ', $context['list_users_online']); |
| 421 | 438 | |
| 422 | 439 | // Showing membergroups? |
| 423 | - if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) |
|
| 424 | - echo ' |
|
| 440 | + if (!empty($settings['show_group_key']) && !empty($context['membergroups'])) { |
|
| 441 | + echo ' |
|
| 425 | 442 | <span class="membergroups">' . implode(', ', $context['membergroups']) . '</span>'; |
| 443 | + } |
|
| 426 | 444 | } |
| 427 | 445 | |
| 428 | 446 | echo ' |
@@ -55,18 +55,20 @@ discard block |
||
| 55 | 55 | <div class="modbox"> |
| 56 | 56 | <ul>'; |
| 57 | 57 | |
| 58 | - foreach ($context['group_requests'] as $request) |
|
| 59 | - echo ' |
|
| 58 | + foreach ($context['group_requests'] as $request) { |
|
| 59 | + echo ' |
|
| 60 | 60 | <li class="smalltext"> |
| 61 | 61 | <a href="', $request['request_href'], '">', $request['group']['name'], '</a> ', $txt['mc_groupr_by'], ' ', $request['member']['link'], ' |
| 62 | 62 | </li>'; |
| 63 | + } |
|
| 63 | 64 | |
| 64 | 65 | // Don't have any watched users right now? |
| 65 | - if (empty($context['group_requests'])) |
|
| 66 | - echo ' |
|
| 66 | + if (empty($context['group_requests'])) { |
|
| 67 | + echo ' |
|
| 67 | 68 | <li> |
| 68 | 69 | <strong class="smalltext">', $txt['mc_group_requests_none'], '</strong> |
| 69 | 70 | </li>'; |
| 71 | + } |
|
| 70 | 72 | |
| 71 | 73 | echo ' |
| 72 | 74 | </ul> |
@@ -124,18 +126,20 @@ discard block |
||
| 124 | 126 | <div class="modbox"> |
| 125 | 127 | <ul>'; |
| 126 | 128 | |
| 127 | - foreach ($context['watched_users'] as $user) |
|
| 128 | - echo ' |
|
| 129 | + foreach ($context['watched_users'] as $user) { |
|
| 130 | + echo ' |
|
| 129 | 131 | <li> |
| 130 | 132 | <span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span> |
| 131 | 133 | </li>'; |
| 134 | + } |
|
| 132 | 135 | |
| 133 | 136 | // Don't have any watched users right now? |
| 134 | - if (empty($context['watched_users'])) |
|
| 135 | - echo ' |
|
| 137 | + if (empty($context['watched_users'])) { |
|
| 138 | + echo ' |
|
| 136 | 139 | <li> |
| 137 | 140 | <strong class="smalltext">', $txt['mc_watched_users_none'], '</strong> |
| 138 | 141 | </li>'; |
| 142 | + } |
|
| 139 | 143 | |
| 140 | 144 | echo ' |
| 141 | 145 | </ul> |
@@ -193,18 +197,20 @@ discard block |
||
| 193 | 197 | <div class="modbox"> |
| 194 | 198 | <ul>'; |
| 195 | 199 | |
| 196 | - foreach ($context['reported_posts'] as $post) |
|
| 197 | - echo ' |
|
| 200 | + foreach ($context['reported_posts'] as $post) { |
|
| 201 | + echo ' |
|
| 198 | 202 | <li> |
| 199 | 203 | <span class="smalltext">', sprintf($txt['mc_post_report'], $post['report_link'], $post['author']['link']), '</span> |
| 200 | 204 | </li>'; |
| 205 | + } |
|
| 201 | 206 | |
| 202 | 207 | // Don't have any watched users right now? |
| 203 | - if (empty($context['reported_posts'])) |
|
| 204 | - echo ' |
|
| 208 | + if (empty($context['reported_posts'])) { |
|
| 209 | + echo ' |
|
| 205 | 210 | <li> |
| 206 | 211 | <strong class="smalltext">', $txt['mc_recent_reports_none'], '</strong> |
| 207 | 212 | </li>'; |
| 213 | + } |
|
| 208 | 214 | |
| 209 | 215 | echo ' |
| 210 | 216 | </ul> |
@@ -262,18 +268,20 @@ discard block |
||
| 262 | 268 | <div class="modbox"> |
| 263 | 269 | <ul>'; |
| 264 | 270 | |
| 265 | - foreach ($context['reported_users'] as $user) |
|
| 266 | - echo ' |
|
| 271 | + foreach ($context['reported_users'] as $user) { |
|
| 272 | + echo ' |
|
| 267 | 273 | <li> |
| 268 | 274 | <span class="smalltext">', $user['user']['link'], '</span> |
| 269 | 275 | </li>'; |
| 276 | + } |
|
| 270 | 277 | |
| 271 | 278 | // Don't have any watched users right now? |
| 272 | - if (empty($context['reported_users'])) |
|
| 273 | - echo ' |
|
| 279 | + if (empty($context['reported_users'])) { |
|
| 280 | + echo ' |
|
| 274 | 281 | <li> |
| 275 | 282 | <strong class="smalltext">', $txt['mc_reported_users_none'], '</strong> |
| 276 | 283 | </li>'; |
| 284 | + } |
|
| 277 | 285 | |
| 278 | 286 | echo ' |
| 279 | 287 | </ul> |
@@ -344,9 +352,10 @@ discard block |
||
| 344 | 352 | <ul class="moderation_notes">'; |
| 345 | 353 | |
| 346 | 354 | // Cycle through the notes. |
| 347 | - foreach ($context['notes'] as $note) |
|
| 348 | - echo ' |
|
| 355 | + foreach ($context['notes'] as $note) { |
|
| 356 | + echo ' |
|
| 349 | 357 | <li class="smalltext">', ($note['can_delete'] ? '<a href="' . $note['delete_href'] . ';' . $context['mod-modnote-del_token_var'] . '=' . $context['mod-modnote-del_token'] . '" data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"><span class="generic_icons delete"></span></a>' : ''), $note['time'], ' <strong>', $note['author']['link'], ':</strong> ', $note['text'], '</li>'; |
| 358 | + } |
|
| 350 | 359 | |
| 351 | 360 | echo ' |
| 352 | 361 | </ul> |
@@ -388,16 +397,17 @@ discard block |
||
| 388 | 397 | $remove_button = create_button('delete', 'remove_message', 'remove'); |
| 389 | 398 | |
| 390 | 399 | // No posts? |
| 391 | - if (empty($context['unapproved_items'])) |
|
| 392 | - echo ' |
|
| 400 | + if (empty($context['unapproved_items'])) { |
|
| 401 | + echo ' |
|
| 393 | 402 | <div class="windowbg2"> |
| 394 | 403 | <p class="centertext">', $txt['mc_unapproved_' . $context['current_view'] . '_none_found'], '</p> |
| 395 | 404 | </div>'; |
| 396 | - else |
|
| 397 | - echo ' |
|
| 405 | + } else { |
|
| 406 | + echo ' |
|
| 398 | 407 | <div class="pagesection floatleft"> |
| 399 | 408 | ', $context['page_index'], ' |
| 400 | 409 | </div>'; |
| 410 | + } |
|
| 401 | 411 | |
| 402 | 412 | foreach ($context['unapproved_items'] as $item) |
| 403 | 413 | { |
@@ -414,14 +424,16 @@ discard block |
||
| 414 | 424 | <span class="floatright"> |
| 415 | 425 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';approve=', $item['id'], '">', $approve_button, '</a>'; |
| 416 | 426 | |
| 417 | - if ($item['can_delete']) |
|
| 418 | - echo ' |
|
| 427 | + if ($item['can_delete']) { |
|
| 428 | + echo ' |
|
| 419 | 429 | ', $context['menu_separator'], ' |
| 420 | 430 | <a href="', $scripturl, '?action=moderate;area=postmod;sa=', $context['current_view'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], ';delete=', $item['id'], '">', $remove_button, '</a>'; |
| 431 | + } |
|
| 421 | 432 | |
| 422 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 423 | - echo ' |
|
| 433 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 434 | + echo ' |
|
| 424 | 435 | <input type="checkbox" name="item[]" value="', $item['id'], '" checked class="input_check"> '; |
| 436 | + } |
|
| 425 | 437 | |
| 426 | 438 | echo ' |
| 427 | 439 | </span> |
@@ -431,8 +443,8 @@ discard block |
||
| 431 | 443 | echo ' |
| 432 | 444 | <div class="pagesection">'; |
| 433 | 445 | |
| 434 | - if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) |
|
| 435 | - echo ' |
|
| 446 | + if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) { |
|
| 447 | + echo ' |
|
| 436 | 448 | <div class="floatright"> |
| 437 | 449 | <select name="do" onchange="if (this.value != 0 && confirm(\'', $txt['mc_unapproved_sure'], '\')) submit();"> |
| 438 | 450 | <option value="0">', $txt['with_selected'], ':</option> |
@@ -442,12 +454,14 @@ discard block |
||
| 442 | 454 | </select> |
| 443 | 455 | <noscript><input type="submit" name="mc_go" value="', $txt['go'], '" class="button_submit"></noscript> |
| 444 | 456 | </div>'; |
| 457 | + } |
|
| 445 | 458 | |
| 446 | - if (!empty($context['unapproved_items'])) |
|
| 447 | - echo ' |
|
| 459 | + if (!empty($context['unapproved_items'])) { |
|
| 460 | + echo ' |
|
| 448 | 461 | <div class="floatleft"> |
| 449 | 462 | <div class="pagelinks">', $context['page_index'], '</div> |
| 450 | 463 | </div>'; |
| 464 | + } |
|
| 451 | 465 | |
| 452 | 466 | echo ' |
| 453 | 467 | </div> |
@@ -467,8 +481,9 @@ discard block |
||
| 467 | 481 | global $scripturl, $context, $txt, $delete_button; |
| 468 | 482 | |
| 469 | 483 | // We'll have a delete please bob. |
| 470 | - if (empty($delete_button)) |
|
| 471 | - $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
| 484 | + if (empty($delete_button)) { |
|
| 485 | + $delete_button = create_button('delete', 'remove_message', 'remove', 'class="centericon"'); |
|
| 486 | + } |
|
| 472 | 487 | |
| 473 | 488 | $output_html = ' |
| 474 | 489 | <div> |
@@ -477,10 +492,11 @@ discard block |
||
| 477 | 492 | </div> |
| 478 | 493 | <div class="floatright">'; |
| 479 | 494 | |
| 480 | - if ($post['can_delete']) |
|
| 481 | - $output_html .= ' |
|
| 495 | + if ($post['can_delete']) { |
|
| 496 | + $output_html .= ' |
|
| 482 | 497 | <a href="' . $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure">' . $delete_button . '</a> |
| 483 | 498 | <input type="checkbox" name="delete[]" value="' . $post['id'] . '" class="input_check">'; |
| 499 | + } |
|
| 484 | 500 | |
| 485 | 501 | $output_html .= ' |
| 486 | 502 | </div> |
@@ -522,12 +538,12 @@ discard block |
||
| 522 | 538 | <input type="submit" name="save" value="', $txt['save'], '" class="button_submit"> |
| 523 | 539 | </div> |
| 524 | 540 | </form>'; |
| 525 | - } |
|
| 526 | - else |
|
| 527 | - echo ' |
|
| 541 | + } else { |
|
| 542 | + echo ' |
|
| 528 | 543 | <div class="windowbg"> |
| 529 | 544 | <div class="centertext">', $txt['mc_no_settings'], '</div> |
| 530 | 545 | </div>'; |
| 546 | + } |
|
| 531 | 547 | |
| 532 | 548 | echo ' |
| 533 | 549 | </div>'; |
@@ -623,8 +639,8 @@ discard block |
||
| 623 | 639 | </dd> |
| 624 | 640 | </dl>'; |
| 625 | 641 | |
| 626 | - if ($context['template_data']['can_edit_personal']) |
|
| 627 | - echo ' |
|
| 642 | + if ($context['template_data']['can_edit_personal']) { |
|
| 643 | + echo ' |
|
| 628 | 644 | <input type="checkbox" name="make_personal" id="make_personal"', $context['template_data']['personal'] ? ' checked' : '', ' class="input_check"> |
| 629 | 645 | <label for="make_personal"> |
| 630 | 646 | <strong>', $txt['mc_warning_template_personal'], '</strong> |
@@ -632,6 +648,7 @@ discard block |
||
| 632 | 648 | <br> |
| 633 | 649 | <span class="smalltext">', $txt['mc_warning_template_personal_desc'], '</span> |
| 634 | 650 | <br>'; |
| 651 | + } |
|
| 635 | 652 | |
| 636 | 653 | echo ' |
| 637 | 654 | <hr> |