-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_config.php
88 lines (60 loc) · 1.87 KB
/
admin_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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2015 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*/
require_once(__DIR__.'/../../class2.php');
if( !e107::isInstalled('tinymce5'))
{
e107::redirect('admin');
exit();
}
$result = e107::lan('tinymce5', true);
class tinymce5_admin extends e_admin_dispatcher
{
protected $modes = array(
'main' => array(
'controller' => 'tinymce5_ui',
'path' => null,
'ui' => 'tinymce5_ui_form',
'uipath' => null
),
);
protected $adminMenu = array(
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'P'),
'main/preview' => array('caption'=> LAN_PREVIEW, 'perm' => 'P', 'icon'=>'fa-eye')
);
protected $adminMenuAliases = array(
'main/edit' => 'main/list'
);
protected $menuTitle = 'TinyMce';
}
class tinymce5_ui extends e_admin_ui
{
protected $pluginTitle = 'tinymce5';
protected $pluginName = 'tinymce5';
protected $prefs = array(
'paste_as_text' => array('title' => TMCEALAN_1, 'type'=>'boolean', 'data' => 'int','help'=> ''),
'browser_spellcheck' => array('title' => TMCEALAN_2, 'type'=>'boolean', 'data' => 'int','help'=> TMCEALAN_3),
'visualblocks' => array('title' => TMCEALAN_4, 'type'=>'boolean', 'data' => 'int','help'=> TMCEALAN_5),
'use_theme_style' => array('title' => TMCEALAN_7, 'type'=>'boolean', 'data' => 'int','help'=> TMCEALAN_8),
'code_highlight_class' => array('title' => TMCEALAN_6, 'type'=>'text', 'data' => 'str','help'=> ''),
);
function previewPage()
{
e107::wysiwyg(true);
return e107::getForm()->bbarea('preview');
}
}
class tinymce5_ui_form extends e_admin_form_ui
{
}
new tinymce5_admin();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");