-
Notifications
You must be signed in to change notification settings - Fork 40
/
themeconf.inc.php
80 lines (70 loc) · 2.28 KB
/
themeconf.inc.php
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/*
Theme Name: Bootstrap Darkroom
Version: auto
Description: A mobile-ready & feature-rich theme based on Boostrap 4, with PhotoSwipe full-screen slideshow, Slick carousel, over 30 color styles and lots of configuration options
Theme URI: http://piwigo.org/ext/extension_view.php?eid=831
Author: Thomas Kuther
Author URI: https://github.com/tkuther/piwigo-bootstrap-darkroom
*/
require_once(PHPWG_THEMES_PATH . 'bootstrap_darkroom/include/themecontroller.php');
require_once(PHPWG_THEMES_PATH . 'bootstrap_darkroom/include/config.php');
$themeconf = array(
'name' => 'bootstrap_darkroom',
'parent' => 'default',
'load_parent_css' => false,
'load_parent_local_head' => true,
'local_head' => 'local_head.tpl',
'url' => 'https://kuther.net/',
'colorscheme' => 'dark'
);
//debug
//$conf['template_combine_files'] = false;
// always show metadata initially
pwg_set_session_var('show_metadata', true);
// register video files
$video_ext = array('mp4','m4v');
$conf['file_ext'] = array_merge ($conf['file_ext'], $video_ext, array_map('strtoupper', $video_ext));
$controller = new \BootstrapDarkroom\ThemeController();
// Define if skin is clear or dark
$clear_skins = array(
'bootstrap-default',
'material-amber',
'material-blue',
'material-brown',
'material-deep-orange',
'material-deep-purple',
'material-indigo',
'material-light-green',
'material-lime',
'material-purple',
'material-indigo',
'material-red',
'material-teal',
'bootswatch-cerulean',
'bootswatch-cosmo',
'bootswatch-flatly',
'bootswatch-journal',
'bootswatch-litera',
'bootswatch-lumen',
'bootswatch-lux',
'bootswatch-materia',
'bootswatch-minty',
'bootswatch-pulse',
'bootswatch-sandstone',
'bootswatch-simplex',
'bootswatch-sketchy',
'bootswatch-spacelab',
'bootswatch-united',
'bootswatch-yeti',
);
// Get value of bootstrap theme and set themeconf to clear or leave as default (dark)
$closure = \Closure::bind(function &(\BootstrapDarkroom\ThemeController $controller) {
return $controller->config;
}, null, \BootstrapDarkroom\ThemeController::class);
$config = &$closure($controller);
if (in_array($config->bootstrap_theme, $clear_skins))
{
$themeconf['colorscheme'] = 'clear';
}
$controller->init();