aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm/acm_main.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-12-22 16:28:27 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-12-22 16:28:27 +0000
commit60d218245c0986cd35d9fc8ea2fab7f5f32a9e38 (patch)
treeb3e801e8a08805aef6eca2f8b2d08e147858c653 /phpBB/includes/acm/acm_main.php
parent088ed2c414bc0ebca59b486c1d44614fa6ff6456 (diff)
downloadforums-60d218245c0986cd35d9fc8ea2fab7f5f32a9e38.tar
forums-60d218245c0986cd35d9fc8ea2fab7f5f32a9e38.tar.gz
forums-60d218245c0986cd35d9fc8ea2fab7f5f32a9e38.tar.bz2
forums-60d218245c0986cd35d9fc8ea2fab7f5f32a9e38.tar.xz
forums-60d218245c0986cd35d9fc8ea2fab7f5f32a9e38.zip
- 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
Diffstat (limited to 'phpBB/includes/acm/acm_main.php')
-rw-r--r--phpBB/includes/acm/acm_main.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/phpBB/includes/acm/acm_main.php b/phpBB/includes/acm/acm_main.php
index 27c59ea7c4..91a50f75fb 100644
--- a/phpBB/includes/acm/acm_main.php
+++ b/phpBB/includes/acm/acm_main.php
@@ -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;
+ }
+
}
?> \ No newline at end of file