@@ -144,11 +144,12 @@ discard block |
||
| 144 | 144 | <div class="question">', $txt['poll_question'], ': <strong>', $context['poll']['question'], '</strong>'; |
| 145 | 145 | |
| 146 | 146 | $options = 1; |
| 147 | - foreach ($context['poll']['options'] as $option) |
|
| 148 | - echo ' |
|
| 147 | + foreach ($context['poll']['options'] as $option) { |
|
| 148 | + echo ' |
|
| 149 | 149 | <div class="', $option['voted_this'] ? 'voted' : '', '">', $txt['option'], ' ', $options++, ': <strong>', $option['option'], '</strong> |
| 150 | 150 | ', $context['allow_poll_view'] ? $txt['votes'] . ': ' . $option['votes'] . '' : '', ' |
| 151 | 151 | </div>'; |
| 152 | + } |
|
| 152 | 153 | |
| 153 | 154 | echo ' |
| 154 | 155 | </div>'; |
@@ -170,9 +171,10 @@ discard block |
||
| 170 | 171 | echo ' |
| 171 | 172 | <hr>'; |
| 172 | 173 | |
| 173 | - foreach ($context['printattach'][$post['id_msg']] as $attach) |
|
| 174 | - echo ' |
|
| 174 | + foreach ($context['printattach'][$post['id_msg']] as $attach) { |
|
| 175 | + echo ' |
|
| 175 | 176 | <img width="' . $attach['width'] . '" height="' . $attach['height'] . '" src="', $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attach['id_attach'] . '" alt="">'; |
| 177 | + } |
|
| 176 | 178 | } |
| 177 | 179 | |
| 178 | 180 | echo ' |
@@ -207,12 +209,13 @@ discard block |
||
| 207 | 209 | <div class="print_options">'; |
| 208 | 210 | |
| 209 | 211 | // Which option is set, text or text&images |
| 210 | - if (isset($_REQUEST['images'])) |
|
| 211 | - echo ' |
|
| 212 | + if (isset($_REQUEST['images'])) { |
|
| 213 | + echo ' |
|
| 212 | 214 | <a href="', $url_text, '">', $txt['print_page_text'], '</a> | <strong><a href="', $url_images, '">', $txt['print_page_images'], '</a></strong>'; |
| 213 | - else |
|
| 214 | - echo ' |
|
| 215 | + } else { |
|
| 216 | + echo ' |
|
| 215 | 217 | <strong><a href="', $url_text, '">', $txt['print_page_text'], '</a></strong> | <a href="', $url_images, '">', $txt['print_page_images'], '</a>'; |
| 218 | + } |
|
| 216 | 219 | |
| 217 | 220 | echo ' |
| 218 | 221 | </div><!-- .print_options -->'; |
@@ -26,9 +26,10 @@ discard block |
||
| 26 | 26 | </div> |
| 27 | 27 | <div class="pagesection">', $context['page_index'], '</div>'; |
| 28 | 28 | |
| 29 | - if (empty($context['posts'])) |
|
| 30 | - echo ' |
|
| 29 | + if (empty($context['posts'])) { |
|
| 30 | + echo ' |
|
| 31 | 31 | <div class="windowbg">', $txt['no_messages'], '</div>'; |
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | foreach ($context['posts'] as $post) |
| 34 | 35 | { |
@@ -41,28 +42,33 @@ discard block |
||
| 41 | 42 | </div> |
| 42 | 43 | <div class="list_posts">', $post['message'], '</div>'; |
| 43 | 44 | |
| 44 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
| 45 | - echo ' |
|
| 45 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
| 46 | + echo ' |
|
| 46 | 47 | <ul class="quickbuttons">'; |
| 48 | + } |
|
| 47 | 49 | |
| 48 | 50 | // If they *can* reply? |
| 49 | - if ($post['can_reply']) |
|
| 50 | - echo ' |
|
| 51 | + if ($post['can_reply']) { |
|
| 52 | + echo ' |
|
| 51 | 53 | <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '"><span class="generic_icons reply_button"></span>', $txt['reply'], '</a></li>'; |
| 54 | + } |
|
| 52 | 55 | |
| 53 | 56 | // If they *can* quote? |
| 54 | - if ($post['can_quote']) |
|
| 55 | - echo ' |
|
| 57 | + if ($post['can_quote']) { |
|
| 58 | + echo ' |
|
| 56 | 59 | <li><a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], ';quote=', $post['id'], '"><span class="generic_icons quote"></span>', $txt['quote_action'], '</a></li>'; |
| 60 | + } |
|
| 57 | 61 | |
| 58 | 62 | // How about... even... remove it entirely?! |
| 59 | - if ($post['can_delete']) |
|
| 60 | - echo ' |
|
| 63 | + if ($post['can_delete']) { |
|
| 64 | + echo ' |
|
| 61 | 65 | <li><a href="', $scripturl, '?action=deletemsg;msg=', $post['id'], ';topic=', $post['topic'], ';recent;', $context['session_var'], '=', $context['session_id'], '" data-confirm="', $txt['remove_message'], '" class="you_sure"><span class="generic_icons remove_button"></span>', $txt['remove'], '</a></li>'; |
| 66 | + } |
|
| 62 | 67 | |
| 63 | - if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) |
|
| 64 | - echo ' |
|
| 68 | + if ($post['can_reply'] || $post['can_quote'] || $post['can_delete']) { |
|
| 69 | + echo ' |
|
| 65 | 70 | </ul>'; |
| 71 | + } |
|
| 66 | 72 | |
| 67 | 73 | echo ' |
| 68 | 74 | </div><!-- $post[css_class] -->'; |
@@ -84,12 +90,13 @@ discard block |
||
| 84 | 90 | echo ' |
| 85 | 91 | <div id="recent" class="main_content">'; |
| 86 | 92 | |
| 87 | - if ($context['showCheckboxes']) |
|
| 88 | - echo ' |
|
| 93 | + if ($context['showCheckboxes']) { |
|
| 94 | + echo ' |
|
| 89 | 95 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm"> |
| 90 | 96 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 91 | 97 | <input type="hidden" name="qaction" value="markread"> |
| 92 | 98 | <input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">'; |
| 99 | + } |
|
| 93 | 100 | |
| 94 | 101 | if (!empty($context['topics'])) |
| 95 | 102 | { |
@@ -118,11 +125,12 @@ discard block |
||
| 118 | 125 | </div>'; |
| 119 | 126 | |
| 120 | 127 | // Show a "select all" box for quick moderation? |
| 121 | - if ($context['showCheckboxes']) |
|
| 122 | - echo ' |
|
| 128 | + if ($context['showCheckboxes']) { |
|
| 129 | + echo ' |
|
| 123 | 130 | <div class="moderation"> |
| 124 | 131 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');"> |
| 125 | 132 | </div>'; |
| 133 | + } |
|
| 126 | 134 | |
| 127 | 135 | echo ' |
| 128 | 136 | </div><!-- #topic_header --> |
@@ -142,17 +150,20 @@ discard block |
||
| 142 | 150 | echo ' |
| 143 | 151 | <div class="icons floatright">'; |
| 144 | 152 | |
| 145 | - if ($topic['is_locked']) |
|
| 146 | - echo ' |
|
| 153 | + if ($topic['is_locked']) { |
|
| 154 | + echo ' |
|
| 147 | 155 | <span class="generic_icons lock"></span>'; |
| 156 | + } |
|
| 148 | 157 | |
| 149 | - if ($topic['is_sticky']) |
|
| 150 | - echo ' |
|
| 158 | + if ($topic['is_sticky']) { |
|
| 159 | + echo ' |
|
| 151 | 160 | <span class="generic_icons sticky"></span>'; |
| 161 | + } |
|
| 152 | 162 | |
| 153 | - if ($topic['is_poll']) |
|
| 154 | - echo ' |
|
| 163 | + if ($topic['is_poll']) { |
|
| 164 | + echo ' |
|
| 155 | 165 | <span class="generic_icons poll"></span>'; |
| 166 | + } |
|
| 156 | 167 | |
| 157 | 168 | echo ' |
| 158 | 169 | </div>'; |
@@ -178,19 +189,21 @@ discard block |
||
| 178 | 189 | ', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), ' |
| 179 | 190 | </div>'; |
| 180 | 191 | |
| 181 | - if ($context['showCheckboxes']) |
|
| 182 | - echo ' |
|
| 192 | + if ($context['showCheckboxes']) { |
|
| 193 | + echo ' |
|
| 183 | 194 | <div class="moderation"> |
| 184 | 195 | <input type="checkbox" name="topics[]" value="', $topic['id'], '"> |
| 185 | 196 | </div>'; |
| 197 | + } |
|
| 186 | 198 | |
| 187 | 199 | echo ' |
| 188 | 200 | </div><!-- $topic[css_class] -->'; |
| 189 | 201 | } |
| 190 | 202 | |
| 191 | - if (empty($context['topics'])) |
|
| 192 | - echo ' |
|
| 203 | + if (empty($context['topics'])) { |
|
| 204 | + echo ' |
|
| 193 | 205 | <div style="display: none;"></div>'; |
| 206 | + } |
|
| 194 | 207 | |
| 195 | 208 | echo ' |
| 196 | 209 | </div><!-- #topic_container --> |
@@ -205,25 +218,27 @@ discard block |
||
| 205 | 218 | ', $context['page_index'], ' |
| 206 | 219 | </div> |
| 207 | 220 | </div>'; |
| 208 | - } |
|
| 209 | - else |
|
| 210 | - echo ' |
|
| 221 | + } else { |
|
| 222 | + echo ' |
|
| 211 | 223 | <div class="cat_bar"> |
| 212 | 224 | <h3 class="catbg centertext"> |
| 213 | 225 | ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], ' |
| 214 | 226 | </h3> |
| 215 | 227 | </div>'; |
| 228 | + } |
|
| 216 | 229 | |
| 217 | - if ($context['showCheckboxes']) |
|
| 218 | - echo ' |
|
| 230 | + if ($context['showCheckboxes']) { |
|
| 231 | + echo ' |
|
| 219 | 232 | </form>'; |
| 233 | + } |
|
| 220 | 234 | |
| 221 | 235 | echo ' |
| 222 | 236 | </div><!-- #recent -->'; |
| 223 | 237 | |
| 224 | - if (empty($context['no_topic_listing'])) |
|
| 225 | - template_topic_legend(); |
|
| 226 | -} |
|
| 238 | + if (empty($context['no_topic_listing'])) { |
|
| 239 | + template_topic_legend(); |
|
| 240 | + } |
|
| 241 | + } |
|
| 227 | 242 | |
| 228 | 243 | /** |
| 229 | 244 | * Template for showing unread replies (eg new replies to topics you've posted in) |
@@ -235,12 +250,13 @@ discard block |
||
| 235 | 250 | echo ' |
| 236 | 251 | <div id="recent">'; |
| 237 | 252 | |
| 238 | - if ($context['showCheckboxes']) |
|
| 239 | - echo ' |
|
| 253 | + if ($context['showCheckboxes']) { |
|
| 254 | + echo ' |
|
| 240 | 255 | <form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm"> |
| 241 | 256 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
| 242 | 257 | <input type="hidden" name="qaction" value="markread"> |
| 243 | 258 | <input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">'; |
| 259 | + } |
|
| 244 | 260 | |
| 245 | 261 | if (!empty($context['topics'])) |
| 246 | 262 | { |
@@ -269,11 +285,12 @@ discard block |
||
| 269 | 285 | </div>'; |
| 270 | 286 | |
| 271 | 287 | // Show a "select all" box for quick moderation? |
| 272 | - if ($context['showCheckboxes']) |
|
| 273 | - echo ' |
|
| 288 | + if ($context['showCheckboxes']) { |
|
| 289 | + echo ' |
|
| 274 | 290 | <div class="moderation"> |
| 275 | 291 | <input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');"> |
| 276 | 292 | </div>'; |
| 293 | + } |
|
| 277 | 294 | |
| 278 | 295 | echo ' |
| 279 | 296 | </div><!-- #topic_header --> |
@@ -293,17 +310,20 @@ discard block |
||
| 293 | 310 | echo ' |
| 294 | 311 | <div class="icons floatright">'; |
| 295 | 312 | |
| 296 | - if ($topic['is_locked']) |
|
| 297 | - echo ' |
|
| 313 | + if ($topic['is_locked']) { |
|
| 314 | + echo ' |
|
| 298 | 315 | <span class="generic_icons lock"></span>'; |
| 316 | + } |
|
| 299 | 317 | |
| 300 | - if ($topic['is_sticky']) |
|
| 301 | - echo ' |
|
| 318 | + if ($topic['is_sticky']) { |
|
| 319 | + echo ' |
|
| 302 | 320 | <span class="generic_icons sticky"></span>'; |
| 321 | + } |
|
| 303 | 322 | |
| 304 | - if ($topic['is_poll']) |
|
| 305 | - echo ' |
|
| 323 | + if ($topic['is_poll']) { |
|
| 324 | + echo ' |
|
| 306 | 325 | <span class="generic_icons poll"></span>'; |
| 326 | + } |
|
| 307 | 327 | |
| 308 | 328 | echo ' |
| 309 | 329 | </div>'; |
@@ -329,11 +349,12 @@ discard block |
||
| 329 | 349 | ', sprintf($txt['last_post_topic'], '<a href="' . $topic['last_post']['href'] . '">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), ' |
| 330 | 350 | </div>'; |
| 331 | 351 | |
| 332 | - if ($context['showCheckboxes']) |
|
| 333 | - echo ' |
|
| 352 | + if ($context['showCheckboxes']) { |
|
| 353 | + echo ' |
|
| 334 | 354 | <div class="moderation"> |
| 335 | 355 | <input type="checkbox" name="topics[]" value="', $topic['id'], '"> |
| 336 | 356 | </div>'; |
| 357 | + } |
|
| 337 | 358 | |
| 338 | 359 | echo ' |
| 339 | 360 | </div><!-- $topic[css_class] -->'; |
@@ -350,24 +371,26 @@ discard block |
||
| 350 | 371 | ', $context['page_index'], ' |
| 351 | 372 | </div> |
| 352 | 373 | </div>'; |
| 353 | - } |
|
| 354 | - else |
|
| 355 | - echo ' |
|
| 374 | + } else { |
|
| 375 | + echo ' |
|
| 356 | 376 | <div class="cat_bar"> |
| 357 | 377 | <h3 class="catbg centertext"> |
| 358 | 378 | ', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], ' |
| 359 | 379 | </h3> |
| 360 | 380 | </div>'; |
| 381 | + } |
|
| 361 | 382 | |
| 362 | - if ($context['showCheckboxes']) |
|
| 363 | - echo ' |
|
| 383 | + if ($context['showCheckboxes']) { |
|
| 384 | + echo ' |
|
| 364 | 385 | </form>'; |
| 386 | + } |
|
| 365 | 387 | |
| 366 | 388 | echo ' |
| 367 | 389 | </div><!-- #recent -->'; |
| 368 | 390 | |
| 369 | - if (empty($context['no_topic_listing'])) |
|
| 370 | - template_topic_legend(); |
|
| 371 | -} |
|
| 391 | + if (empty($context['no_topic_listing'])) { |
|
| 392 | + template_topic_legend(); |
|
| 393 | + } |
|
| 394 | + } |
|
| 372 | 395 | |
| 373 | 396 | ?> |
| 374 | 397 | \ No newline at end of file |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | <div class="windowbg"> |
| 32 | 32 | <ul id="likes">'; |
| 33 | 33 | |
| 34 | - foreach ($context['likers'] as $liker => $like_details) |
|
| 35 | - echo ' |
|
| 34 | + foreach ($context['likers'] as $liker => $like_details) { |
|
| 35 | + echo ' |
|
| 36 | 36 | <li> |
| 37 | 37 | ', $like_details['profile']['avatar']['image'], ' |
| 38 | 38 | <span> |
@@ -41,6 +41,7 @@ discard block |
||
| 41 | 41 | </span> |
| 42 | 42 | <span class="floatright">', $like_details['time'], '</span> |
| 43 | 43 | </li>'; |
| 44 | + } |
|
| 44 | 45 | |
| 45 | 46 | echo ' |
| 46 | 47 | </ul> |
@@ -61,11 +62,12 @@ discard block |
||
| 61 | 62 | echo ' |
| 62 | 63 | <ul class="floatleft">'; |
| 63 | 64 | |
| 64 | - if (!empty($context['data']['can_like'])) |
|
| 65 | - echo ' |
|
| 65 | + if (!empty($context['data']['can_like'])) { |
|
| 66 | + echo ' |
|
| 66 | 67 | <li class="like_button" id="', $context['data']['type'], '_', $context['data']['id_content'], '_likes"', '> |
| 67 | 68 | <a href="', $scripturl, '?action=likes;ltype=', $context['data']['type'], ';sa=like;like=', $context['data']['id_content'], ';', $context['session_var'], '=', $context['session_id'], '" class="', $context['data']['type'], '_like"><span class="generic_icons ', $context['data']['already_liked'] ? 'unlike' : 'like', '"></span> ', $context['data']['already_liked'] ? $txt['unlike'] : $txt['like'], '</a> |
| 68 | 69 | </li>'; |
| 70 | + } |
|
| 69 | 71 | |
| 70 | 72 | if (!empty($context['data']['count'])) |
| 71 | 73 | { |
@@ -26,9 +26,10 @@ discard block |
||
| 26 | 26 | </h3> |
| 27 | 27 | </div>'; |
| 28 | 28 | |
| 29 | - if ($context['ban']['is_new']) |
|
| 30 | - echo ' |
|
| 29 | + if ($context['ban']['is_new']) { |
|
| 30 | + echo ' |
|
| 31 | 31 | <div class="information noup">', $txt['ban_add_notes'], '</div>'; |
| 32 | + } |
|
| 32 | 33 | |
| 33 | 34 | // If there were errors creating the ban, show them. |
| 34 | 35 | if (!empty($context['error_messages'])) |
@@ -38,9 +39,10 @@ discard block |
||
| 38 | 39 | <strong>', $txt['ban_errors_detected'], '</strong> |
| 39 | 40 | <ul>'; |
| 40 | 41 | |
| 41 | - foreach ($context['error_messages'] as $error) |
|
| 42 | - echo ' |
|
| 42 | + foreach ($context['error_messages'] as $error) { |
|
| 43 | + echo ' |
|
| 43 | 44 | <li class="error">', $error, '</li>'; |
| 45 | + } |
|
| 44 | 46 | |
| 45 | 47 | echo ' |
| 46 | 48 | </ul> |
@@ -57,8 +59,8 @@ discard block |
||
| 57 | 59 | <input type="text" id="ban_name" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60"> |
| 58 | 60 | </dd>'; |
| 59 | 61 | |
| 60 | - if (isset($context['ban']['reason'])) |
|
| 61 | - echo ' |
|
| 62 | + if (isset($context['ban']['reason'])) { |
|
| 63 | + echo ' |
|
| 62 | 64 | <dt> |
| 63 | 65 | <strong><label for="reason">', $txt['ban_reason'], ':</label></strong><br> |
| 64 | 66 | <span class="smalltext">', $txt['ban_reason_desc'], '</span> |
@@ -66,9 +68,10 @@ discard block |
||
| 66 | 68 | <dd> |
| 67 | 69 | <textarea name="reason" id="reason" cols="40" rows="3">', $context['ban']['reason'], '</textarea> |
| 68 | 70 | </dd>'; |
| 71 | + } |
|
| 69 | 72 | |
| 70 | - if (isset($context['ban']['notes'])) |
|
| 71 | - echo ' |
|
| 73 | + if (isset($context['ban']['notes'])) { |
|
| 74 | + echo ' |
|
| 72 | 75 | <dt> |
| 73 | 76 | <strong><label for="ban_notes">', $txt['ban_notes'], ':</label></strong><br> |
| 74 | 77 | <span class="smalltext">', $txt['ban_notes_desc'], '</span> |
@@ -76,6 +79,7 @@ discard block |
||
| 76 | 79 | <dd> |
| 77 | 80 | <textarea name="notes" id="ban_notes" cols="40" rows="3">', $context['ban']['notes'], '</textarea> |
| 78 | 81 | </dd>'; |
| 82 | + } |
|
| 79 | 83 | |
| 80 | 84 | echo ' |
| 81 | 85 | </dl> |
@@ -115,8 +119,8 @@ discard block |
||
| 115 | 119 | <input type="text" name="main_ip" value="', $context['ban_suggestions']['main_ip'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
| 116 | 120 | </dd>'; |
| 117 | 121 | |
| 118 | - if (empty($modSettings['disableHostnameLookup'])) |
|
| 119 | - echo ' |
|
| 122 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
| 123 | + echo ' |
|
| 120 | 124 | <dt> |
| 121 | 125 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', !empty($context['ban_suggestions']['hostname']) ? ' checked' : '', '> |
| 122 | 126 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -124,6 +128,7 @@ discard block |
||
| 124 | 128 | <dd> |
| 125 | 129 | <input type="text" name="hostname" value="', $context['ban_suggestions']['hostname'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
| 126 | 130 | </dd>'; |
| 131 | + } |
|
| 127 | 132 | |
| 128 | 133 | echo ' |
| 129 | 134 | <dt> |
@@ -153,14 +158,15 @@ discard block |
||
| 153 | 158 | <dl class="settings">'; |
| 154 | 159 | |
| 155 | 160 | $count = 0; |
| 156 | - foreach ($ban_ips as $ip) |
|
| 157 | - echo ' |
|
| 161 | + foreach ($ban_ips as $ip) { |
|
| 162 | + echo ' |
|
| 158 | 163 | <dt> |
| 159 | 164 | <input type="checkbox" id="suggestions_', $key, '_', $count, '" name="ban_suggestions[', $key, '][]"', !empty($context['ban_suggestions']['saved_triggers'][$key]) && in_array($ip, $context['ban_suggestions']['saved_triggers'][$key]) ? ' checked' : '', ' value="', $ip, '"> |
| 160 | 165 | </dt> |
| 161 | 166 | <dd> |
| 162 | 167 | <label for="suggestions_', $key, '_', $count++, '">', $ip, '</label> |
| 163 | 168 | </dd>'; |
| 169 | + } |
|
| 164 | 170 | |
| 165 | 171 | echo ' |
| 166 | 172 | </dl>'; |
@@ -202,8 +208,8 @@ discard block |
||
| 202 | 208 | addLoadEvent(fUpdateStatus);'; |
| 203 | 209 | |
| 204 | 210 | // Auto suggest only needed for adding new bans, not editing |
| 205 | - if ($context['ban']['is_new'] && empty($_REQUEST['u'])) |
|
| 206 | - echo ' |
|
| 211 | + if ($context['ban']['is_new'] && empty($_REQUEST['u'])) { |
|
| 212 | + echo ' |
|
| 207 | 213 | var oAddMemberSuggest = new smc_AutoSuggest({ |
| 208 | 214 | sSelf: \'oAddMemberSuggest\', |
| 209 | 215 | sSessionId: smf_session_id, |
@@ -221,6 +227,7 @@ discard block |
||
| 221 | 227 | return true; |
| 222 | 228 | } |
| 223 | 229 | oAddMemberSuggest.registerCallback(\'onBeforeUpdate\', \'onUpdateName\');'; |
| 230 | + } |
|
| 224 | 231 | |
| 225 | 232 | echo ' |
| 226 | 233 | function confirmBan(aForm) |
@@ -269,8 +276,8 @@ discard block |
||
| 269 | 276 | <input type="text" name="main_ip" value="', $context['ban_trigger']['ip']['value'], '" size="44" onfocus="document.getElementById(\'main_ip_check\').checked = true;"> |
| 270 | 277 | </dd>'; |
| 271 | 278 | |
| 272 | - if (empty($modSettings['disableHostnameLookup'])) |
|
| 273 | - echo ' |
|
| 279 | + if (empty($modSettings['disableHostnameLookup'])) { |
|
| 280 | + echo ' |
|
| 274 | 281 | <dt> |
| 275 | 282 | <input type="checkbox" name="ban_suggestions[]" id="hostname_check" value="hostname"', $context['ban_trigger']['hostname']['selected'] ? ' checked' : '', '> |
| 276 | 283 | <label for="hostname_check">', $txt['ban_on_hostname'], '</label> |
@@ -278,6 +285,7 @@ discard block |
||
| 278 | 285 | <dd> |
| 279 | 286 | <input type="text" name="hostname" value="', $context['ban_trigger']['hostname']['value'], '" size="44" onfocus="document.getElementById(\'hostname_check\').checked = true;"> |
| 280 | 287 | </dd>'; |
| 288 | + } |
|
| 281 | 289 | |
| 282 | 290 | echo ' |
| 283 | 291 | <dt> |
@@ -20,13 +20,12 @@ discard block |
||
| 20 | 20 | // We completed some tasks? |
| 21 | 21 | if (!empty($context['tasks_were_run'])) |
| 22 | 22 | { |
| 23 | - if (empty($context['scheduled_errors'])) |
|
| 24 | - echo ' |
|
| 23 | + if (empty($context['scheduled_errors'])) { |
|
| 24 | + echo ' |
|
| 25 | 25 | <div class="infobox"> |
| 26 | 26 | ', $txt['scheduled_tasks_were_run'], ' |
| 27 | 27 | </div>'; |
| 28 | - |
|
| 29 | - else |
|
| 28 | + } else |
|
| 30 | 29 | { |
| 31 | 30 | echo ' |
| 32 | 31 | <div class="errorbox" id="errors"> |
@@ -35,14 +34,15 @@ discard block |
||
| 35 | 34 | <strong id="error_serious">', $txt['scheduled_tasks_were_run_errors'], '</strong> |
| 36 | 35 | </dt>'; |
| 37 | 36 | |
| 38 | - foreach ($context['scheduled_errors'] as $task => $errors) |
|
| 39 | - echo ' |
|
| 37 | + foreach ($context['scheduled_errors'] as $task => $errors) { |
|
| 38 | + echo ' |
|
| 40 | 39 | <dd class="error"> |
| 41 | 40 | <strong>', isset($txt['scheduled_task_' . $task]) ? $txt['scheduled_task_' . $task] : $task, '</strong> |
| 42 | 41 | <ul> |
| 43 | 42 | <li>', implode('</li><li>', $errors), '</li> |
| 44 | 43 | </ul> |
| 45 | 44 | </dd>'; |
| 45 | + } |
|
| 46 | 46 | |
| 47 | 47 | echo ' |
| 48 | 48 | </dl> |
@@ -36,11 +36,12 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // An error? |
| 39 | - if (!empty($context['error_message'])) |
|
| 40 | - echo ' |
|
| 39 | + if (!empty($context['error_message'])) { |
|
| 40 | + echo ' |
|
| 41 | 41 | <div class="errorbox"> |
| 42 | 42 | ', $context['error_message'], ' |
| 43 | 43 | </div>'; |
| 44 | + } |
|
| 44 | 45 | |
| 45 | 46 | // Provide something of an introduction... |
| 46 | 47 | echo ' |
@@ -67,11 +68,12 @@ discard block |
||
| 67 | 68 | // If the files are not writable, we might! |
| 68 | 69 | if (!empty($context['still_not_writable'])) |
| 69 | 70 | { |
| 70 | - if (!empty($context['package_ftp']['error'])) |
|
| 71 | - echo ' |
|
| 71 | + if (!empty($context['package_ftp']['error'])) { |
|
| 72 | + echo ' |
|
| 72 | 73 | <div class="errorbox"> |
| 73 | 74 | ', $context['package_ftp']['error'], ' |
| 74 | 75 | </div>'; |
| 76 | + } |
|
| 75 | 77 | |
| 76 | 78 | echo ' |
| 77 | 79 | <div class="cat_bar"> |
@@ -150,11 +152,12 @@ discard block |
||
| 150 | 152 | </div>'; |
| 151 | 153 | |
| 152 | 154 | // Not writable? Oops, show an error for ya. |
| 153 | - if (!empty($context['lang_file_not_writable_message'])) |
|
| 154 | - echo ' |
|
| 155 | + if (!empty($context['lang_file_not_writable_message'])) { |
|
| 156 | + echo ' |
|
| 155 | 157 | <div class="errorbox"> |
| 156 | 158 | ', $context['lang_file_not_writable_message'], ' |
| 157 | 159 | </div>'; |
| 160 | + } |
|
| 158 | 161 | |
| 159 | 162 | // Show the language entries |
| 160 | 163 | echo ' |
@@ -199,9 +202,10 @@ discard block |
||
| 199 | 202 | <input type="submit" name="save_main" value="', $txt['save'], '"', $context['lang_file_not_writable_message'] || !empty($context['file_entries']) ? ' disabled' : '', ' class="button">'; |
| 200 | 203 | |
| 201 | 204 | // Allow deleting entries. English can't be deleted though. |
| 202 | - if ($context['lang_id'] != 'english') |
|
| 203 | - echo ' |
|
| 205 | + if ($context['lang_id'] != 'english') { |
|
| 206 | + echo ' |
|
| 204 | 207 | <input type="submit" name="delete_main" value="', $txt['delete'], '"', $context['lang_file_not_writable_message'] || !empty($context['file_entries']) ? ' disabled' : '', ' onclick="confirm(\'', $txt['languages_delete_confirm'], '\');" class="button">'; |
| 208 | + } |
|
| 205 | 209 | |
| 206 | 210 | echo ' |
| 207 | 211 | </div><!-- .windowbg --> |
@@ -223,9 +227,10 @@ discard block |
||
| 223 | 227 | echo ' |
| 224 | 228 | <optgroup label="', $theme['name'], '">'; |
| 225 | 229 | |
| 226 | - foreach ($theme['files'] as $file) |
|
| 227 | - echo ' |
|
| 230 | + foreach ($theme['files'] as $file) { |
|
| 231 | + echo ' |
|
| 228 | 232 | <option value="', $id_theme, '+', $file['id'], '"', $file['selected'] ? ' selected' : '', '> => ', $file['name'], '</option>'; |
| 233 | + } |
|
| 229 | 234 | |
| 230 | 235 | echo ' |
| 231 | 236 | </optgroup>'; |
@@ -240,11 +245,12 @@ discard block |
||
| 240 | 245 | <br class="clear">'; |
| 241 | 246 | |
| 242 | 247 | // Is it not writable? Show an error. |
| 243 | - if (!empty($context['entries_not_writable_message'])) |
|
| 244 | - echo ' |
|
| 248 | + if (!empty($context['entries_not_writable_message'])) { |
|
| 249 | + echo ' |
|
| 245 | 250 | <div class="errorbox"> |
| 246 | 251 | ', $context['entries_not_writable_message'], ' |
| 247 | 252 | </div>'; |
| 253 | + } |
|
| 248 | 254 | |
| 249 | 255 | // Already have some file entries? |
| 250 | 256 | if (!empty($context['file_entries'])) |
@@ -283,8 +289,8 @@ discard block |
||
| 283 | 289 | } |
| 284 | 290 | |
| 285 | 291 | // Odd number? |
| 286 | - if (!empty($cached)) |
|
| 287 | - echo ' |
|
| 292 | + if (!empty($cached)) { |
|
| 293 | + echo ' |
|
| 288 | 294 | |
| 289 | 295 | <dt> |
| 290 | 296 | <span class="smalltext">', $cached['key'], '</span> |
@@ -297,6 +303,7 @@ discard block |
||
| 297 | 303 | </dt> |
| 298 | 304 | <dd> |
| 299 | 305 | </dd>'; |
| 306 | + } |
|
| 300 | 307 | |
| 301 | 308 | echo ' |
| 302 | 309 | </dl> |
@@ -331,12 +338,13 @@ discard block |
||
| 331 | 338 | <input type="text" name="smf_add" size="40" value="', !empty($context['smf_search_term']) ? $context['smf_search_term'] : '', '">'; |
| 332 | 339 | |
| 333 | 340 | // Do we have some errors? Too bad. Display a little error box. |
| 334 | - if (!empty($context['smf_error'])) |
|
| 335 | - echo ' |
|
| 341 | + if (!empty($context['smf_error'])) { |
|
| 342 | + echo ' |
|
| 336 | 343 | <div> |
| 337 | 344 | <br> |
| 338 | 345 | <p class="errorbox">', $txt['add_language_error_' . $context['smf_error']], '</p> |
| 339 | 346 | </div>'; |
| 347 | + } |
|
| 340 | 348 | |
| 341 | 349 | echo ' |
| 342 | 350 | </fieldset> |
@@ -41,11 +41,12 @@ discard block |
||
| 41 | 41 | </div>'; |
| 42 | 42 | |
| 43 | 43 | // If this is an existing set, and there are still un-added smileys - offer an import opportunity. |
| 44 | - if (!empty($context['current_set']['can_import'])) |
|
| 45 | - echo ' |
|
| 44 | + if (!empty($context['current_set']['can_import'])) { |
|
| 45 | + echo ' |
|
| 46 | 46 | <div class="information"> |
| 47 | 47 | ', $context['current_set']['can_import'] == 1 ? sprintf($txt['smiley_set_import_single'], $context['current_set']['import_url']) : sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import'], $context['current_set']['import_url']), ' |
| 48 | 48 | </div>'; |
| 49 | + } |
|
| 49 | 50 | |
| 50 | 51 | echo ' |
| 51 | 52 | <div class="windowbg2 noup"> |
@@ -62,20 +63,20 @@ discard block |
||
| 62 | 63 | <dd> |
| 63 | 64 | ', $modSettings['smileys_url'], '/'; |
| 64 | 65 | |
| 65 | - if ($context['current_set']['id'] == 'default') |
|
| 66 | - echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 67 | - |
|
| 68 | - elseif (empty($context['smiley_set_dirs'])) |
|
| 69 | - echo ' |
|
| 66 | + if ($context['current_set']['id'] == 'default') { |
|
| 67 | + echo '<strong>default</strong><input type="hidden" name="smiley_sets_path" id="smiley_sets_path" value="default">'; |
|
| 68 | + } elseif (empty($context['smiley_set_dirs'])) { |
|
| 69 | + echo ' |
|
| 70 | 70 | <input type="text" name="smiley_sets_path" id="smiley_sets_path" value="', $context['current_set']['path'], '"> '; |
| 71 | - else |
|
| 71 | + } else |
|
| 72 | 72 | { |
| 73 | 73 | echo ' |
| 74 | 74 | <select name="smiley_sets_path" id="smiley_sets_path">'; |
| 75 | 75 | |
| 76 | - foreach ($context['smiley_set_dirs'] as $smiley_set_dir) |
|
| 77 | - echo ' |
|
| 76 | + foreach ($context['smiley_set_dirs'] as $smiley_set_dir) { |
|
| 77 | + echo ' |
|
| 78 | 78 | <option value="', $smiley_set_dir['id'], '"', $smiley_set_dir['current'] ? ' selected' : '', $smiley_set_dir['selectable'] ? '' : ' disabled', '>', $smiley_set_dir['id'], '</option>'; |
| 79 | + } |
|
| 79 | 80 | echo ' |
| 80 | 81 | </select> '; |
| 81 | 82 | } |
@@ -90,14 +91,15 @@ discard block |
||
| 90 | 91 | </dd>'; |
| 91 | 92 | |
| 92 | 93 | // If this is a new smiley set they have the option to import smileys already in the directory. |
| 93 | - if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) |
|
| 94 | - echo ' |
|
| 94 | + if ($context['current_set']['is_new'] && !empty($modSettings['smiley_enable'])) { |
|
| 95 | + echo ' |
|
| 95 | 96 | <dt> |
| 96 | 97 | <strong><label for="smiley_sets_import">', $txt['smiley_set_import_directory'], '</label>: </strong> |
| 97 | 98 | </dt> |
| 98 | 99 | <dd> |
| 99 | 100 | <input type="checkbox" name="smiley_sets_import" id="smiley_sets_import" value="1"> |
| 100 | 101 | </dd>'; |
| 102 | + } |
|
| 101 | 103 | |
| 102 | 104 | echo ' |
| 103 | 105 | </dl> |
@@ -131,9 +133,10 @@ discard block |
||
| 131 | 133 | <dd> |
| 132 | 134 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $context['current_smiley']['filename'], '" id="preview" alt=""> (', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();">'; |
| 133 | 135 | |
| 134 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 135 | - echo ' |
|
| 136 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 137 | + echo ' |
|
| 136 | 138 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 139 | + } |
|
| 137 | 140 | |
| 138 | 141 | echo ' |
| 139 | 142 | </select>) |
@@ -149,17 +152,18 @@ discard block |
||
| 149 | 152 | </dt> |
| 150 | 153 | <dd>'; |
| 151 | 154 | |
| 152 | - if (empty($context['filenames'])) |
|
| 153 | - echo ' |
|
| 155 | + if (empty($context['filenames'])) { |
|
| 156 | + echo ' |
|
| 154 | 157 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '">'; |
| 155 | - else |
|
| 158 | + } else |
|
| 156 | 159 | { |
| 157 | 160 | echo ' |
| 158 | 161 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();">'; |
| 159 | 162 | |
| 160 | - foreach ($context['filenames'] as $filename) |
|
| 161 | - echo ' |
|
| 163 | + foreach ($context['filenames'] as $filename) { |
|
| 164 | + echo ' |
|
| 162 | 165 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 166 | + } |
|
| 163 | 167 | echo ' |
| 164 | 168 | </select>'; |
| 165 | 169 | } |
@@ -228,9 +232,10 @@ discard block |
||
| 228 | 232 | <dd> |
| 229 | 233 | ', $txt['smiley_preview_using'], ': <select name="set" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 230 | 234 | |
| 231 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 232 | - echo ' |
|
| 235 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 236 | + echo ' |
|
| 233 | 237 | <option value="', $smiley_set['path'], '"', $context['selected_set'] == $smiley_set['path'] ? ' selected' : '', '>', $smiley_set['name'], '</option>'; |
| 238 | + } |
|
| 234 | 239 | |
| 235 | 240 | echo ' |
| 236 | 241 | </select> |
@@ -240,17 +245,18 @@ discard block |
||
| 240 | 245 | </dt> |
| 241 | 246 | <dd>'; |
| 242 | 247 | |
| 243 | - if (empty($context['filenames'])) |
|
| 244 | - echo ' |
|
| 248 | + if (empty($context['filenames'])) { |
|
| 249 | + echo ' |
|
| 245 | 250 | <input type="text" name="smiley_filename" id="smiley_filename" value="', $context['current_smiley']['filename'], '" onchange="selectMethod(\'existing\');">'; |
| 246 | - else |
|
| 251 | + } else |
|
| 247 | 252 | { |
| 248 | 253 | echo ' |
| 249 | 254 | <select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">'; |
| 250 | 255 | |
| 251 | - foreach ($context['filenames'] as $filename) |
|
| 252 | - echo ' |
|
| 256 | + foreach ($context['filenames'] as $filename) { |
|
| 257 | + echo ' |
|
| 253 | 258 | <option value="', $filename['id'], '"', $filename['selected'] ? ' selected' : '', '>', $filename['id'], '</option>'; |
| 259 | + } |
|
| 254 | 260 | echo ' |
| 255 | 261 | </select>'; |
| 256 | 262 | } |
@@ -279,14 +285,15 @@ discard block |
||
| 279 | 285 | |
| 280 | 286 | <dl id="uploadMore" style="display: none;" class="settings">'; |
| 281 | 287 | |
| 282 | - foreach ($context['smiley_sets'] as $smiley_set) |
|
| 283 | - echo ' |
|
| 288 | + foreach ($context['smiley_sets'] as $smiley_set) { |
|
| 289 | + echo ' |
|
| 284 | 290 | <dt> |
| 285 | 291 | ', sprintf($txt['smileys_add_upload_for'], '<strong>' . $smiley_set['name'] . '</strong>'), ': |
| 286 | 292 | </dt> |
| 287 | 293 | <dd> |
| 288 | 294 | <input type="file" name="individual_', $smiley_set['name'], '" onchange="selectMethod(\'upload\');"> |
| 289 | 295 | </dd>'; |
| 296 | + } |
|
| 290 | 297 | |
| 291 | 298 | echo ' |
| 292 | 299 | </dl> |
@@ -357,27 +364,30 @@ discard block |
||
| 357 | 364 | |
| 358 | 365 | foreach ($location['rows'] as $row) |
| 359 | 366 | { |
| 360 | - if (!empty($context['move_smiley'])) |
|
| 361 | - echo ' |
|
| 367 | + if (!empty($context['move_smiley'])) { |
|
| 368 | + echo ' |
|
| 362 | 369 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $row[0]['row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 370 | + } |
|
| 363 | 371 | |
| 364 | 372 | foreach ($row as $smiley) |
| 365 | 373 | { |
| 366 | - if (empty($context['move_smiley'])) |
|
| 367 | - echo ' |
|
| 374 | + if (empty($context['move_smiley'])) { |
|
| 375 | + echo ' |
|
| 368 | 376 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;move=', $smiley['id'], '"><img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '"></a>'; |
| 369 | - else |
|
| 370 | - echo ' |
|
| 377 | + } else { |
|
| 378 | + echo ' |
|
| 371 | 379 | <img src="', $modSettings['smileys_url'], '/', $modSettings['smiley_sets_default'], '/', $smiley['filename'], '" alt="', $smiley['description'], '" ', $smiley['selected'] ? 'class="selected_item"' : '', '> |
| 372 | 380 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';after=', $smiley['id'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '" title="', $txt['smileys_move_here'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 381 | + } |
|
| 373 | 382 | } |
| 374 | 383 | |
| 375 | 384 | echo ' |
| 376 | 385 | <br>'; |
| 377 | 386 | } |
| 378 | - if (!empty($context['move_smiley'])) |
|
| 379 | - echo ' |
|
| 387 | + if (!empty($context['move_smiley'])) { |
|
| 388 | + echo ' |
|
| 380 | 389 | <a href="', $scripturl, '?action=admin;area=smileys;sa=setorder;location=', $location['id'], ';source=', $context['move_smiley'], ';row=', $location['last_row'], ';reorder=1;', $context['session_var'], '=', $context['session_id'], '"><span class="generic_icons select_below" title="', $txt['smileys_move_here'], '"></span></a>'; |
| 390 | + } |
|
| 381 | 391 | echo ' |
| 382 | 392 | </div><!-- .windowbg2 --> |
| 383 | 393 | <input type="hidden" name="reorder" value="1"> |
@@ -414,14 +424,15 @@ discard block |
||
| 414 | 424 | <div class="windowbg2"> |
| 415 | 425 | <dl class="settings">'; |
| 416 | 426 | |
| 417 | - if (!$context['new_icon']) |
|
| 418 | - echo ' |
|
| 427 | + if (!$context['new_icon']) { |
|
| 428 | + echo ' |
|
| 419 | 429 | <dt> |
| 420 | 430 | <strong>', $txt['smiley_preview'], ': </strong> |
| 421 | 431 | </dt> |
| 422 | 432 | <dd> |
| 423 | 433 | <img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '"> |
| 424 | 434 | </dd>'; |
| 435 | + } |
|
| 425 | 436 | |
| 426 | 437 | echo ' |
| 427 | 438 | <dt> |
@@ -448,9 +459,10 @@ discard block |
||
| 448 | 459 | echo ' |
| 449 | 460 | <optgroup label="', $category['name'], '">'; |
| 450 | 461 | |
| 451 | - foreach ($category['boards'] as $board) |
|
| 452 | - echo ' |
|
| 462 | + foreach ($category['boards'] as $board) { |
|
| 463 | + echo ' |
|
| 453 | 464 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=>' : '', ' ', $board['name'], '</option>'; |
| 465 | + } |
|
| 454 | 466 | |
| 455 | 467 | echo ' |
| 456 | 468 | </optgroup>'; |
@@ -467,19 +479,21 @@ discard block |
||
| 467 | 479 | <option value="0"', empty($context['icon']['after']) ? ' selected' : '', '>', $txt['icons_location_first_icon'], '</option>'; |
| 468 | 480 | |
| 469 | 481 | // Print the list of all the icons it can be put after... |
| 470 | - foreach ($context['icons'] as $id => $data) |
|
| 471 | - if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 482 | + foreach ($context['icons'] as $id => $data) { |
|
| 483 | + if (empty($context['icon']['id']) || $id != $context['icon']['id']) |
|
| 472 | 484 | echo ' |
| 473 | 485 | <option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>'; |
| 486 | + } |
|
| 474 | 487 | |
| 475 | 488 | echo ' |
| 476 | 489 | </select> |
| 477 | 490 | </dd> |
| 478 | 491 | </dl>'; |
| 479 | 492 | |
| 480 | - if (!$context['new_icon']) |
|
| 481 | - echo ' |
|
| 493 | + if (!$context['new_icon']) { |
|
| 494 | + echo ' |
|
| 482 | 495 | <input type="hidden" name="icon" value="', $context['icon']['id'], '">'; |
| 496 | + } |
|
| 483 | 497 | |
| 484 | 498 | echo ' |
| 485 | 499 | <input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="button"> |
@@ -62,16 +62,17 @@ |
||
| 62 | 62 | <div id="error_box" class="errorbox"> |
| 63 | 63 | <ul id="error_list">'; |
| 64 | 64 | |
| 65 | - foreach ($context['post_errors'] as $key => $error) |
|
| 66 | - echo ' |
|
| 65 | + foreach ($context['post_errors'] as $key => $error) { |
|
| 66 | + echo ' |
|
| 67 | 67 | <li id="error_', $key, '" class="error">', $error, '</li>'; |
| 68 | + } |
|
| 68 | 69 | |
| 69 | 70 | echo ' |
| 70 | 71 | </ul>'; |
| 71 | - } |
|
| 72 | - else |
|
| 73 | - echo ' |
|
| 72 | + } else { |
|
| 73 | + echo ' |
|
| 74 | 74 | <div style="display:none" id="error_box" class="errorbox">'; |
| 75 | + } |
|
| 75 | 76 | |
| 76 | 77 | echo ' |
| 77 | 78 | </div>'; |
@@ -31,9 +31,10 @@ discard block |
||
| 31 | 31 | ', $txt['who_show1'], ' |
| 32 | 32 | <select name="show_top" onchange="document.forms.whoFilter.show.value = this.value; document.forms.whoFilter.submit();">'; |
| 33 | 33 | |
| 34 | - foreach ($context['show_methods'] as $value => $label) |
|
| 35 | - echo ' |
|
| 34 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 35 | + echo ' |
|
| 36 | 36 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 37 | + } |
|
| 37 | 38 | echo ' |
| 38 | 39 | </select> |
| 39 | 40 | <noscript> |
@@ -58,20 +59,22 @@ discard block |
||
| 58 | 59 | <td>'; |
| 59 | 60 | |
| 60 | 61 | // Guests can't be messaged. |
| 61 | - if (!$member['is_guest']) |
|
| 62 | - echo ' |
|
| 62 | + if (!$member['is_guest']) { |
|
| 63 | + echo ' |
|
| 63 | 64 | <span class="contact_info floatright"> |
| 64 | 65 | ', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['text'] . '">' : '', $settings['use_image_buttons'] ? '<span class="' . ($member['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $member['online']['text'] . '"></span>' : $member['online']['label'], $context['can_send_pm'] ? '</a>' : '', ' |
| 65 | 66 | </span>'; |
| 67 | + } |
|
| 66 | 68 | |
| 67 | 69 | echo ' |
| 68 | 70 | <span class="member', $member['is_hidden'] ? ' hidden' : '', '"> |
| 69 | 71 | ', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt['profile_of'] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', ' |
| 70 | 72 | </span>'; |
| 71 | 73 | |
| 72 | - if (!empty($member['ip'])) |
|
| 73 | - echo ' |
|
| 74 | + if (!empty($member['ip'])) { |
|
| 75 | + echo ' |
|
| 74 | 76 | (<a href="' . $scripturl . '?action=', ($member['is_guest'] ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $member['id']), ';searchip=' . $member['ip'] . '">' . $member['ip'] . '</a>)'; |
| 77 | + } |
|
| 75 | 78 | |
| 76 | 79 | echo ' |
| 77 | 80 | </td> |
@@ -81,13 +84,14 @@ discard block |
||
| 81 | 84 | } |
| 82 | 85 | |
| 83 | 86 | // No members? |
| 84 | - if (empty($context['members'])) |
|
| 85 | - echo ' |
|
| 87 | + if (empty($context['members'])) { |
|
| 88 | + echo ' |
|
| 86 | 89 | <tr class="windowbg"> |
| 87 | 90 | <td colspan="3"> |
| 88 | 91 | ', $txt['who_no_online_' . ($context['show_by'] == 'guests' || $context['show_by'] == 'spiders' ? $context['show_by'] : 'members')], ' |
| 89 | 92 | </td> |
| 90 | 93 | </tr>'; |
| 94 | + } |
|
| 91 | 95 | |
| 92 | 96 | echo ' |
| 93 | 97 | </tbody> |
@@ -98,9 +102,10 @@ discard block |
||
| 98 | 102 | ', $txt['who_show1'], ' |
| 99 | 103 | <select name="show" onchange="document.forms.whoFilter.submit();">'; |
| 100 | 104 | |
| 101 | - foreach ($context['show_methods'] as $value => $label) |
|
| 102 | - echo ' |
|
| 105 | + foreach ($context['show_methods'] as $value => $label) { |
|
| 106 | + echo ' |
|
| 103 | 107 | <option value="', $value, '" ', $value == $context['show_by'] ? ' selected' : '', '>', $label, '</option>'; |
| 108 | + } |
|
| 104 | 109 | echo ' |
| 105 | 110 | </select> |
| 106 | 111 | <noscript> |
@@ -129,17 +134,19 @@ discard block |
||
| 129 | 134 | |
| 130 | 135 | foreach ($context['credits'] as $section) |
| 131 | 136 | { |
| 132 | - if (isset($section['pretext'])) |
|
| 133 | - echo ' |
|
| 137 | + if (isset($section['pretext'])) { |
|
| 138 | + echo ' |
|
| 134 | 139 | <div class="windowbg noup"> |
| 135 | 140 | <p>', $section['pretext'], '</p> |
| 136 | 141 | </div>'; |
| 142 | + } |
|
| 137 | 143 | |
| 138 | - if (isset($section['title'])) |
|
| 139 | - echo ' |
|
| 144 | + if (isset($section['title'])) { |
|
| 145 | + echo ' |
|
| 140 | 146 | <div class="cat_bar"> |
| 141 | 147 | <h3 class="catbg">', $section['title'], '</h3> |
| 142 | 148 | </div>'; |
| 149 | + } |
|
| 143 | 150 | |
| 144 | 151 | echo ' |
| 145 | 152 | <div class="windowbg2 noup"> |
@@ -147,17 +154,18 @@ discard block |
||
| 147 | 154 | |
| 148 | 155 | foreach ($section['groups'] as $group) |
| 149 | 156 | { |
| 150 | - if (isset($group['title'])) |
|
| 151 | - echo ' |
|
| 157 | + if (isset($group['title'])) { |
|
| 158 | + echo ' |
|
| 152 | 159 | <dt> |
| 153 | 160 | <strong>', $group['title'], '</strong> |
| 154 | 161 | </dt> |
| 155 | 162 | <dd>'; |
| 163 | + } |
|
| 156 | 164 | |
| 157 | 165 | // Try to make this read nicely. |
| 158 | - if (count($group['members']) <= 2) |
|
| 159 | - echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 160 | - else |
|
| 166 | + if (count($group['members']) <= 2) { |
|
| 167 | + echo implode(' ' . $txt['credits_and'] . ' ', $group['members']); |
|
| 168 | + } else |
|
| 161 | 169 | { |
| 162 | 170 | $last_peep = array_pop($group['members']); |
| 163 | 171 | echo implode(', ', $group['members']), ' ', $txt['credits_and'], ' ', $last_peep; |
@@ -170,9 +178,10 @@ discard block |
||
| 170 | 178 | echo ' |
| 171 | 179 | </dl>'; |
| 172 | 180 | |
| 173 | - if (isset($section['posttext'])) |
|
| 174 | - echo ' |
|
| 181 | + if (isset($section['posttext'])) { |
|
| 182 | + echo ' |
|
| 175 | 183 | <p class="posttext">', $section['posttext'], '</p>'; |
| 184 | + } |
|
| 176 | 185 | |
| 177 | 186 | echo ' |
| 178 | 187 | </div>'; |
@@ -187,26 +196,29 @@ discard block |
||
| 187 | 196 | </div> |
| 188 | 197 | <div class="windowbg noup">'; |
| 189 | 198 | |
| 190 | - if (!empty($context['credits_software_graphics']['graphics'])) |
|
| 191 | - echo ' |
|
| 199 | + if (!empty($context['credits_software_graphics']['graphics'])) { |
|
| 200 | + echo ' |
|
| 192 | 201 | <dl> |
| 193 | 202 | <dt><strong>', $txt['credits_graphics'], '</strong></dt> |
| 194 | 203 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['graphics']), '</dd> |
| 195 | 204 | </dl>'; |
| 205 | + } |
|
| 196 | 206 | |
| 197 | - if (!empty($context['credits_software_graphics']['software'])) |
|
| 198 | - echo ' |
|
| 207 | + if (!empty($context['credits_software_graphics']['software'])) { |
|
| 208 | + echo ' |
|
| 199 | 209 | <dl> |
| 200 | 210 | <dt><strong>', $txt['credits_software'], '</strong></dt> |
| 201 | 211 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['software']), '</dd> |
| 202 | 212 | </dl>'; |
| 213 | + } |
|
| 203 | 214 | |
| 204 | - if (!empty($context['credits_software_graphics']['fonts'])) |
|
| 205 | - echo ' |
|
| 215 | + if (!empty($context['credits_software_graphics']['fonts'])) { |
|
| 216 | + echo ' |
|
| 206 | 217 | <dl> |
| 207 | 218 | <dt><strong>', $txt['credits_fonts'], '</strong></dt> |
| 208 | 219 | <dd>', implode('</dd><dd>', $context['credits_software_graphics']['fonts']), '</dd> |
| 209 | 220 | </dl>'; |
| 221 | + } |
|
| 210 | 222 | echo ' |
| 211 | 223 | </div>'; |
| 212 | 224 | } |
@@ -222,14 +234,16 @@ discard block |
||
| 222 | 234 | <ul>'; |
| 223 | 235 | |
| 224 | 236 | // Display the credits. |
| 225 | - if (!empty($context['credits_modifications'])) |
|
| 226 | - echo ' |
|
| 237 | + if (!empty($context['credits_modifications'])) { |
|
| 238 | + echo ' |
|
| 227 | 239 | <li>', implode('</li><li>', $context['credits_modifications']), '</li>'; |
| 240 | + } |
|
| 228 | 241 | |
| 229 | 242 | // Legacy. |
| 230 | - if (!empty($context['copyrights']['mods'])) |
|
| 231 | - echo ' |
|
| 243 | + if (!empty($context['copyrights']['mods'])) { |
|
| 244 | + echo ' |
|
| 232 | 245 | <li>', implode('</li><li>', $context['copyrights']['mods']), '</li>'; |
| 246 | + } |
|
| 233 | 247 | |
| 234 | 248 | echo ' |
| 235 | 249 | </ul> |