diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-12-22 16:28:27 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-12-22 16:28:27 +0000 |
commit | 60d218245c0986cd35d9fc8ea2fab7f5f32a9e38 (patch) | |
tree | b3e801e8a08805aef6eca2f8b2d08e147858c653 /phpBB/includes/template.php | |
parent | 088ed2c414bc0ebca59b486c1d44614fa6ff6456 (diff) | |
download | forums-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/template.php')
-rw-r--r-- | phpBB/includes/template.php | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 85ac7d581e..595e2fa436 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -38,7 +38,6 @@ class template var $_tpldata = array(); // Root dir and hash of filenames for each template handle. - var $tpl = ''; var $root = ''; var $cachepath = ''; var $files = array(); @@ -61,17 +60,10 @@ class template { global $phpbb_root_path, $config, $user; - if (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template')) + if (file_exists($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template')) { - $this->tpl = 'primary'; - $this->root = $phpbb_root_path . 'styles/' . $user->theme['primary']['template_path']. '/template'; - $this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['primary']['template_path'] . '_'; - } - else - { - $this->tpl = 'secondary'; - $this->root = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path']. '/template'; - $this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['secondary']['template_path'] . '_'; + $this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path']. '/template'; + $this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['template_path'] . '_'; } $this->static_lang = $static_lang; @@ -87,7 +79,6 @@ class template { global $phpbb_root_path; - $this->tpl = 'primary'; $this->root = $template_path; $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . $template_name . '_'; @@ -207,16 +198,10 @@ class template trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR); } - if (!file_exists($this->files[$handle]) && !empty($user->theme['secondary'])) - { - $this->tpl = 'secondary'; - $this->files[$handle] = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/' . $this->filename[$handle]; - } - - if ($user->theme[$this->tpl]['template_storedb']) + if ($user->theme['template_storedb']) { $sql = 'SELECT * FROM ' . STYLES_TPLDATA_TABLE . ' - WHERE template_id = ' . $user->theme[$this->tpl]['template_id'] . " + WHERE template_id = ' . $user->theme['template_id'] . " AND (template_filename = '" . $db->sql_escape($this->filename[$handle]) . "' OR template_included LIKE '%" . $db->sql_escape($this->filename[$handle]) . ":%')"; $result = $db->sql_query($sql); @@ -225,7 +210,7 @@ class template { do { - if ($row['template_mtime'] < filemtime($phpbb_root_path . 'styles/' . $user->theme[$this->tpl]['template_path'] . '/template/' . $row['template_filename'])) + if ($row['template_mtime'] < filemtime($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/' . $row['template_filename'])) { if ($row['template_filename'] == $this->filename[$handle]) { |