blog theme: fix config template loading

This commit is contained in:
fabrixxm 2013-02-18 11:07:54 -05:00
parent df31cd6285
commit ebe93fbbea
1 changed files with 11 additions and 2 deletions

View File

@ -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(),