framework/extensions/emoji/extend.php

33 lines
966 B
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\Frontend('forum'))
2018-06-17 13:23:35 +08:00
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less'),
2018-04-25 08:46:58 +08:00
2018-06-17 13:31:19 +08:00
(new Extend\Formatter)
->configure(function (Configurator $config) {
$config->Emoticons->add(':)', '🙂');
$config->Emoticons->add(':D', '😃');
$config->Emoticons->add(':P', '😛');
$config->Emoticons->add(':(', '🙁');
$config->Emoticons->add(':|', '😐');
$config->Emoticons->add(';)', '😉');
$config->Emoticons->add(':\'(', '😢');
$config->Emoticons->add(':O', '😮');
$config->Emoticons->add('>:(', '😡');
2018-06-17 13:31:19 +08:00
})
2018-01-03 05:37:28 +08:00
];