diff options
author | Vjacheslav Trushkin <arty@phpbb.com> | 2012-02-03 16:19:42 +0200 |
---|---|---|
committer | Vjacheslav Trushkin <arty@phpbb.com> | 2012-02-03 16:19:42 +0200 |
commit | 326ff46ef7812f9f725e680e5202364c6b25bb4b (patch) | |
tree | 22a5e51bce6c1795fa235e0b5cacaca50d181e9b | |
parent | 4aef6ea979befe9c40b3253ed10678a4eeb74160 (diff) | |
download | forums-326ff46ef7812f9f725e680e5202364c6b25bb4b.tar forums-326ff46ef7812f9f725e680e5202364c6b25bb4b.tar.gz forums-326ff46ef7812f9f725e680e5202364c6b25bb4b.tar.bz2 forums-326ff46ef7812f9f725e680e5202364c6b25bb4b.tar.xz forums-326ff46ef7812f9f725e680e5202364c6b25bb4b.zip |
[ticket/10616] Add template inheritance to exported template
Add template inheritance when exporting template.cfg
PHPBB3-10616
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 5a7902755e..d7b0484af8 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -99,11 +99,11 @@ parse_css_file = {PARSE_CSS_FILE} $this->template_cfg .= ' # Some configuration options -# -# You can use this function to inherit templates from another template. -# The template of the given name has to be installed. -# Templates cannot inherit from inheriting templates. -#'; +# Template inheritance +# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/ +# Set value to empty or this template name to ignore template inheritance. +inherit_from = {INHERIT_FROM} +'; $this->imageset_keys = array( 'logos' => array( @@ -2047,9 +2047,7 @@ parse_css_file = {PARSE_CSS_FILE} // Export template core code if ($mode == 'template' || $inc_template) { - $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg); - - $use_template_name = ''; + $use_template_name = $style_row['template_name']; // Add the inherit from variable, depending on it's use... if ($style_row['template_inherits_id']) @@ -2063,7 +2061,8 @@ parse_css_file = {PARSE_CSS_FILE} $db->sql_freeresult($result); } - $template_cfg .= ($use_template_name) ? "\ninherit_from = $use_template_name" : "\n#inherit_from = "; + $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}', '{INHERIT_FROM}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version'], $use_template_name), $this->template_cfg); + $template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}"; $data[] = array( |