blob: a6a7e62eced4055c7cd7ed7ce98a8829d295fe4e (
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
59
60
61
62
|
<?php
require_once( '../../bit_setup_inc.php' );
include_once( THEMES_PKG_PATH.'theme_control_lib.php' );
$gBitSystem->verifyPermission( 'bit_p_admin' );
require_once( KERNEL_PKG_PATH.'simple_form_functions_lib.php' );
// Handle Update
$processForm = set_tab();
if( $processForm ) {
$pref_simple_values = array(
"slide_style",
"biticon_display",
);
foreach ($pref_simple_values as $svitem) {
simple_set_value ($svitem);
}
$pref_toggles = array(
"disable_jstabs",
);
foreach ($pref_toggles as $toggle) {
simple_set_toggle ($toggle);
}
if( $_REQUEST["site_style"] ) {
// Set value(s) with alternate pref name
$gBitSystem->storePreference( 'style', $_REQUEST["site_style"] );
$gPreviewStyle = $_REQUEST["site_style"];
$gBitSystem->mStyle = $_REQUEST["site_style"];
}
if( isset( $_REQUEST['fRemoveTheme'] ) ) {
$tcontrollib->expunge_dir( THEMES_PKG_PATH.'styles/'.$_REQUEST['fRemoveTheme'] );
}
//Clear the template cache in case the theme has changed TODO: Do this ONLY when the theme changes.
//TODO: Fix module render order so that this will correctly render the modules on the 1st try too.
// $smarty->clear_all_cache();
// $smarty->clear_compiled_tpl();
}
// Get list of available styles
$styles = &$tcontrollib->getStyles();
$smarty->assign_by_ref( "styles", $styles );
// Get list of available slideshow styles
$smarty->assign_by_ref("slide_styles", $styles);
// set the options biticon takes
$biticon_display_options = array(
'icon' => tra( 'icon' ),
'text' => tra( 'text' ),
'icon_text' => tra( 'icon and text' )
);
$smarty->assign( "biticon_display_options", $biticon_display_options );
$gBitSystem->display( 'bitpackage:themes/admin_themes_manager.tpl');
?>
|