tweak to support multiple engine: in info.txt of templates
This commit is contained in:
parent
859b56a3e1
commit
2b6eb5954b
@ -268,7 +268,10 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath') {
|
||||
|
||||
$directories[] = isset($serendipity['template']) ? $serendipity['template'] . '/' : '';
|
||||
if (isset($serendipity['template_engine']) && (stristr($file, 'admin/') === false || $serendipity['template_engine'] != 'default')) {
|
||||
$directories[] = $serendipity['template_engine'] . '/';
|
||||
$p = explode(',', $serendipity['template_engine']);
|
||||
foreach($p AS $te) {
|
||||
$directories[] = trim($te) . '/';
|
||||
}
|
||||
}
|
||||
|
||||
$directories[] = $serendipity['defaultTemplate'] .'/';
|
||||
|
@ -880,11 +880,13 @@ function serendipity_smarty_init($vars = array()) {
|
||||
$serendipity['smarty']->debugging = true;
|
||||
}
|
||||
|
||||
$serendipity['smarty']->template_dir = array(
|
||||
$template_dir,
|
||||
$serendipity['serendipityPath'] . $serendipity['templatePath'] . 'default',
|
||||
$serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template_engine']
|
||||
);
|
||||
$serendipity['smarty']->template_dir = array($template_dir);
|
||||
$p = explode(',', $serendipity['template_engine']);
|
||||
foreach($p AS $te) {
|
||||
$serendipity['smarty']->template_dir[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $te;
|
||||
}
|
||||
|
||||
$serendipity['smarty']->template_dir[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . 'default';
|
||||
$serendipity['smarty']->compile_dir = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE;
|
||||
|
||||
if (!is_dir($serendipity['smarty']->compile_dir) || !is_writable($serendipity['smarty']->compile_dir)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user