@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -12,5 +12,6 @@ |
||
12 | 12 | header('Location: ' . $boardurl); |
13 | 13 | } |
14 | 14 | // Can't find it... just forget it. |
15 | -else |
|
16 | - exit; |
|
17 | 15 | \ No newline at end of file |
16 | +else { |
|
17 | + exit; |
|
18 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
4 | 4 | if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
5 | +{ |
|
5 | 6 | include (dirname(dirname(__FILE__)) . '/index.php'); |
6 | -else |
|
7 | - exit; |
|
8 | 7 | \ No newline at end of file |
8 | +} |
|
9 | +else { |
|
10 | + exit; |
|
11 | +} |
@@ -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({ |
@@ -66,7 +66,8 @@ discard block |
||
66 | 66 | </fieldset>'; |
67 | 67 | |
68 | 68 | if (!empty($context['can_move'])) |
69 | - echo ' |
|
69 | + { |
|
70 | + echo ' |
|
70 | 71 | <p> |
71 | 72 | <label for="move_new_topic"> |
72 | 73 | <input type="checkbox" name="move_new_topic" id="move_new_topic" onclick="document.getElementById(\'board_list\').style.display = this.checked ? \'\' : \'none\';" /> ', $txt['splittopic_move'], ' |
@@ -75,6 +76,7 @@ discard block |
||
75 | 76 | document.getElementById(\'board_list\').style.display = \'none\'; |
76 | 77 | </script> |
77 | 78 | </p>'; |
79 | + } |
|
78 | 80 | |
79 | 81 | echo ' |
80 | 82 | <div class="submitbutton"> |
@@ -132,7 +134,8 @@ discard block |
||
132 | 134 | <ul id="messages_not_selected" class="split_messages smalltext">'; |
133 | 135 | |
134 | 136 | foreach ($context['not_selected']['messages'] as $message) |
135 | - echo ' |
|
137 | + { |
|
138 | + echo ' |
|
136 | 139 | <li id="not_selected_', $message['id'], '"> |
137 | 140 | <div class="content"> |
138 | 141 | <div class="message_header"> |
@@ -143,6 +146,7 @@ discard block |
||
143 | 146 | <div class="post">', $message['body'], '</div> |
144 | 147 | </div> |
145 | 148 | </li>'; |
149 | + } |
|
146 | 150 | |
147 | 151 | echo ' |
148 | 152 | <li class="dummy"></li> |
@@ -160,7 +164,8 @@ discard block |
||
160 | 164 | if (!empty($context['selected']['messages'])) |
161 | 165 | { |
162 | 166 | foreach ($context['selected']['messages'] as $message) |
163 | - echo ' |
|
167 | + { |
|
168 | + echo ' |
|
164 | 169 | <li id="selected_', $message['id'], '"> |
165 | 170 | <div class="content"> |
166 | 171 | <div class="message_header"> |
@@ -171,6 +176,7 @@ discard block |
||
171 | 176 | <div class="post">', $message['body'], '</div> |
172 | 177 | </div> |
173 | 178 | </li>'; |
179 | + } |
|
174 | 180 | } |
175 | 181 | |
176 | 182 | echo ' |