1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

- ok, get away with the secondary style approach (styles can be mixed together easily with the acp)

- introduce a more generic approach of defining some additional variables through cfg files as well as the name, copyright and version fields
- please note that at the moment this is in flux. I added it now for Tom because he needs the theme parameters.


git-svn-id: file:///svn/phpbb/trunk@5372 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2005-12-22 16:28:27 +00:00
parent 088ed2c414
commit 60d218245c
12 changed files with 256 additions and 115 deletions

View File

@@ -305,6 +305,51 @@ class cache extends acm
return;
}
/**
* Obtain cfg file data
*/
function obtain_cfg_items($theme)
{
global $config, $phpbb_root_path;
$parsed_items = array(
'theme' => array(),
'template' => array(),
'imageset' => array()
);
foreach ($parsed_items as $key => $parsed_array)
{
$parsed_array = ($this->exists('_' . $key . '_cfg')) ? $this->get('_' . $key . '_cfg') : array();
$reparse = false;
$filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';
if (!file_exists($filename))
{
continue;
}
if (!isset($parsed_array[$theme[$key . '_id']]) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
{
$reparse = true;
}
// Re-parse cfg file
if ($reparse)
{
$parsed_array = parse_cfg_file($filename);
$parsed_array['filetime'] = @filemtime($filename);
$this->put('_' . $key . '_cfg', $parsed_array);
}
$parsed_items[$key] = &$parsed_array;
}
return $parsed_items;
}
}
?>