1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/17326] Add font icon field for custom BBCodes

Adds a new field to the custom BBCode add/edit form that
allows admins to define a Font Awesome icon to be displayed
instead of the BBCodes name on the posting.php editor page.

PHPBB-17326
This commit is contained in:
Daniel James
2024-06-25 16:36:49 +01:00
committed by Marc Alexander
parent f6c9d15b0c
commit f5bb065a4d
8 changed files with 92 additions and 4 deletions

View File

@@ -0,0 +1,51 @@
<?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;
class add_bbcode_font_icon extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return $this->db_tools->sql_column_exists($this->table_prefix . 'bbcodes', 'bbcode_font_icon');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v400\dev'
];
}
public function update_schema()
{
return [
'add_columns' => [
$this->table_prefix . 'bbcodes' => [
'bbcode_font_icon' => ['VCHAR:50', ''],
],
],
];
}
public function revert_schema()
{
return [
'drop_columns' => [
$this->table_prefix . 'bbcodes' => [
'bbcode_font_icon',
],
],
];
}
}