Offer the possibility to define different URL for themes folder

This commit is contained in:
Frederic Guillot 2017-01-09 18:38:32 -05:00
parent 1c6d132324
commit 70fb78b990
4 changed files with 11 additions and 3 deletions

View File

@ -25,6 +25,7 @@ defined('DEBUG_MODE') or define('DEBUG_MODE', false);
defined('DEBUG_FILENAME') or define('DEBUG_FILENAME', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'debug.log'); defined('DEBUG_FILENAME') or define('DEBUG_FILENAME', DATA_DIRECTORY.DIRECTORY_SEPARATOR.'debug.log');
defined('THEME_DIRECTORY') or define('THEME_DIRECTORY', 'themes'); defined('THEME_DIRECTORY') or define('THEME_DIRECTORY', 'themes');
defined('THEME_URL_PATH') or define('THEME_URL_PATH', 'themes');
defined('SESSION_SAVE_PATH') or define('SESSION_SAVE_PATH', ''); defined('SESSION_SAVE_PATH') or define('SESSION_SAVE_PATH', '');
defined('PROXY_HOSTNAME') or define('PROXY_HOSTNAME', ''); defined('PROXY_HOSTNAME') or define('PROXY_HOSTNAME', '');

View File

@ -41,9 +41,10 @@ function css()
if ($theme !== 'original') { if ($theme !== 'original') {
$css_file = THEME_DIRECTORY.'/'.$theme.'/css/app.css'; $css_file = THEME_DIRECTORY.'/'.$theme.'/css/app.css';
$css_url = THEME_URL_PATH.'/'.$theme.'/css/app.css';
if (file_exists($css_file)) { if (file_exists($css_file)) {
return $css_file.'?version='.filemtime($css_file); return $css_url.'?version='.filemtime($css_file);
} }
} }

View File

@ -33,9 +33,12 @@ define('DEBUG_MODE', false);
// DEBUG_FILENAME => default is data/debug.log // DEBUG_FILENAME => default is data/debug.log
define('DEBUG_FILENAME', DATA_DIRECTORY.'/debug.log'); define('DEBUG_FILENAME', DATA_DIRECTORY.'/debug.log');
// THEME_DIRECTORY => default is themes // Theme folder on the filesystem => default is themes
define('THEME_DIRECTORY', 'themes'); define('THEME_DIRECTORY', 'themes');
// Theme URL path => default is themes
define('THEME_URL_PATH', 'themes');
// SESSION_SAVE_PATH => default is empty (used to store session files in a custom directory) // SESSION_SAVE_PATH => default is empty (used to store session files in a custom directory)
define('SESSION_SAVE_PATH', ''); define('SESSION_SAVE_PATH', '');

View File

@ -82,9 +82,12 @@ define('DEBUG_MODE', false);
// DEBUG_FILENAME => default is data/debug.log // DEBUG_FILENAME => default is data/debug.log
define('DEBUG_FILENAME', DATA_DIRECTORY.'/debug.log'); define('DEBUG_FILENAME', DATA_DIRECTORY.'/debug.log');
// THEME_DIRECTORY => default is themes // Theme folder on the filesystem => default is themes
define('THEME_DIRECTORY', 'themes'); define('THEME_DIRECTORY', 'themes');
// Theme URL path => default is themes
define('THEME_URL_PATH', 'themes');
// SESSION_SAVE_PATH => default is empty (used to store session files in a custom directory) // SESSION_SAVE_PATH => default is empty (used to store session files in a custom directory)
define('SESSION_SAVE_PATH', ''); define('SESSION_SAVE_PATH', '');