diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_prune.php | 36 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/editor.js | 44 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/posting_buttons.html | 39 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/common.css | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/content.css | 5 |
5 files changed, 66 insertions, 60 deletions
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index dc0f9a345f..4234ec1505 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -491,11 +491,12 @@ class acp_prune if ($group_id) { - $sql = 'SELECT user_id - FROM ' . USER_GROUP_TABLE . ' - WHERE group_id = ' . (int) $group_id . ' - AND user_pending = 0 - AND ' . $db->sql_in_set('user_id', $user_ids, false, true); + $sql = 'SELECT u.user_id, u.username + FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u + WHERE ug.group_id = ' . (int) $group_id . ' + AND ug.user_pending = 0 + AND ' . $db->sql_in_set('ug.user_id', $user_ids, false, true) . ' + AND u.user_id = ug.user_id'; $result = $db->sql_query($sql); // we're performing an intersection operation, so all the relevant users @@ -504,24 +505,19 @@ class acp_prune $user_ids = $usernames = array(); while ($row = $db->sql_fetchrow($result)) { - $user_ids[] = $row['poster_id']; + $user_ids[] = $row['user_id']; + $usernames[$row['user_id']] = $row['username']; } $db->sql_freeresult($result); - - // only get usernames if they are needed (not part of some later query) - if (!$posts_on_queue) - { - // this is an additional query aginst the users table - user_get_id_name($user_ids, $usernames); - } } if ($posts_on_queue) { - $sql = 'SELECT poster_id, COUNT(post_id) AS queue_posts - FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set('poster_id', $user_ids, false, true) . ' - GROUP BY poster_id + $sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u + WHERE ' . $db->sql_in_set('p.poster_id', $user_ids, false, true) . ' + AND u.user_id = p.poster_id + GROUP BY p.poster_id HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue; $result = $db->sql_query($result); @@ -529,12 +525,10 @@ class acp_prune $user_ids = $usernames = array(); while ($row = $db->sql_fetchrow($result)) { - $user_ids[] = $row['poster_id']; + $user_ids[] = $row['user_id']; + $usernames[$row['user_id']] = $row['username']; } $db->sql_freeresult($result); - - // do an additional query to get the correct set of usernames - user_get_id_name($user_ids, $usernames); } } } diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index 93506b8d4a..0a749347ad 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -298,9 +298,12 @@ function storeCaret(textEl) { * Color pallette */ function colorPalette(dir, width, height) { - var r = 0, g = 0, b = 0; - var numberList = new Array(6); - var color = ''; + var r = 0, + g = 0, + b = 0, + numberList = new Array(6); + color = '', + html = ''; numberList[0] = '00'; numberList[1] = '40'; @@ -308,37 +311,46 @@ function colorPalette(dir, width, height) { numberList[3] = 'BF'; numberList[4] = 'FF'; - document.writeln('<table cellspacing="1" cellpadding="0" border="0">'); + html += '<table cellspacing="1" cellpadding="0" border="0">'; for (r = 0; r < 5; r++) { - if (dir === 'h') { - document.writeln('<tr>'); + if (dir == 'h') { + html += '<tr>'; } for (g = 0; g < 5; g++) { - if (dir === 'v') { - document.writeln('<tr>'); + if (dir == 'v') { + html += '<tr>'; } for (b = 0; b < 5; b++) { color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); - document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">'); - document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>'); - document.writeln('</td>'); + html += '<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">'; + html += '<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>'; + html += '</td>'; } - if (dir === 'v') { - document.writeln('</tr>'); + if (dir == 'v') { + html += '</tr>'; } } - if (dir === 'h') { - document.writeln('</tr>'); + if (dir == 'h') { + html += '</tr>'; } } - document.writeln('</table>'); + html += '</table>'; + return html; } +(function($) { + $(document).ready(function() { + $('#color_palette_placeholder').each(function() { + $(this).html(colorPalette('h', 15, 12)); + }); + }); +})(jQuery); + /** * Caret Position object */ diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 8e87407757..fadbc9b3ca 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -35,37 +35,30 @@ var panels = new Array('options-panel', 'attach-panel', 'poll-panel'); var show_panel = 'options-panel'; + function change_palette() + { + dE('colour_palette'); + e = document.getElementById('colour_palette'); + + if (e.style.display == 'block') + { + document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}'; + } + else + { + document.getElementById('bbpalette').value = '{LA_FONT_COLOR}'; + } + } // ]]> </script> -<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script> +<!-- INCLUDEJS template/editor.js --> <!-- IF S_BBCODE_ALLOWED --> <div id="colour_palette" style="display: none;"> <dl style="clear: left;"> <dt><label>{L_FONT_COLOR}{L_COLON}</label></dt> - <dd> - <script type="text/javascript"> - // <![CDATA[ - function change_palette() - { - dE('colour_palette'); - e = document.getElementById('colour_palette'); - - if (e.style.display == 'block') - { - document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}'; - } - else - { - document.getElementById('bbpalette').value = '{LA_FONT_COLOR}'; - } - } - - colorPalette('h', 15, 10); - // ]]> - </script> - </dd> + <dd id="color_palette_placeholder"></dd> </dl> </div> diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index ed462c770d..26ec23b2e6 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -476,6 +476,8 @@ dl.details dd { margin-bottom: 5px; float: left; width: 65%; + overflow: hidden; + text-overflow: ellipsis; } .clearfix, #tabs, #minitabs, fieldset dl, ul.topiclist dl, dl.polls { diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index b6012f8a63..bf9e587ce1 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -669,6 +669,11 @@ fieldset.polls dd div { margin-left: 8px; } +.postprofile dd { + overflow: hidden; + text-overflow: ellipsis; +} + .postprofile strong { font-weight: normal; } |