From 770ab13cb082b8f7102b9205e1aa5e1bad0a6cc5 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 25 Apr 2014 11:26:49 -0700 Subject: [PATCH 1/8] [ticket/12332] Fix displaying attachments with long file names PHPBB3-12332 --- phpBB/adm/style/acp_logs.html | 10 +++++----- phpBB/adm/style/admin.css | 5 +++++ phpBB/includes/acp/acp_attachments.php | 2 +- phpBB/includes/acp/acp_users.php | 2 +- .../prosilver/template/posting_attach_body.html | 4 ++-- phpBB/styles/prosilver/template/ucp_attachments.html | 2 +- phpBB/styles/prosilver/theme/content.css | 11 +++++++++++ phpBB/styles/prosilver/theme/plupload.css | 5 +++++ 8 files changed, 31 insertions(+), 10 deletions(-) diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index 9343b9b509..b3b5fe3394 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -22,15 +22,15 @@

- +
- - - + + + - + diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 6f2d65afc0..7f15c162a5 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -911,6 +911,11 @@ table.styles td.users, table td.mark { text-align: center; } +table.fixed-width-table { + table-layout: fixed; + width: 100%; +} + @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index d8d382b2bd..8eef2da24b 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1058,7 +1058,7 @@ class acp_attachments $template->assign_block_vars('orphan', array( 'FILESIZE' => get_formatted_filesize($row['filesize']), 'FILETIME' => $user->format_date($row['filetime']), - 'REAL_FILENAME' => utf8_basename($row['real_filename']), + 'REAL_FILENAME' => utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '
', true), 'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']), 'ATTACH_ID' => $row['attach_id'], 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '', diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index a720334ed2..289672cdc3 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -2082,7 +2082,7 @@ class acp_users } $template->assign_block_vars('attach', array( - 'REAL_FILENAME' => $row['real_filename'], + 'REAL_FILENAME' => utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '
', true), 'COMMENT' => nl2br($row['attach_comment']), 'EXTENSION' => $row['extension'], 'SIZE' => get_formatted_filesize($row['filesize']), diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html index b6f4d13804..4ad66656b2 100644 --- a/phpBB/styles/prosilver/template/posting_attach_body.html +++ b/phpBB/styles/prosilver/template/posting_attach_body.html @@ -35,7 +35,7 @@
{L_USERNAME}{L_IP}{L_TIME}{L_USERNAME}{L_IP}{L_TIME} {L_ACTION} {L_MARK}{L_MARK}
- +   @@ -58,7 +58,7 @@
- {attach_row.FILENAME} + {attach_row.FILENAME}   diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index ed39e80c12..4731683a80 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -38,7 +38,7 @@
- {attachrow.FILENAME} ({attachrow.SIZE})
+ {attachrow.FILENAME} ({attachrow.SIZE})
{L_PM}{L_COLON} {L_TOPIC}{L_COLON} {attachrow.TOPIC_TITLE}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index d27fb81fee..31f5fa36f7 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -779,6 +779,17 @@ div.dl_links { display: inline-block; } +.attachment-filename { + width: 100%; +} + +.ellipsis-text { + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + /* Show scrollbars for items with overflow on iOS devices ----------------------------------------*/ .postbody .content::-webkit-scrollbar, #topicreview::-webkit-scrollbar, #post_details::-webkit-scrollbar, .codebox code::-webkit-scrollbar, .attachbox dd::-webkit-scrollbar, .attach-image::-webkit-scrollbar, .dropdown-extended ul::-webkit-scrollbar { diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css index 8569eca662..f81064dbe6 100644 --- a/phpBB/styles/prosilver/theme/plupload.css +++ b/phpBB/styles/prosilver/theme/plupload.css @@ -74,3 +74,8 @@ height: 16px; width: 16px; } + +.file-name { + max-width: 65%; + vertical-align: bottom; +} From 3bebbc05ee2e762e8ec598e898e7930a55621fb7 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 26 Apr 2014 09:14:15 -0700 Subject: [PATCH 2/8] [ticket/12332] Remove width sizing, as it is already set PHPBB3-12332 --- phpBB/adm/style/admin.css | 1 - 1 file changed, 1 deletion(-) diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 7f15c162a5..18a2084b36 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -913,7 +913,6 @@ table.styles td.users, table td.mark { table.fixed-width-table { table-layout: fixed; - width: 100%; } @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) From f5262eb92885e76eb6ebd09265882426f4b11b31 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 26 Apr 2014 09:15:22 -0700 Subject: [PATCH 3/8] [ticket/12332] Accomplish all word creaking in template and CSS PHPBB3-12332 --- phpBB/adm/style/acp_attachments.html | 22 +++++++++++----------- phpBB/adm/style/acp_users.html | 10 +++++----- phpBB/includes/acp/acp_attachments.php | 4 ++-- phpBB/includes/acp/acp_users.php | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 5d35666fdd..fd071588e6 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -331,15 +331,15 @@
{L_TITLE} - +
- - - - - - + + + + + + @@ -390,13 +390,13 @@ -
{L_FILENAME}{L_FILEDATE}{L_FILESIZE}{L_ATTACH_POST_ID}{L_ATTACH_TO_POST}{L_DELETE}{L_FILENAME}{L_FILEDATE}{L_FILESIZE}{L_ATTACH_POST_ID}{L_ATTACH_TO_POST}{L_DELETE}
+
- - - + + + diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index b84e32013f..d1be177cfa 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -164,14 +164,14 @@ -
{L_FILENAME}{L_POSTED}{L_FILESIZE}{L_MARK}{L_POSTED}{L_FILESIZE}{L_MARK}
+
- - - - + + + + diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 8eef2da24b..51c80d0385 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1058,7 +1058,7 @@ class acp_attachments $template->assign_block_vars('orphan', array( 'FILESIZE' => get_formatted_filesize($row['filesize']), 'FILETIME' => $user->format_date($row['filetime']), - 'REAL_FILENAME' => utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '
', true), + 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), 'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']), 'ATTACH_ID' => $row['attach_id'], 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '', @@ -1223,7 +1223,7 @@ class acp_attachments 'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']), 'FILESIZE' => get_formatted_filesize((int) $row['filesize']), 'FILETIME' => $user->format_date((int) $row['filetime']), - 'REAL_FILENAME' => (!$row['in_message']) ? utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '
', true) : '', + 'REAL_FILENAME' => (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '', 'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']), 'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '', 'COMMENT' => $comment, diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 289672cdc3..85ed4c0bfb 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -2082,7 +2082,7 @@ class acp_users } $template->assign_block_vars('attach', array( - 'REAL_FILENAME' => utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '
', true), + 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), 'COMMENT' => nl2br($row['attach_comment']), 'EXTENSION' => $row['extension'], 'SIZE' => get_formatted_filesize($row['filesize']), From 2b9b6412b86aa0f0f38d07256bf54413498986bf Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 26 Apr 2014 09:16:03 -0700 Subject: [PATCH 4/8] [ticket/12332] Add break-word to fixed width table CSS This ensures long words break and remain within the table cell PHPBB3-12332 --- phpBB/adm/style/admin.css | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 18a2084b36..60a5cd9472 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -913,6 +913,7 @@ table.styles td.users, table td.mark { table.fixed-width-table { table-layout: fixed; + word-break: break-word; } @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) From 92fa39b79d45f024985a47431b9fbc071d1eebbc Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 26 Apr 2014 09:18:14 -0700 Subject: [PATCH 5/8] [ticket/12332] Restore some changes back to original state PHPBB3-12332 --- phpBB/includes/acp/acp_attachments.php | 2 +- phpBB/includes/acp/acp_users.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 51c80d0385..c4b5f951f2 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1058,7 +1058,7 @@ class acp_attachments $template->assign_block_vars('orphan', array( 'FILESIZE' => get_formatted_filesize($row['filesize']), 'FILETIME' => $user->format_date($row['filetime']), - 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), + 'REAL_FILENAME' => utf8_basename($row['real_filename']), 'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']), 'ATTACH_ID' => $row['attach_id'], 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '', diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 85ed4c0bfb..a720334ed2 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -2082,7 +2082,7 @@ class acp_users } $template->assign_block_vars('attach', array( - 'REAL_FILENAME' => utf8_basename((string) $row['real_filename']), + 'REAL_FILENAME' => $row['real_filename'], 'COMMENT' => nl2br($row['attach_comment']), 'EXTENSION' => $row['extension'], 'SIZE' => get_formatted_filesize($row['filesize']), From 76843f4a3a7d30502bbc50a74f112d45c8a9e0a7 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 26 Apr 2014 09:25:59 -0700 Subject: [PATCH 6/8] [ticket/12332] Adjust column widths for responsive changes PHPBB3-12332 --- phpBB/adm/style/acp_attachments.html | 6 +++--- phpBB/adm/style/acp_users.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index fd071588e6..61a81ff7d7 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -334,10 +334,10 @@
{L_FILENAME}{L_POST_TIME}{L_FILESIZE}{L_DOWNLOADS}{L_MARK}{L_POST_TIME}{L_FILESIZE}{L_DOWNLOADS}{L_MARK}
- + - + @@ -348,7 +348,7 @@ - + diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index d1be177cfa..0522d17c37 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -168,9 +168,9 @@ - + - + From 7d5672f6c514eac03b4b72517933b15497a3d333 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 26 Apr 2014 09:50:45 -0700 Subject: [PATCH 7/8] [ticket/12332] Adjust size of mark column where too wide PHPBB3-12332 --- phpBB/adm/style/acp_logs.html | 2 +- phpBB/adm/style/acp_users.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index b3b5fe3394..ec2065f906 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -30,7 +30,7 @@ - + diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 0522d17c37..25064c6f3a 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -169,9 +169,9 @@ - + - + From 0e0eca2d2e82cba0fc04562a6d3f227c0fdec031 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 1 May 2014 20:04:27 -0700 Subject: [PATCH 8/8] [ticket/12332] Add missing semicolon to inline styling PHPBB3-12332 --- phpBB/adm/style/acp_attachments.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 61a81ff7d7..0e3b5ff3b2 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -337,7 +337,7 @@ - +
{L_FILENAME}{L_FILENAME} {L_FILEDATE} {L_FILESIZE}{L_ATTACH_POST_ID}{L_ATTACH_POST_ID} {L_ATTACH_TO_POST} {L_DELETE}
{orphan.REAL_FILENAME} {orphan.FILETIME} {orphan.FILESIZE}{L_ATTACH_ID}{L_COLON} {L_ATTACH_ID}{L_COLON}
{L_FILENAME}{L_POST_TIME}{L_POST_TIME} {L_FILESIZE}{L_DOWNLOADS}{L_DOWNLOADS} {L_MARK}
{L_TIME} {L_ACTION} {L_MARK}{L_MARK}
{L_FILENAME} {L_POST_TIME}{L_FILESIZE}{L_FILESIZE} {L_DOWNLOADS}{L_MARK}{L_MARK}
{L_FILENAME} {L_FILEDATE} {L_FILESIZE}{L_ATTACH_POST_ID}{L_ATTACH_POST_ID} {L_ATTACH_TO_POST} {L_DELETE}