diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2013-05-08 04:23:17 -0400 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2013-05-08 04:23:17 -0400 |
commit | 5e1980becf69a4c65489bed6f94fa730ec8ef4bf (patch) | |
tree | 2f1f1c7540c62c049dd314b0155380c6cb4526b5 /util | |
parent | c753fa19d289e936131aad706cf31bcfe111b4c1 (diff) | |
download | volse-hubzilla-5e1980becf69a4c65489bed6f94fa730ec8ef4bf.tar.gz volse-hubzilla-5e1980becf69a4c65489bed6f94fa730ec8ef4bf.tar.bz2 volse-hubzilla-5e1980becf69a4c65489bed6f94fa730ec8ef4bf.zip |
remove "internal" templates, use "tpl/" folder for smarty3 templates,
move smarty3 templates in "tpl/" folder, add util/precompile_smarty.php utility, add precompiled templates
Diffstat (limited to 'util')
-rwxr-xr-x | util/precompile_smarty3.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/util/precompile_smarty3.php b/util/precompile_smarty3.php new file mode 100755 index 000000000..65cb760ef --- /dev/null +++ b/util/precompile_smarty3.php @@ -0,0 +1,27 @@ +<?php
+
+
+/**
+* @package util
+*/
+
+#require_once('boot.php');
+#require_once('include/cli_startup.php');
+require_once "library/Smarty/libs/Smarty.class.php";
+
+#cli_startup();
+
+$folders = array_merge(array('view/tpl/'),glob('view/theme/*/tpl/*',GLOB_ONLYDIR));
+
+$s = new Smarty();
+
+$s->setTemplateDir($folders);
+
+$s->setCompileDir('view/tpl/smarty3/compiled/');
+$s->setConfigDir('view/tpl/smarty3/config/');
+$s->setCacheDir('view/tpl/smarty3/cache/');
+
+$s->left_delimiter = "{{";
+$s->right_delimiter = "}}";
+
+$s->compileAllTemplates('.tpl',true);
\ No newline at end of file |