-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextend.php
38 lines (29 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
30
31
32
33
34
35
36
37
38
<?php
/*
* A Flarum extension template for BBCode created by Billy Wilcosky.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* For instructions, please view the README file.
*/
use Flarum\Extend;
use Flarum\Frontend\Document;
use s9e\TextFormatter\Configurator;
return [
/*
* (new Extend\Frontend('forum'))
* ->content(function (Document $document) {
* $document->head[] = '<link rel="stylesheet" type="text/css" href="/assets/extensions/YOURUSERNAME-nameofextension/styles.css">';
* }),
*/
(new Extend\Formatter)
->configure(function (Configurator $config) {
$config->BBCodes->addCustom(
'[video]{URL}[/video]',
'<video controls><source src="{URL}" /></video>'
);
$config->BBCodes->addCustom(
'[audio]{URL}[/audio]',
'<audio controls><source src="{URL}" /></audio>'
);
})
];