diff options
Diffstat (limited to 'admin/admin_ckeditor_inc.php')
| -rwxr-xr-x | admin/admin_ckeditor_inc.php | 82 |
1 files changed, 40 insertions, 42 deletions
diff --git a/admin/admin_ckeditor_inc.php b/admin/admin_ckeditor_inc.php index 1008c32..e3698c5 100755 --- a/admin/admin_ckeditor_inc.php +++ b/admin/admin_ckeditor_inc.php @@ -1,64 +1,62 @@ <?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/<current-style>/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.' - ), -); - +$formCkeditorFeatures = [ + "ckeditor_custom_config" => [ + "label" => "Custom Config File", + "note" => "If enabled, a custom configuration is included, either <kbd>" . THEMES_PKG_PATH . "/styles/<current-style>/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" => [ + "label" => "Enabled debugging", + "note" => "Enable support for debug message output. On first debug message a window will pop up.", + ], + "ckeditor_on_click" => [ + "label" => "Load CKEditor on Click", + "note" => "Delay loading the CKEditor until the user clicks on the text area.", + ], + "ckeditor_ask" => [ + "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( "formCkeditorFeatures", $formCkeditorFeatures ); -$gBitSmarty->assign( 'formToolbars', $formToolbars ); -$gBitSmarty->assign( 'formToolbarChoices', array('Basic', 'Intermediate', 'Advanced', 'Full')); +$formToolbars = [ + "ckedit_toolbars" => [ + "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", ["Basic", "Intermediate", "Advanced", "Full"]); // Skin -$formSkin = array( 'ckedit_skin' => array( - 'label' => 'Skin', - 'note' => 'The skin to use.', - ) -); -$gBitSmarty->assign( 'formSkin', $formSkin ); -$skins = array_flip( scandir( CKEDITOR_PKG_PATH.'skins/' ) ); -foreach( array( '.', '..' ) as $dir ) { +$formSkin = [ + "ckedit_skin" => [ + "label" => "Skin", + "note" => "The skin to use.", + ], +]; +$gBitSmarty->assign( "formSkin", $formSkin ); +$skins = array_flip( scandir( CKEDITOR_PKG_PATH."skins/" ) ); +foreach( [ ".", ".." ] as $dir ) { if( isset( $skins[$dir] ) ) { unset( $skins[$dir] ); } } -$gBitSmarty->assign( 'formSkinChoices', array_keys( $skins ) ); +$gBitSmarty->assign( "formSkinChoices", array_keys( $skins ) ); - -if( !empty( $_REQUEST['change_prefs'] ) ) { +if( !empty( $_REQUEST["change_prefs"] ) ) { foreach( $formCkeditorFeatures as $item => $data ) { simple_set_toggle( $item, CKEDITOR_PKG_NAME ); } - $ckeditorSets = array_merge( $formToolbars , $formSkin); + $ckeditorSets = [ ...$formToolbars , ...$formSkin]; foreach( $ckeditorSets as $item => $data ) { simple_set_value( $item, CKEDITOR_PKG_NAME ); } -} -?> +}
\ No newline at end of file |
