diff options
| author | lsces <lester@lsces.co.uk> | 2025-08-27 15:40:30 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2025-08-27 15:40:30 +0100 |
| commit | 676eee147404699eae27e678f2f5616758773c10 (patch) | |
| tree | b714a674f39197d2a582243dd342653d5f9e980c /admin | |
| parent | b86e60023adb9f4ce6e8e3bedad2df97cb0bde51 (diff) | |
| download | themes-676eee147404699eae27e678f2f5616758773c10.tar.gz themes-676eee147404699eae27e678f2f5616758773c10.tar.bz2 themes-676eee147404699eae27e678f2f5616758773c10.zip | |
Admin tools updated to PHP8.4 and namespace
Diffstat (limited to 'admin')
| -rwxr-xr-x[-rw-r--r--] | admin/admin_columns_inc.php | 47 | ||||
| -rwxr-xr-x[-rw-r--r--] | admin/admin_custom_modules_inc.php | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | admin/admin_layout_inc.php | 45 | ||||
| -rwxr-xr-x[-rw-r--r--] | admin/admin_layout_overview_inc.php | 10 | ||||
| -rwxr-xr-x | admin/admin_themes_inc.php | 102 | ||||
| -rwxr-xr-x[-rw-r--r--] | admin/admin_themes_manager.php | 44 | ||||
| -rwxr-xr-x[-rw-r--r--] | admin/menus.php | 6 | ||||
| -rwxr-xr-x[-rw-r--r--] | admin/schema_inc.php | 61 |
8 files changed, 208 insertions, 109 deletions
diff --git a/admin/admin_columns_inc.php b/admin/admin_columns_inc.php index 379e823..8647fa9 100644..100755 --- a/admin/admin_columns_inc.php +++ b/admin/admin_columns_inc.php @@ -1,51 +1,51 @@ <?php -$feedback = array(); +$feedback = []; // Columns -$activeColumns = array( - 'site_top_column' => array( +$activeColumns = [ + 'site_top_column' => [ 'label' => 'Top Module Area', - 'note' => 'Check to enable the top module area site-wide.', - ), - 'site_right_column' => array( + 'note' => 'Check to enable the top module area site-wide.', + ], + 'site_right_column' => [ 'label' => 'Right Module Area', - 'note' => 'Check to enable the right module area site-wide.', - ), - 'site_left_column' => array( + 'note' => 'Check to enable the right module area site-wide.', + ], + 'site_left_column' => [ 'label' => 'Left Module Area', - 'note' => 'Check to enable the left module area site-wide.', - ), - 'site_bottom_column' => array( + 'note' => 'Check to enable the left module area site-wide.', + ], + 'site_bottom_column' => [ 'label' => 'Bottom Module Area', - 'note' => 'Check to enable the bottom module area site-wide.', - ), -); + 'note' => 'Check to enable the bottom module area site-wide.', + ], +]; $gBitSmarty->assign( 'activeColumns', $activeColumns ); // Areas -$hideableAreas = array( +$hideableAreas = [ 'top' => 'Top', 'left' => 'Left', 'right' => 'Right', 'bottom' => 'Bottom', -); +]; $gBitSmarty->assign( 'hideableAreas', $hideableAreas ); // Display modes -$displayModes = array( +$displayModes = [ "display" => "Display content", "list" => "Display listings such as galleries", "edit" => "Edit areas such as creating a wiki page", "upload" => "Uploading files to a file or image gallery", "admin" => "Package administration", -); +]; $gBitSmarty->assign( 'displayModes', $displayModes ); // hide columns in individual packages foreach( $gBitSystem->mPackages as $key => $package ) { if( !empty( $package['installed'] ) ) { if( $package['name'] == 'kernel' ) { - $package['name'] = tra( 'Site Default' ); + $package['name'] = Bitweaver\KernelTools::tra( 'Site Default' ); } $packageColumns[strtolower( $key )] = ucfirst( $package['name'] ); } @@ -56,10 +56,10 @@ $gBitSmarty->assign( 'packageColumns', $packageColumns ); // process the form if( !empty( $_REQUEST['reset_columns'] )) { $gBitSystem->storeConfigMatch( "#_hide_(top|right|bottom|left)_col$#" ); - $feedback['success'] = tra( "All custom column settings have been reset." ); + $feedback['success'] = Bitweaver\KernelTools::tra( "All custom column settings have been reset." ); } elseif( !empty( $_REQUEST['column_control'] )) { - foreach( array( 'layout-header', 'layout-body', 'layout-footer' ) as $key ) { + foreach( [ 'layout-header', 'layout-body', 'layout-footer' ] as $key ) { $gBitSystem->storeConfig( $key, $_REQUEST[$key] ); } foreach( array_keys( $activeColumns ) as $item ) { @@ -75,8 +75,7 @@ if( !empty( $_REQUEST['reset_columns'] )) { } } - $feedback['success'] = tra( "The settings were successfully stored." ); + $feedback['success'] = Bitweaver\KernelTools::tra( "The settings were successfully stored." ); } $gBitSmarty->assign( 'feedback', $feedback ); -?> diff --git a/admin/admin_custom_modules_inc.php b/admin/admin_custom_modules_inc.php index 4b3dd93..fe63841 100644..100755 --- a/admin/admin_custom_modules_inc.php +++ b/admin/admin_custom_modules_inc.php @@ -2,7 +2,7 @@ // $Header$ require_once( '../../kernel/includes/setup_inc.php' ); -$feedback = array(); +$feedback = []; if( !empty( $_REQUEST['name'] )) { if( !empty( $_REQUEST['action'] )) { diff --git a/admin/admin_layout_inc.php b/admin/admin_layout_inc.php index 4be0eeb..7f5922b 100644..100755 --- a/admin/admin_layout_inc.php +++ b/admin/admin_layout_inc.php @@ -2,15 +2,15 @@ // $Header$ // Initialization -require_once( '../../kernel/includes/setup_inc.php' ); +require_once '../../kernel/includes/setup_inc.php'; if( defined( 'ROLE_MODEL' )) { if( !isset($_REQUEST["roles"] ) ) { - $_REQUEST["roles"] = array(); + $_REQUEST["roles"] = []; } } else { if( !isset($_REQUEST["groups"] ) ) { - $_REQUEST["groups"] = array(); + $_REQUEST["groups"] = []; } } @@ -18,12 +18,12 @@ if( empty( $_REQUEST['module_package'] ) ) { $_REQUEST['module_package'] = DEFAULT_PACKAGE; } -$feedback = array(); -$gBitSmarty->assignByRef( 'feedback', $feedback ); -$layoutHash = array( - 'layout' => $_REQUEST['module_package'], - 'fallback' => FALSE, -); +$feedback = []; +$gBitSmarty->assign( 'feedback', $feedback ); +$layoutHash = [ + 'layout' => $_REQUEST['module_package'], + 'fallback' => false, +]; $layout = $gBitThemes->getLayout( $layoutHash ); if( !empty( $_REQUEST['fixpos'] )) { @@ -97,19 +97,19 @@ if( isset( $_REQUEST['module_id'] ) && !empty( $_REQUEST['move_module'] )) { // this will sort the layout selection dropdown $allLayouts = $gBitThemes->getAllLayouts(); ksort( $allLayouts ); -$gBitSmarty->assignByRef( 'allLayouts', $allLayouts ); +$gBitSmarty->assign( 'allLayouts', $allLayouts ); $gBitSmarty->assign( 'module_package', $_REQUEST['module_package'] ); $layoutHash = array( 'layout' => $_REQUEST['module_package'], - 'fallback' => FALSE, + 'fallback' => false, ); $editLayout = $gBitThemes->getLayout( $layoutHash ); $gBitThemes->generateModuleNames( $editLayout ); $gBitSmarty->assign( 'editLayout', $editLayout ); $combinedList = array_merge( array_keys( $gBitSystem->mPackages ), array_keys( $allLayouts ) ); -$layoutList = array(); +$layoutList = []; foreach( $combinedList as $l ) { $layoutList[$l] = $l; if( isset( $allLayouts[$l] ) ) { @@ -128,37 +128,36 @@ $layoutAreas['right'] = 'r'; if( $gBitSystem->isFeatureActive( 'site_bottom_column' )) { $layoutAreas['bottom'] = 'b'; } -$gBitSmarty->assignByRef( 'layoutAreas', $layoutAreas ); +$gBitSmarty->assign( 'layoutAreas', $layoutAreas ); $allModules = $gBitThemes->getAllModules(); ksort( $allModules ); -$gBitSmarty->assignByRef( 'allModules', $allModules ); +$gBitSmarty->assign( 'allModules', $allModules ); $allModulesHelp = $gBitThemes->getAllModules( 'modules', 'help_mod_' ); ksort( $allModulesHelp ); -$gBitSmarty->assignByRef( 'allModulesHelp', $allModulesHelp ); +$gBitSmarty->assign( 'allModulesHelp', $allModulesHelp ); $allCenters = $gBitThemes->getAllModules( 'templates', 'center_' ); ksort( $allCenters ); -$gBitSmarty->assignByRef( 'allCenters', $allCenters ); +$gBitSmarty->assign( 'allCenters', $allCenters ); -$orders = array(); +$orders = []; for( $i = 1; $i < 50; $i++ ) { $orders[] = $i; } -$gBitSmarty->assignByRef( 'orders', $orders ); +$gBitSmarty->assign( 'orders', $orders ); if( defined( 'ROLE_MODEL' )) { $roles = $gBitUser->getAllUserRoles( ROOT_USER_ID ); - $gBitSmarty->assignByRef( "roles", $roles ); + $gBitSmarty->assign( "roles", $roles ); } else { $groups = $gBitUser->getAllUserGroups( ROOT_USER_ID ); - $gBitSmarty->assignByRef( "groups", $groups ); + $gBitSmarty->assign( "groups", $groups ); } // we need gBitThemes as well -$gBitSmarty->assignByRef( "gBitThemes", $gBitThemes ); +$gBitSmarty->assign( "gBitThemes", $gBitThemes ); -$gBitThemes->loadJavascript( THEMES_PKG_PATH.'scripts/BitThemes.js', TRUE ); -?> +$gBitThemes->loadJavascript( THEMES_PKG_PATH.'scripts/BitThemes.js', true ); diff --git a/admin/admin_layout_overview_inc.php b/admin/admin_layout_overview_inc.php index e6edc7e..bc21be0 100644..100755 --- a/admin/admin_layout_overview_inc.php +++ b/admin/admin_layout_overview_inc.php @@ -45,25 +45,25 @@ $layoutAreas['right'] = 'r'; if( $gBitSystem->isFeatureActive( 'site_bottom_column' )) { $layoutAreas['bottom'] = 'b'; } -$gBitSmarty->assignByRef( 'layoutAreas', $layoutAreas ); +$gBitSmarty->assign( 'layoutAreas', $layoutAreas ); $layouts = $gBitThemes->getAllLayouts(); foreach( $layouts as $package => $layout ) { $gBitThemes->generateModuleNames( $layout ); $layouts[$package] = $layout; } -$gBitSmarty->assignByRef( 'layouts', $layouts ); +$gBitSmarty->assign( 'layouts', $layouts ); $allModulesHelp = $gBitThemes->getAllModules( 'modules', 'help_mod_' ); ksort( $allModulesHelp ); -$gBitSmarty->assignByRef( 'allModulesHelp', $allModulesHelp ); +$gBitSmarty->assign( 'allModulesHelp', $allModulesHelp ); $gBitSmarty->assign( 'pageName', 'Layout Options' ); if( defined( 'ROLE_MODEL' )) { $roles = $gBitUser->getAllUserRoles( ROOT_USER_ID ); - $gBitSmarty->assignByRef( "roles", $roles ); + $gBitSmarty->assign( "roles", $roles ); } else { $groups = $gBitUser->getAllUserGroups( ROOT_USER_ID ); - $gBitSmarty->assignByRef( "groups", $groups ); + $gBitSmarty->assign( "groups", $groups ); } ?> diff --git a/admin/admin_themes_inc.php b/admin/admin_themes_inc.php new file mode 100755 index 0000000..5840ecb --- /dev/null +++ b/admin/admin_themes_inc.php @@ -0,0 +1,102 @@ +<?php +use \Bitweaver\KernelTools; + +$themeSettings = [ + 'site_use_jscalendar' => array( + 'label' => 'Enable JSCalendar', + 'note' => 'If checked, a calendar popup allows for easily selecting a date using an appealing interface.', + ), + 'themes_collapsible_modules' => array( + 'label' => 'Collapsible modules', + 'note' => 'This allows users to collapse modules by clicking on their titles. Can be useful if you use many modules.', + ), + 'themes_output_highlighting' => array( + 'label' => 'Search term highlighting', + 'note' => 'This enables the use of "highlight=x" in the URL to highlight words used in a search result.', + ), +// 'themes_edit_css' => array( +// 'label' => 'Edit Css', +// 'note' => 'Enables you to edit CSS files from within your browser to customise your site style according to your desires.', +// ), + 'site_disable_fat' => array( + 'label' => "Disable fading", + 'note' => "If checked, success, warning or error messages display no fading effect anymore.", + ), + 'site_disable_jstabs' => array( + 'label' => "Disable Javascript tabs", + 'note' => "If checked, admin pages flow vertically, instead of displaying in a 'tabbed pages' interface.", + ), + 'site_fancy_zoom' => array( + 'label' => "Enable Fancy Zoom for images", + 'note' => "If checked, a Javascript zooms images when clicking on them. This will modify the behaviour when viewing most images. If you are running a commercial site, please read the license notice in /util/javascript/fancyzoom/js-global/FancyZoom.js.", + ), + 'site_mods_req_admn_grp' => array( + 'label' => 'Modules require membership', + 'note' => 'If enabled, modules with group/role restrictions require the administrator to be member of the group/role. If disabled, all modules are always visible to administrators.', + ), + 'themes_joined_js_css' => array( + 'label' => 'Joined CSS and JS', + 'note' => 'If enabled, javascript and CSS files will be concatenated into single files to reduce server requests. This is useful for webdesigners and developers. Please enable this feature on live sites.', + ), + 'themes_packed_js_css' => array( + 'label' => 'Packed CSS and JS', + 'note' => 'If enabled, javascript and CSS files will be reduced to their smallest possible size. This is useful for webdesigners and developers. Please enable this feature on live sites.', + ), + 'themes_disable_pkg_css' => array( + 'label' => 'Disable All Package CSS', + 'note' => 'If checked, all css that is automatically included by packages will be disabled. If you want to include some of the package css it is recommended you copy that css to your theme css file.', + ), +]; +$gBitSmarty->assign( 'themeSettings', $themeSettings ); + +if( !empty( $_REQUEST['change_prefs'] )) { + $pref_simple_values = array( + "site_biticon_display_style", + "site_icon_size", + "themes_jquery_hosting", + "default_icon_style", + ); + + foreach( $pref_simple_values as $svitem ) { + simple_set_value( $svitem, THEMES_PKG_NAME ); + } + + foreach( array_keys( $themeSettings ) as $toggle ) { + simple_set_toggle( $toggle, THEMES_PKG_NAME ); + } + + // due to the packing / joining options, we will remove the cache and reload the page + $gBitThemes->mThemeCache->expungeCache(); + bit_redirect( KERNEL_PKG_URL."admin/index.php?page=themes" ); +} + +// set the options biticon takes +$biticon_display_options = array( + 'icon' => KernelTools::tra( 'Icon' ), + 'text' => KernelTools::tra( 'Text' ), + 'icon_text' => KernelTools::tra( 'Icon and Text' ) +); +$gBitSmarty->assign( "biticon_display_options", $biticon_display_options ); + +// get the icon styles +$subDirs = array( 'style_info' ); +$iconStyles = $gBitThemes->getStylesList( CONFIG_PKG_PATH."styles/icons/", false, $subDirs ); +foreach( $iconStyles as $key=>$style ){ + $iconStyles[$key] = str_replace( "_", " ", $style['style'] ); +} +$gBitSmarty->assign( "iconStyles", $iconStyles ); + +$biticon_sizes = array( + 'small' => KernelTools::tra( 'Small' ), + 'large' => KernelTools::tra( 'Large' ), +); +$gBitSmarty->assign( "biticon_sizes", $biticon_sizes ); + +// These numbers are intentionally off by 1 due to the way IE fixes name their js +$jqueryOptions = array( + 'jquery' => KernelTools::tra( 'Google Hosted' ), + 'jquerylocal' => KernelTools::tra( 'Local' ), +); +$gBitSmarty->assign( 'jqueryOptions', $jqueryOptions ); + +?> diff --git a/admin/admin_themes_manager.php b/admin/admin_themes_manager.php index 4a59854..c6d35c4 100644..100755 --- a/admin/admin_themes_manager.php +++ b/admin/admin_themes_manager.php @@ -1,21 +1,22 @@ <?php -require_once( '../../kernel/includes/setup_inc.php' ); -require_once( KERNEL_PKG_INCLUDE_PATH.'simple_form_functions_lib.php' ); +require_once '../../kernel/includes/setup_inc.php'; +require_once KERNEL_PKG_INCLUDE_PATH . 'simple_form_functions_lib.php'; $gBitSystem->verifyPermission( 'p_admin' ); // apply the icon theme -if( !empty( $_REQUEST["site_icon_style"] ) ) { +if (!empty( $_REQUEST["site_icon_style"] )) { $gBitSystem->storeConfig( 'site_icon_style', $_REQUEST["site_icon_style"], THEMES_PKG_NAME ); } // apply the style layout -if( !empty( $_REQUEST["site_style_layout"] ) ) { - if( !empty( $_REQUEST['approved'] ) ) { - $gBitSystem->storeConfig( 'site_style_layout', ( ( $_REQUEST["site_style_layout"] != 'remove' ) ? $_REQUEST["site_style_layout"] : NULL ), THEMES_PKG_NAME ); - } else { - $gBitSystem->setConfig( 'site_style_layout', ( ( $_REQUEST["site_style_layout"] != 'remove' ) ? $_REQUEST["site_style_layout"] : NULL ), THEMES_PKG_NAME ); - $gBitSmarty->assign( 'approve', TRUE ); +if (!empty( $_REQUEST["site_style_layout"] )) { + if (!empty( $_REQUEST['approved'] )) { + $gBitSystem->storeConfig( 'site_style_layout', ( $_REQUEST["site_style_layout"] != 'remove' ) ? $_REQUEST["site_style_layout"] : null, THEMES_PKG_NAME ); + } + else { + $gBitSystem->setConfig( 'site_style_layout', ( $_REQUEST["site_style_layout"] != 'remove' ) ? $_REQUEST["site_style_layout"] : null, THEMES_PKG_NAME ); + $gBitSmarty->assign( 'approve', true ); } } @@ -27,28 +28,28 @@ if( !empty( $_REQUEST["site_style"] ) ) { $gBitThemes->setStyle( $_REQUEST["site_style"] ); } else { $gBitSystem->setConfig( 'style_variation', !empty( $_REQUEST["style_variation"] ) ? $_REQUEST["style_variation"] : '', THEMES_PKG_NAME ); - $gBitSmarty->assign( 'approve', TRUE ); + $gBitSmarty->assign( 'approve', true ); $gBitThemes->setStyle( $_REQUEST["site_style"] ); } } // Get list of available styles -$styles = $gBitThemes->getStyles( NULL, TRUE ); -$gBitSmarty->assignByRef( "styles", $styles ); +$styles = $gBitThemes->getStyles(); +$gBitSmarty->assign( "styles", $styles ); -$subDirs = array( 'style_info', 'alternate' ); -$stylesList = $gBitThemes->getStylesList( NULL, NULL, $subDirs ); -$gBitSmarty->assignByRef( "stylesList", $stylesList ); +$subDirs = [ 'style_info', 'alternate' ]; +$stylesList = $gBitThemes->getStylesList( '', false, $subDirs ); +$gBitSmarty->assign( "stylesList", $stylesList ); -$subDirs = array( 'style_info' ); -$iconStyles = $gBitThemes->getStylesList( CONFIG_PKG_PATH."iconsets/", NULL, $subDirs ); -$gBitSmarty->assignByRef( "iconStyles", $iconStyles ); +$subDirs = [ 'style_info' ]; +$iconStyles = $gBitThemes->getStylesList( CONFIG_PKG_PATH."iconsets/", false, $subDirs ); +$gBitSmarty->assign( "iconStyles", $iconStyles ); $styleLayouts = $gBitThemes->getStyleLayouts(); -$gBitSmarty->assignByRef( "styleLayouts", $styleLayouts ); +$gBitSmarty->assign( "styleLayouts", $styleLayouts ); // pick some icons for the preview. -$sampleIcons = array( +$sampleIcons = [ 'applications-internet', 'dialog-cancel', 'dialog-error', @@ -64,11 +65,10 @@ $sampleIcons = array( 'go-up', 'help-browser', 'folder', -); +]; $gBitSmarty->assign( "sampleIcons", $sampleIcons ); // load css file $gBitThemes->loadCss( THEMES_PKG_PATH.'css/admin_themes.css' ); $gBitSystem->display( 'bitpackage:themes/admin_themes_manager.tpl', 'Themes Manager' , array( 'display_mode' => 'admin' )); -?> diff --git a/admin/menus.php b/admin/menus.php index ed7fcba..181cc19 100644..100755 --- a/admin/menus.php +++ b/admin/menus.php @@ -5,7 +5,7 @@ require_once( '../../kernel/includes/setup_inc.php' ); require_once( KERNEL_PKG_INCLUDE_PATH."simple_form_functions_lib.php" ); -//$gBitSmarty->assign( 'loadDragDrop', TRUE ); +//$gBitSmarty->assign( 'loadDragDrop', true ); //$gBitSystem->setOnloadScript('initDragDrop();'); $gBitSystem->verifyPermission( 'p_admin' ); @@ -65,7 +65,7 @@ if( !empty( $_REQUEST['update_menus'] ) ) { $gBitSystem->storeConfig( "menu_$menuPackage", 'n', THEMES_PKG_NAME ); } elseif( $gBitSystem->getConfig( "menu_$menuPackage" ) == 'n' ) { // the package menu was off and now is on. Just delete the pref since on is the assumed state - $gBitSystem->storeConfig( "menu_$menuPackage", NULL, THEMES_PKG_NAME ); + $gBitSystem->storeConfig( "menu_$menuPackage", null, THEMES_PKG_NAME ); } if( !empty( $_REQUEST["{$menuPackage}_menu_text"] ) ) { @@ -77,7 +77,7 @@ if( !empty( $_REQUEST['update_menus'] ) ) { // someone thinks that our default package names aren't good enough! HA! $gBitSystem->storeConfig( "{$menuPackage}_menu_position", $_REQUEST["{$menuPackage}_menu_position"], constant( strtoupper( $menuPackage ).'_PKG_NAME' )); } else { - $gBitSystem->storeConfig( "{$menuPackage}_menu_position", NULL, constant( strtoupper( $menuPackage ).'_PKG_NAME' )); + $gBitSystem->storeConfig( "{$menuPackage}_menu_position", null, constant( strtoupper( $menuPackage ).'_PKG_NAME' )); } } diff --git a/admin/schema_inc.php b/admin/schema_inc.php index a7dfed3..390e7d4 100644..100755 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -2,7 +2,7 @@ global $gBitInstaller; -$tables = array( +$tables = [ /* module_id a unique id * package package for which this module is used * layout_area column in which this module is visible - l r or c @@ -30,49 +30,48 @@ $tables = array( title C(200), data X ", -); +]; foreach( array_keys( $tables ) AS $tableName ) { - $gBitInstaller->registerSchemaTable( THEMES_PKG_NAME, $tableName, $tables[$tableName], TRUE ); + $gBitInstaller->registerSchemaTable( THEMES_PKG_NAME, $tableName, $tables[$tableName], true ); } -$indices = array ( - 'themes_layouts_module_idx' => array( 'table' => 'themes_layouts', 'cols' => 'module_id', 'opts' => NULL ), -); +$indices = [ + 'themes_layouts_module_idx' => [ 'table' => 'themes_layouts', 'cols' => 'module_id', 'opts' => null ], +]; $gBitInstaller->registerSchemaIndexes( THEMES_PKG_NAME, $indices ); // ### Sequences -$sequences = array ( - 'themes_layouts_module_id_seq' => array( 'start' => 1 ) -); +$sequences = [ + 'themes_layouts_module_id_seq' => [ 'start' => 1 ] +]; $gBitInstaller->registerSchemaSequences( THEMES_PKG_NAME, $sequences ); -$gBitInstaller->registerPackageInfo( THEMES_PKG_NAME, array( +$gBitInstaller->registerPackageInfo( THEMES_PKG_NAME, [ 'description' => "The Themes package is an integral part of bitweaver which allows you to control the look and feel of you site.", 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', -)); +] ); -//$gBitInstaller->registerSchemaTable( THEMES_PKG_NAME, '', '', TRUE ); -$gBitInstaller->registerPreferences( THEMES_PKG_NAME, array( -// array( THEMES_PKG_NAME,'themes_joined_js_css', 'y' ), -// array( THEMES_PKG_NAME,'themes_packed_js_css', 'y' ), - array( THEMES_PKG_NAME,'site_slide_style', DEFAULT_THEME ), - array( THEMES_PKG_NAME,'style', DEFAULT_THEME ), - array( THEMES_PKG_NAME,'site_style_layout', 'gala_1' ), - array( THEMES_PKG_NAME,'site_icon_style', 'tango' ), - array( THEMES_PKG_NAME,'site_top_bar_dropdown', 'y' ), - array( THEMES_PKG_NAME,'site_bot_bar', 'y' ), +//$gBitInstaller->registerSchemaTable( THEMES_PKG_NAME, '', '', true ); +$gBitInstaller->registerPreferences( THEMES_PKG_NAME, [ +// [ THEMES_PKG_NAME,'themes_joined_js_css', 'y' ], +// [ THEMES_PKG_NAME,'themes_packed_js_css', 'y' ], + [ THEMES_PKG_NAME,'site_slide_style', DEFAULT_THEME ], + [ THEMES_PKG_NAME,'style', DEFAULT_THEME ], + [ THEMES_PKG_NAME,'site_style_layout', 'gala_1' ], + [ THEMES_PKG_NAME,'site_icon_style', 'tango' ], + [ THEMES_PKG_NAME,'site_top_bar_dropdown', 'y' ], + [ THEMES_PKG_NAME,'site_bot_bar', 'y' ], // Disable languages menu by default since it is duplicated in admin menu - array( THEMES_PKG_NAME,'menu_languages', 'n' ), + [ THEMES_PKG_NAME,'menu_languages', 'n' ], // Disable languages menu by default since it is linked from the header - array( THEMES_PKG_NAME,'menu_users', 'n' ), -)); + [ THEMES_PKG_NAME,'menu_users', 'n' ], +] ); // Package Requirements -$gBitInstaller->registerRequirements( THEMES_PKG_NAME, array( - 'liberty' => array( 'min' => '2.1.4' ), - 'users' => array( 'min' => '2.1.0' ), - 'kernel' => array( 'min' => '2.0.0' ), - 'languages' => array( 'min' => '2.0.0' ), -)); -?> +$gBitInstaller->registerRequirements( THEMES_PKG_NAME, [ + 'liberty' => [ 'min' => '5.0.0' ], + 'users' => [ 'min' => '5.0.0' ], + 'kernel' => [ 'min' => '5.0.0' ], + 'languages' => [ 'min' => '5.0.0' ], +] ); |
