commit
09f681b8f9
@ -34,13 +34,18 @@ if (file_exists(CLASS_DIR . '/coins/coin_' . $config['algorithm'] . '.class.php'
|
||||
require_once(INCLUDE_DIR . '/lib/swiftmailer/swift_required.php');
|
||||
|
||||
// Detect device
|
||||
if ( PHP_SAPI == 'cli') {
|
||||
require_once(INCLUDE_DIR . '/lib/Mobile_Detect.php');
|
||||
$detect = new Mobile_Detect;
|
||||
|
||||
if (!$detect->isMobile()) {
|
||||
$theme = $setting->getValue('website_mobile_theme', 'bootstrap');
|
||||
} else if ( PHP_SAPI == 'cli') {
|
||||
// Create a new compile folder just for crons
|
||||
// We call mail templates directly anyway
|
||||
$theme = 'cron';
|
||||
} else {
|
||||
// Use configured theme, fallback to default theme
|
||||
$setting->getValue('website_theme') ? $theme = $setting->getValue('website_theme') : $theme = 'bootstrap';
|
||||
$theme = $setting->getValue('website_theme', 'bootstrap');
|
||||
}
|
||||
define('THEME', $theme);
|
||||
|
||||
|
||||
@ -69,6 +69,13 @@ $aSettings['website'][] = array(
|
||||
'name' => 'website_theme', 'value' => $setting->getValue('website_theme'),
|
||||
'tooltip' => 'The default theme used on your pool.'
|
||||
);
|
||||
$aSettings['website'][] = array(
|
||||
'display' => 'Website mobile theme', 'type' => 'select',
|
||||
'options' => $aThemes,
|
||||
'default' => 'bootstrap',
|
||||
'name' => 'website_mobile_theme', 'value' => $setting->getValue('website_mobile_theme'),
|
||||
'tooltip' => 'The mobile theme used on your pool.'
|
||||
);
|
||||
$aSettings['website'][] = array(
|
||||
'display' => 'Website Design', 'type' => 'select',
|
||||
'options' => $aDesigns,
|
||||
|
||||
1248
include/lib/Mobile_Detect.php
Normal file
1248
include/lib/Mobile_Detect.php
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user