mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +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:
committed by
Marc Alexander
parent
f6c9d15b0c
commit
f5bb065a4d
51
phpBB/phpbb/db/migration/data/v400/add_bbcode_font_icon.php
Normal file
51
phpBB/phpbb/db/migration/data/v400/add_bbcode_font_icon.php
Normal 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',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user