From ebe93fbbea565dcc1a4ea69559f083215defddfa Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Mon, 18 Feb 2013 11:07:54 -0500 Subject: [PATCH] blog theme: fix config template loading --- view/theme/blog/config.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/view/theme/blog/config.php b/view/theme/blog/config.php index 7ad3538..203d546 100644 --- a/view/theme/blog/config.php +++ b/view/theme/blog/config.php @@ -49,8 +49,17 @@ function blogtheme_form(&$a, $headimg, $headimghome){ ".wheel.jpg" => "wheel.jpg", ); - - $t = get_markup_template("config.tpl" ); + + // get_markup_template() load templates from current enabled theme + // if this theme is not the current one, it will fail + $template = dirname(__file__)."/smarty3/config.tpl"; + if($a->theme['template_engine'] === 'smarty3') { + $t = new FriendicaSmarty(); + $t->filename = $template; + } else { + $t = get_markup_template( $template ); + } + $o .= replace_macros($t, array( '$submit' => t('Submit'), '$baseurl' => $a->get_baseurl(),