mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
feature 1502: Allow to have configuration page for each theme.css.
About string for theme has to be saved in language theme directory (about.html) git-svn-id: http://piwigo.org/svn/trunk@5446 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -94,7 +94,7 @@ class Template {
|
||||
{
|
||||
$this->set_template_dir($root.'/'.$theme.'/'.$path);
|
||||
|
||||
include($root.'/'.$theme.'/themeconf.inc.php');
|
||||
$themeconf = $this->load_themeconf($root.'/'.$theme);
|
||||
|
||||
if (isset($themeconf['parent']) and $themeconf['parent'] != $theme)
|
||||
{
|
||||
@@ -573,6 +573,21 @@ class Template {
|
||||
|
||||
return $source;
|
||||
}
|
||||
|
||||
function load_themeconf($dir)
|
||||
{
|
||||
global $themeconfs, $conf, $page;
|
||||
|
||||
$dir = realpath($dir);
|
||||
if (!isset($themeconfs[$dir]))
|
||||
{
|
||||
$themeconf = array();
|
||||
include($dir.'/themeconf.inc.php');
|
||||
// Put themeconf in cache
|
||||
$themeconfs[$dir] = $themeconf;
|
||||
}
|
||||
return $themeconfs[$dir];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user