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:
patdenice
2010-03-29 13:30:02 +00:00
parent 034e75f8ea
commit 29d36ffdc3
6 changed files with 113 additions and 35 deletions

View File

@@ -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];
}
}