summaryrefslogtreecommitdiff
path: root/admin/admin_ckeditor_inc.php
blob: df124c6bdb10a88d63acf5787834bf36e229fe1c (plain)
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
<?php

$formCkeditorFeatures = array(
	"ckeditor_custom_config" => array(
		'label' => 'Custom Config File',
		'note' => 'If enabled, a custom configuration is included, either <kbd>' . THEMES_PKG_DIR . '/styles/&lt;current-style&gt;/ckeditor/ckconfig.custom.js</kbd>, or <kbd>' . CKEDITOR_PKG_DIR . '/ckconfig.custom.js</kbd>. It may be a modified copy of <kbd>ckconfig.js</kbd> or of <kbd>ckconfig.bitweaver.js</kbd>. Depending on the modifications, a few of the settings below might not work anymore as expected (e.g., toolbar or skin settings).'
	),
	"ckeditor_debug" => array(
		'label' => 'Enabled debugging',
		'note' => 'Enable support for debug message output. On first debug message a window will pop up.'
	),
	"ckeditor_on_click" => array(
		'label' => 'Load CKEditor on Click',
		'note' => 'Delay loading the CKEditor until the user clicks on the text area.'
	),
	"ckeditor_ask" => array(
		'label' => 'Ask to use CKEditor',
		'note' => 'If set the user will be prompted if they want to use CKEditor for a given textbox. This option implies Load CKEditor on Click even if it is not set.'
	),
);


// Toolbars

$gBitSmarty->assign( 'formCkeditorFeatures', $formCkeditorFeatures );

$formToolbars = array( 'ckedit_toolbars' => array(
		'label' => 'Toolbar Set',
		'note' => 'The toolbar set to use. "All" includes functionality not supported by Bitweaver. Use at your own risk!'
		)
);

$gBitSmarty->assign( 'formToolbars', $formToolbars );
$gBitSmarty->assign( 'formToolbarChoices', array('Basic', 'Intermediate', 'Advanced', 'Full'));


// Skin

$formSkin = array( 'ckedit_skin' => array(
		'label' => 'Skin',
		'note' => 'The skin to use.',
		)
);
$gBitSmarty->assign( 'formSkin', $formSkin );
$gBitSmarty->assign( 'formSkinChoices', array('bw_basic', 'moono', 'kama', 'office2003', 'v2'));


if( !empty( $_REQUEST['change_prefs'] ) ) {
	foreach( $formCkeditorFeatures as $item => $data ) {
		simple_set_toggle( $item, CKEDITOR_PKG_NAME );
	}

	$ckeditorSets = array_merge( $formToolbars , $formSkin);
	foreach( $ckeditorSets as $item => $data ) {
		simple_set_value( $item, CKEDITOR_PKG_NAME );
	}
}
?>