diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index 25d5cb5207..9a5179419e 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -105,7 +105,7 @@ - {items.TEXT_ALT} + {items.TEXT_ALT} [{items.IMG}] diff --git a/phpBB/images/icons/misc/fire.svg b/phpBB/images/icons/misc/fire.svg new file mode 100644 index 0000000000..5645475690 --- /dev/null +++ b/phpBB/images/icons/misc/fire.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/misc/heart.svg b/phpBB/images/icons/misc/heart.svg new file mode 100644 index 0000000000..f25d0a3c64 --- /dev/null +++ b/phpBB/images/icons/misc/heart.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/misc/radioactive.svg b/phpBB/images/icons/misc/radioactive.svg new file mode 100644 index 0000000000..372c84e423 --- /dev/null +++ b/phpBB/images/icons/misc/radioactive.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/misc/star.svg b/phpBB/images/icons/misc/star.svg new file mode 100644 index 0000000000..e5e88794b9 --- /dev/null +++ b/phpBB/images/icons/misc/star.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/misc/thinking.svg b/phpBB/images/icons/misc/thinking.svg new file mode 100644 index 0000000000..b3fdc9fca3 --- /dev/null +++ b/phpBB/images/icons/misc/thinking.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/smile/alert.svg b/phpBB/images/icons/smile/alert.svg new file mode 100644 index 0000000000..173ba4d780 --- /dev/null +++ b/phpBB/images/icons/smile/alert.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/smile/info.svg b/phpBB/images/icons/smile/info.svg new file mode 100644 index 0000000000..f6e9ef7512 --- /dev/null +++ b/phpBB/images/icons/smile/info.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/smile/mrgreen.svg b/phpBB/images/icons/smile/mrgreen.svg new file mode 100644 index 0000000000..ef639a5ccd --- /dev/null +++ b/phpBB/images/icons/smile/mrgreen.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/smile/question.svg b/phpBB/images/icons/smile/question.svg new file mode 100644 index 0000000000..7a7bf1602a --- /dev/null +++ b/phpBB/images/icons/smile/question.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/images/icons/smile/redface.svg b/phpBB/images/icons/smile/redface.svg new file mode 100644 index 0000000000..84fe0db5ef --- /dev/null +++ b/phpBB/images/icons/smile/redface.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 13af5fa304..21b26ee9c8 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -756,16 +756,16 @@ INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_heigh INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_height, smiley_order) VALUES (':ugeek:', 'icon_e_ugeek.svg', '{L_SMILIES_UBER_GEEK}', 17, 18, 42); # -- icons -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/fire.gif', 16, 16, 1, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/redface.gif', 16, 16, 9, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/mrgreen.gif', 16, 16, 10, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/heart.gif', 16, 16, 4, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/star.gif', 16, 16, 2, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/radioactive.gif', 16, 16, 3, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/thinking.gif', 16, 16, 5, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/info.gif', 16, 16, 8, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.gif', 16, 16, 6, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alert.gif', 16, 16, 7, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/fire.svg', 16, 16, 1, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/redface.svg', 16, 16, 9, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/mrgreen.svg', 16, 16, 10, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/heart.svg', 16, 16, 4, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/star.svg', 16, 16, 2, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/radioactive.svg', 16, 16, 3, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/thinking.svg', 16, 16, 5, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/info.svg', 16, 16, 8, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.svg', 16, 16, 6, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alert.svg', 16, 16, 7, 1); # -- reasons INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('warez', '{L_REPORT_WAREZ}', 1); diff --git a/phpBB/phpbb/db/migration/data/v400/hidpi_icons.php b/phpBB/phpbb/db/migration/data/v400/hidpi_icons.php new file mode 100644 index 0000000000..6e91b15ca5 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v400/hidpi_icons.php @@ -0,0 +1,75 @@ + + * @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\migration; + +class hidpi_icons extends migration +{ + private array $default_icons = [ + 'misc/fire', + 'misc/heart', + 'misc/radioactive', + 'misc/star', + 'misc/thinking', + 'smile/alert', + 'smile/info', + 'smile/mrgreen', + 'smile/question', + 'smile/redface', + ]; + + public static function depends_on(): array + { + return [ + '\phpbb\db\migration\data\v400\dev' + ]; + } + + public function update_data(): array + { + return [ + ['custom', [[$this, 'gif_to_svg_icons']]], + ]; + } + + public function revert_data(): array + { + return [ + ['custom', [[$this, 'svg_to_gif_icons']]], + ]; + } + + public function gif_to_svg_icons(): void + { + foreach ($this->default_icons as $smiley) + { + $sql = 'UPDATE ' . $this->tables['icons'] . " + SET icons_url = '" . $this->db->sql_escape($smiley) . ".svg' + WHERE icons_url = '" . $this->db->sql_escape($smiley) . ".gif'"; + $this->db->sql_query($sql); + } + } + + public function svg_to_gif_icons(): void + { + foreach ($this->default_icons as $smiley) + { + $sql = 'UPDATE ' . $this->tables['icons'] . " + SET icons_url = '" . $this->db->sql_escape($smiley) . ".gif' + WHERE icons_url = '" . $this->db->sql_escape($smiley) . ".svg'"; + $this->db->sql_query($sql); + } + } +}