-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
extend.php
29 lines (24 loc) · 1.02 KB
/
extend.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
use Flarum\Extend\Console;
use Flarum\Extend\Locales;
use Flarum\Extend\Routes;
use Flarum\Extend\Frontend;
use Flarum\Extend\Formatter;
use Michaelbelgium\Mybbtoflarum\Commands\MybbToFlarumCommand;
use Michaelbelgium\Mybbtoflarum\Controllers\MybbToFlarumController;
use s9e\TextFormatter\Configurator;
return [
new Locales(__DIR__ . '/locale'),
(new Frontend('admin'))
->css(__DIR__ . '/less/admin.less')
->js(__DIR__ .'/js/dist/admin.js'),
(new Routes('api'))
->post('/mybb-to-flarum', 'mybbtoflarum.execute', MybbToFlarumController::class),
(new Formatter)->configure(function (Configurator $config) {
$config->BBCodes->delete("SIZE");
$config->BBCodes->addFromRepository('ALIGN');
$config->BBCodes->addFromRepository('HR');
$config->BBCodes->addCustom('[size={CHOICE=large,small,xx-small,x-small,medium,x-large,xx-large}]{TEXT}[/size]','<span style="font-size:{CHOICE}">{TEXT}</span>');
}),
(new Console())->command(MybbToFlarumCommand::class)
];