-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme_config.php
94 lines (75 loc) · 2.85 KB
/
theme_config.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
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
if (!defined('e107_INIT')) { exit; }
$sitetheme = e107::getPref('sitetheme');
e107::themeLan('admin', $sitetheme, true);
// FIXME Move all of this into class below.
if(isset($_POST['importThemeDemo']))
{
$xmlArray = array();
e107::getDebug()->log("Retrieving demo data from xml file");
$themepath = e_THEME.$sitetheme."/install/install.xml";
$xmlArray = e107::getSingleton('xmlClass')->loadXMLfile($themepath);
$ret = e107::getSingleton('xmlClass')->e107Import($xmlArray);
if($ret)
{
$mes = e107::getMessage();
$mes->add("Importing Theme Demo Content:", E_MESSAGE_SUCCESS);
}
$mes->render();
}
// Dummy Theme Configuration File.
class theme_config implements e_theme_config
{
function __construct()
{
}
function config()
{
// v2.2.2
$bootswatch = array(
"cerulean"=> 'Cerulean',
"cosmo"=> 'Cosmo',
"cyborg"=> 'Cyborg',
"darkly"=> 'Darkly',
"flatly"=> 'Flatly',
"journal"=> 'Journal',
"litera"=> 'Litera',
"lumen"=> 'Lumen',
"lux"=> 'Lux',
"materia"=> 'Materia',
"minty"=> 'Minty',
"pulse"=> 'Pulse',
"sandstone"=> 'Sandstone',
"simplex"=> 'Simplex',
"sketchy"=> 'sketchy',
"slate"=> 'Slate',
"solar"=> 'Solar',
"spacelab"=> 'Spacelab',
"superhero"=> 'Superhero',
"united"=> 'United',
"yeti"=> 'Yeti',
);
$previewLink = " <a class='btn btn-default btn-secondary e-modal' data-modal-caption=\"Use the 'Themes' menu to view the selection.\" href='http://bootswatch.com/default/'>".LAN_PREVIEW."</a>";
return array(
'bootswatch' => array('title'=>LAN_THEMEPREF_03, 'type'=>'dropdown', 'writeParms'=>array('optArray'=> $bootswatch, 'post'=>$previewLink, 'default'=>LAN_DEFAULT)),
'cardmenu_look' => array('title' => LAN_THEMEPREF_04, 'type'=>'boolean', 'writeParms'=>array(),'help'=>''),
'login_iframe' => array('title' => LAN_THEMEPREF_06, 'type'=>'boolean', 'writeParms'=>array(),'help'=>''),
'map' => array('title' => LAN_THEMEPREF_05, 'type'=>'textarea', 'writeParms'=>array('size'=>'block-level'),'help'=>''),
'inlinecss' => array('title' => LAN_THEMEPREF_01, 'type'=>'textarea', 'writeParms'=>array('size'=>'block-level'),'help'=>''),
'inlinejs' => array('title' => LAN_THEMEPREF_02, 'type'=>'textarea', 'writeParms'=>array('size'=>'block-level'),'help'=>''),
);
}
function help()
{
/* only if install.xml exists */
/* check if all required plugins are installed */
$text = "<div class='center buttons-bar'><form method='post' action='".e_SELF."?".e_QUERY."' id='core-db-import-form'>";
$text .= e107::getForm()->admin_button('importThemeDemo', 'Install Demo', 'other');
$text .= '</form></div>';
return $text;
}
function process()
{
return '';
}
}