-
Notifications
You must be signed in to change notification settings - Fork 4
/
_config.php
executable file
·23 lines (18 loc) · 1.08 KB
/
_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
use Firebrand\Hail\Api\Client;
use SilverStripe\Control\Director;
use SilverStripe\Core\Config\Config;
use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
use SilverStripe\ORM\Connect\MySQLDatabase;
define('HAIL_DIR', ltrim(Director::makeRelative(realpath(__DIR__)), DIRECTORY_SEPARATOR));
HTMLEditorConfig::get('cms')->enablePlugins(['sshail' => HAIL_DIR . '/client/dist/js/tinymce/hail-plugin.js'])->insertButtonsAfter('sslink', 'sshail');
//Emoji support needs the following charset / collation to work, it is disabled by default, see readme to enable
if (Config::inst()->get(Client::class, 'EnableEmojiSupport')) {
MySQLDatabase::config()->set('connection_charset', 'utf8mb4');
MySQLDatabase::config()->set('connection_collation', 'utf8mb4_general_ci');
MySQLDatabase::config()->set('charset', 'utf8mb4');
MySQLDatabase::config()->set('collation', 'utf8mb4_general_ci');
}
if (\SilverStripe\Core\ClassInfo::exists('Wilr\GoogleSitemaps\GoogleSitemap')) {
Wilr\GoogleSitemaps\GoogleSitemap::register_dataobject(\Firebrand\Hail\Models\Article::class, 'daily', '0.8');
}