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
|
<?php
$registerHash = array(
'package_name' => 'themes',
'package_path' => dirname( __FILE__ ).'/',
'activatable' => FALSE,
'required_package'=> TRUE,
);
$gBitSystem->registerPackage( $registerHash );
$gLibertySystem->registerService(
LIBERTY_SERVICE_THEMES,
THEMES_PKG_NAME,
array(
'content_display_function' => 'themes_content_display',
'content_list_function' => 'themes_content_list',
),
array( 'description' => 'Applied when user themes enabled; See theme pkg administration to enabled.' )
);
require_once( THEMES_PKG_PATH."BitThemes.php" );
global $gBitThemes;
$gBitThemes = new BitThemes();
// if we're viewing this site with a text-browser, we force the text-browser theme
global $gSniffer;
if( !$gSniffer->_feature_set['css1'] && !$gSniffer->_feature_set['css2'] ) {
$gBitThemes->setStyle( 'lynx' );
}
// setStyle first, in case package decides it wants to reset the style in it's own <package>/bit_setup_inc.php
if( !$gBitThemes->getStyle() ) {
$gBitThemes->setStyle( DEFAULT_THEME );
}
$gBitSmarty->assign_by_ref( 'gBitThemes', $gBitThemes );
// load some core javascript files
$gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/bitweaver.js', TRUE, 1 );
if( !$gBitSystem->isFeatureActive( 'site_disable_jstabs' )) {
$gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/libs/tabpane.js', TRUE, 40 );
}
if( !$gBitSystem->isFeatureActive( 'site_disable_fat' )) {
$gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/libs/fat.js', TRUE, 50 );
}
if( $gBitSystem->isFeatureActive( 'site_top_bar_js' ) && $gBitSystem->isFeatureActive( 'site_top_bar_dropdown' )) {
$gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/libs/fsmenu.js', TRUE, 60 );
}
if( $gBitSystem->isFeatureActive( 'site_fancy_zoom' )) {
$gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/fancyzoom/js-global/FancyZoom.js', TRUE, 80 );
$gBitThemes->loadJavascript( UTIL_PKG_PATH.'javascript/fancyzoom/js-global/FancyZoomHTML.js', TRUE, 81 );
$gBitSystem->setOnloadScript( 'setupZoom();' );
}
$gBitSystem->mOnload[] = 'BitBase.setupShowHide();';
$gBitThemes->loadCss( THEMES_PKG_PATH.'css/dropmenu.css' );
// styles formerly included inline (kernel, themes). hopefully not needed anymore sometime in the future
$gBitThemes->loadCss( THEMES_PKG_PATH.'css/inline.css' );
?>
|