From 68677b8525a9dc88640a2425a78f553108eb6073 Mon Sep 17 00:00:00 2001 From: KYPREO <58344533+KYPREO@users.noreply.github.com> Date: Wed, 22 Jan 2020 20:21:12 +1100 Subject: [ticket/16329] Add configuration options for Plupload PHPBB3-16329 PHPBB3-16330 --- phpBB/includes/acp/acp_attachments.php | 2 +- phpBB/install/schemas/schema_data.sql | 2 +- phpBB/language/en/acp/attachments.php | 8 ++++---- phpBB/phpbb/db/migration/data/v32x/enable_plupload_config.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index b3a1f9dc73..6298c7b0f2 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -170,7 +170,7 @@ class acp_attachments 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']), 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 'img_strip_metadata' => array('lang' => 'IMAGE_STRIP_METADATA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'img_quality' => array('lang' => 'IMAGE_QUALITY', 'validate' => 'int:1:100', 'type' => 'number:1:100', 'explain' => true, 'append' => ' %'), + 'img_quality' => array('lang' => 'IMAGE_QUALITY', 'validate' => 'int:50:90', 'type' => 'number:50:90', 'explain' => true, 'append' => ' %'), 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), ) ); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index d301efd556..d20e00a53d 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -155,7 +155,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_height', ' INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_thumb_width', '400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_width', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_min_thumb_filesize', '12000'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_quality', '90'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_quality', '85'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_strip_metadata', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_max', '50'); diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index b3e568b277..1e67a0c3fb 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -111,10 +111,10 @@ $lang = array_merge($lang, array( 'IMAGE_LINK_SIZE' => 'Image link dimensions', 'IMAGE_LINK_SIZE_EXPLAIN' => 'Display image attachment as an inline text link if image is larger than this. To disable this behaviour, set the values to 0px by 0px.', - 'IMAGE_QUALITY' => 'Quality for image compression', - 'IMAGE_QUALITY_EXPLAIN' => 'Higher value means lower compression/larger file size. Default 90%. Setting is only effective if max image dimensions set to value other than 0px v 0px, but will then apply to all uploaded JPEG images', - 'IMAGE_STRIP_METADATA' => 'Strip image metadata', - 'IMAGE_STRIP_METADATA_EXPLAIN' => 'Strip Exif metadata eg author name, GPS coordinates & camera details (JPEG only). Setting is only effective if max image dimensions set to value other than 0px v 0px.', + 'IMAGE_QUALITY' => 'Quality of uploaded image attachments (JPEG only)', + 'IMAGE_QUALITY_EXPLAIN' => 'Specify value between 50% (smaller file size) and 90% (higher quality). Quality higher than 90% increases filesize and is disabled. Setting only applies if max image dimensions set to value other than 0px by 0px.', + 'IMAGE_STRIP_METADATA' => 'Strip image metadata (JPEG only)', + 'IMAGE_STRIP_METADATA_EXPLAIN' => 'Strip Exif metadata eg author name, GPS coordinates & camera details. Setting only applies if max image dimensions set to value other than 0px by 0px.', 'MAX_ATTACHMENTS' => 'Maximum number of attachments per post', 'MAX_ATTACHMENTS_PM' => 'Maximum number of attachments per private message', diff --git a/phpBB/phpbb/db/migration/data/v32x/enable_plupload_config.php b/phpBB/phpbb/db/migration/data/v32x/enable_plupload_config.php index c801097745..a2f6af53db 100644 --- a/phpBB/phpbb/db/migration/data/v32x/enable_plupload_config.php +++ b/phpBB/phpbb/db/migration/data/v32x/enable_plupload_config.php @@ -23,7 +23,7 @@ class enable_plupload_config extends \phpbb\db\migration\migration public function update_data() { return [ - ['config.add', ['img_quality', '90']], + ['config.add', ['img_quality', '85']], ['config.add', ['img_strip_metadata', '1']], ]; } -- cgit v1.2.3-65-gdbad