I want to know where is the code for the gallery theme.The code that adds theme settings in config and the code that coppermine uses to display the theme I set in the config.
Maybe I can find some php code or something to add a diffrent theme for the admin pages.
Quote from: allvip on February 01, 2014, 01:27:33 PM
The code that adds theme settings in config
'theme' => array(
'type' => 'select',
'help_link' => 'f=configuration.htm&as=admin_theme_theme&ae=admin_theme_theme_end',
'options' => form_get_foldercontent('themes/', 'folder', '', array('sample', '.svn')),
'default_value' => 'curve',
'force_config' => '1',
),
Quote from: allvip on February 01, 2014, 01:27:33 PM
the code that coppermine uses to display the theme I set in the config.
// ********************************************************
// * Theme processing - start
// ********************************************************
$CONFIG['theme_config'] = DEFAULT_THEME; // Save the gallery-configured setting
if ($matches = $superCage->get->getMatched('theme', '/^[A-Za-z0-9_-]+$/')) {
$USER['theme'] = $matches[0];
}
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) {
$CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
unset($USER['theme']);
}
if (!file_exists('themes/'.$CONFIG['theme'].'/theme.php')) {
$CONFIG['theme'] = 'curve';
}
$THEME_DIR = 'themes/'.$CONFIG['theme'].'/';
require('themes/'.$CONFIG['theme'].'/theme.php'); // Load configured theme first
require('include/themes.inc.php'); // All Fallback Theme Templates and Functions
// ********************************************************
// * Theme processing - end
// ********************************************************
To answer what you're actually looking for, just add something like
if (in_array($CPG_PHP_SELF, array('admin.php', 'util.php'))) {
$CONFIG['theme'] = 'water_drop';
}
before
if (!file_exists('themes/'.$CONFIG['theme'].'/theme.php')) {
$CONFIG['theme'] = 'curve';
}