framework/extensions/emoji/bootstrap.php

36 lines
1.1 KiB
PHP
Raw Normal View History

2015-07-23 19:06:02 +08:00
<?php
2015-09-04 11:02:52 +08:00
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2018-01-03 05:37:28 +08:00
use Flarum\Extend;
use s9e\TextFormatter\Configurator;
2015-07-23 19:06:02 +08:00
2018-01-03 05:37:28 +08:00
return [
(new Extend\Assets('forum'))
2018-01-22 04:09:04 +08:00
->asset(__DIR__.'/js/forum/dist/extension.js')
->asset(__DIR__.'/less/forum/extension.less')
2018-01-03 05:37:28 +08:00
->bootstrapper('flarum/emoji/main'),
new Extend\FormatterConfiguration(function (Configurator $config) {
$config->Emoji->useEmojiOne();
$config->Emoji->omitImageSize();
$config->Emoji->useSVG();
$config->Emoji->addAlias(':)', '🙂');
$config->Emoji->addAlias(':D', '😃');
$config->Emoji->addAlias(':P', '😛');
$config->Emoji->addAlias(':(', '🙁');
$config->Emoji->addAlias(':|', '😐');
$config->Emoji->addAlias(';)', '😉');
$config->Emoji->addAlias(':\'(', '😢');
$config->Emoji->addAlias(':O', '😮');
$config->Emoji->addAlias('>:(', '😡');
})
];