diff --git a/boot.php b/boot.php index e8561a61..08caf1a4 100644 --- a/boot.php +++ b/boot.php @@ -1946,3 +1946,18 @@ function clear_cache($basepath = "", $path = "") { closedir($dh); } } + +function set_template_engine(&$a, $engine = 'internal') { + + $a->theme['template_engine'] = 'internal'; + + if(is_writable('view/smarty3/')) { + switch($engine) { + case 'smarty3': + $a->theme['template_engine'] = 'smarty3'; + break; + default: + break; + } + } +} diff --git a/include/conversation.php b/include/conversation.php index 9cc6a834..a5a6a992 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -920,7 +920,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { $o = ''; - $geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : ''); + $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); /* $plaintext = false; if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) ) diff --git a/view/theme/cleanzero/theme.php b/view/theme/cleanzero/theme.php index c7c0b2d6..356a1b71 100644 --- a/view/theme/cleanzero/theme.php +++ b/view/theme/cleanzero/theme.php @@ -8,7 +8,7 @@ $a->theme_info = array( 'extends' => 'duepuntozero', ); -$a->theme['template_engine'] = 'smarty3'; +set_template_engine($a, 'smarty3'); function cleanzero_init(&$a) { $a->page['htmlhead'] .= <<< EOT diff --git a/view/theme/comix-plain/theme.php b/view/theme/comix-plain/theme.php index a85d535a..4e5fd0d0 100644 --- a/view/theme/comix-plain/theme.php +++ b/view/theme/comix-plain/theme.php @@ -11,7 +11,7 @@ $a->theme_info = array( 'extends' => 'duepuntozero', ); -$a->theme['template_engine'] = 'smarty3'; +set_template_engine($a, 'smarty3'); $a->page['htmlhead'] .= <<< EOT