mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/15769] Increase default avatar size
PHPBB3-15769
This commit is contained in:
parent
7cdd30958d
commit
b72379aaab
2 changed files with 45 additions and 5 deletions
|
@ -46,12 +46,12 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize', '6144');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize', '262144');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path', 'images/avatars/gallery');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height', '90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width', '90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_height', '20');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_width', '20');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height', '120');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width', '120');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_height', '40');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_min_width', '40');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_salt', 'phpbb_avatar');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_contact', 'contact@yourdomain.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_contact_name', '');
|
||||
|
|
40
phpBB/phpbb/db/migration/data/v400/increase_avatar_size.php
Normal file
40
phpBB/phpbb/db/migration/data/v400/increase_avatar_size.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v400;
|
||||
|
||||
use phpbb\db\migration\container_aware_migration;
|
||||
|
||||
class increase_avatar_size extends container_aware_migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return ['\phpbb\db\migration\data\v400\dev'];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['custom', [[$this, 'increase_size']]],
|
||||
];
|
||||
}
|
||||
|
||||
public function increase_size(): void
|
||||
{
|
||||
$this->config['avatar_filesize'] = max(262144, $this->config['avatar_filesize']); // Increase to 256 KiB
|
||||
$this->config['avatar_max_height'] = max('120', $this->config['avatar_max_height']); // Increase to max 120px height
|
||||
$this->config['avatar_max_width'] = max('120', $this->config['avatar_max_width']); // Increase to max 120px width
|
||||
$this->config['avatar_min_height'] = max('40', $this->config['avatar_min_height']); // Increase to min 40px height
|
||||
$this->config['avatar_min_width'] = max('40', $this->config['avatar_min_width']); // Increase to max 40px width
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue